2009-06-26 12:00:40 Linphone 3.1.2 Error
Cameron Barfield (UNITED STATES)
Message: 76395
I'm cross posting this on the Linphone mailing list, but I thought maybe someone here could help out.
I'm running Linphone 3.1.2 on a BF536. Alsa v1.0.18, oSIP2 v3.2.0, eXosip v3.2.0.
Everything works perfectly for 1,007 calls. Terminating the 1,007th call causes some problems:
starting call 1006 Contacting sip:*80100@10.0.1.17
Connected.
ending call
Call ended
starting call 1007 Contacting sip:*80100@10.0.1.17
Connected.
ending call
libeXosip2-3.2.0/src/eXutils.c: setsockopt() failed in function exosip_default_gatewy_ipv4()
DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST: Bad file descriptor
exosip_default_gateway_ipv4 failed. returning -10 to caller
Call ended
starting call 1008 Contacting sip:*80100@10.0.1.17
Connected.
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
ending call
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm_dmix.c:1008:(snd_pcm_dmix_open) unable to open slave
Call ended
starting call 1009 Contacting sip:*80100@10.0.1.17
Connected.
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3974:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3497:(_snd_config_evaluate) Cannot open shared library (null)
ALSA lib ../../alsa-lib-1.0.18/src/conf.cending call
libeXosip2-3.2.0/src/eXutils.c: setsockopt() failed in function exosip_default_gatewy_ipv4()
:3974:(snd_config_expand) DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST: Bad file descriptor
exosip_default_gateway_ipv4 failed. returning -10 to caller
Args evaluate error: No such file or directory
ALSA lib ../../../alsa-lib-1.0.18/src/pcm/pcm.c:2202:(snd_pcm_open_noupdate) Unknown PCM default
Call ended
That all goes on for a while, then:
starting call 1014 libeXosip2-3.2.0/src/eXutils.c: setsockopt() failed in function exosip_default_gatewy_ipv4()
DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST: Bad file descriptor
exosip_default_gateway_ipv4 failed. returning -10 to caller
libeXosip2-3.2.0/src/eXutils.c: setsockopt() failed in function exosip_default_gatewy_ipv4()
DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST: Bad file descriptor
exosip_default_gateway_ipv4 failed. returning -10 to caller
libeXosip2-3.2.0/src/eXutils.c: setsockopt() failed in function exosip_default_gatewy_ipv4()
DEBUG: [get_output_if] setsockopt(SOL_SOCKET, SO_BROADCAST: Bad file descriptor
exosip_default_gateway_ipv4 failed. returning -10 to caller
ortp-error-Could not find default routable ip address !
linphone_core_get_local_ip() could not find default routable ip address
I added some printfs() to help track the problem. I added some code that would cause Linphone to terminate if linphone_core_get_local_ip() failed. Before that, Linphone would continue making calls successfully, but with no audio and all of the error messages above.
After terminating Linphone, sound no longer works at all. I used amixer to reset the mono playback switch, master volume, PCM playback volume, etc. but sound does not work until I reboot my board.
I'd originally suspected the path of the problem to be:
linphonec_main_loop()
linphone_core_invite()
linphone_call_new_outgoing()
linphone_core_get_local_ip()
exosip_guess_local_ip()
exosip_guess_ip_for_via()
exosip_default_gateway_ipv4()
setsockopt()
It looks like that path is hitting and failing, but it's not the start of the problem. I find it quite odd that it always fails when terminating the 1,007th call and that Alsa and the socket both go to lunch at the same time.
QuoteReplyEditDelete
2009-06-26 13:36:29 Re: Linphone 3.1.2 Error
Rob Maris (GERMANY)
Message: 76400
Cameron, I can't provide a solution.
However, upon udate from 3.1.1 to 3.1.2 I noticed two warnings upon every linphone start.
root: /> linphonec
NLS disabled.
ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3952:(snd_config_expand) Unknown parameters 0
ALSA lib ../../../alsa-lib-1.0.18/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL default:0
Until now, I did not find any functional problems. I'll report it here when a subsequent update lacks these messages. These days I'm also using linphone trunk sources.
-Rob
QuoteReplyEditDelete
2009-06-26 14:14:19 Re: Linphone 3.1.2 Error
Cameron Barfield (UNITED STATES)
Message: 76405
Rob, I noticed those warnings as well. I'm guessing that the newest linphone is built against/for a newer version of Alsa.
We had a somewhat similar problem with linphone 1.6.0 when we were using ADI's 2008 branch. There were some different Alsa error messages and everything would eventually segfault. These problems weren't consistently after X number of calls, though. They randomly occured anywhere between 200 and 500 calls and appeared to be due to a memory leak in the old version of Linphone and/or exosip.
QuoteReplyEditDelete
2009-06-26 16:05:27 Re: Linphone 3.1.2 Error
Cameron Barfield (UNITED STATES)
Message: 76407
Someone on the linphone-developers mailing list recommended running lsof. I did and saw over 1000 UDP sockets listed.I ran a Wireshark trace and the port numbers listed by lsof correspond with the RTP ports in the trace.
I added some more debug printouts and rtp_session_destroy() is being called and the calls to close() for the sockets are succeeding.
Why wouldn't the sockets actually close, though?
QuoteReplyEditDelete
2009-06-26 16:35:19 Re: Linphone 3.1.2 Error
Rob Maris (GERMANY)
Message: 76410
Why not recreate a linphone3.1.1 subdirectory into user/linphone and tempoarily change the first line in the local makefile? Perhaps you'll also find a difference in the UDP behaviour...
-Rob
QuoteReplyEditDelete
2009-06-26 17:18:09 Re: Linphone 3.1.2 Error
Cameron Barfield (UNITED STATES)
Message: 76413
That is something to do, but I'm pretty well set on trying to figure out why the sockets aren't closing even though the close() calls are succeeding.
QuoteReplyEditDelete
2009-06-29 14:54:51 Re: Linphone 3.1.2 Error
Cameron Barfield (UNITED STATES)
Message: 76479
It's a bug in Linphone.
The sockets used to discovery the MTU (mediastreamer2/src/mtu.c) are never closed.
I've submitted a patch to the Linphone developers' mailing list, but I thought I'd post it here, too, in case anyone is interested.
What's the standard format for patches here? This one can be applied with -p0 in linphone-3.1.2/mediastreamer2/src
mtu.patch
QuoteReplyEditDelete
2009-06-29 15:06:11 Re: Linphone 3.1.2 Error
Mike Frysinger (UNITED STATES)
Message: 76480
-Nurp are the standard options in patches. most people prefer -p1 format, but -p0 isnt typically rejected.
QuoteReplyEditDelete
2009-06-30 07:02:41 Re: Linphone 3.1.2 Error
Rob Maris (GERMANY)
Message: 76519
Good job...
One remark: mediastreamer2 is also present in /lib. Since speex is also referred to from the library, it should make sense that mediastreamer2 no longer included within linphone sources. I'll check the opinion of the linphone developer.
-Rob
QuoteReplyEditDelete
2009-06-30 13:18:15 Re: Linphone 3.1.2 Error
Mike Frysinger (UNITED STATES)
Message: 76536
the problem is that they are pretty bad in making releases in lock step, so often you must use the mediastreamer that is bundled with the linphone release because there is no standalone mediastreamer library that'll work.
i would prefer to always be able to build mediastreamer sep from linphone ...
QuoteReplyEditDelete
2009-12-21 02:26:49 Re: Linphone 3.1.2 Error
Barry Song (CHINA)
Message: 83771
>However, upon udate from 3.1.1 to 3.1.2 I noticed two warnings upon every linphone start.
>root: /> linphonec
>NLS disabled.
>ALSA lib ../../alsa-lib-1.0.18/src/conf.c:3952:(snd_config_expand) Unknown parameters 0
>ALSA lib ../../../alsa-lib-1.0.18/src/control/control.c:909:(snd_ctl_open_noupdate) Invalid CTL default:0
The warning comes from "alsa_mixer_open" in mediastreamer2/src/alsa.c:
static MSSndCard * alsa_card_new(int id)
{
...
/* remove trailing spaces from card name */
char *pos1, *pos2;
pos1=ms_strdup(name);
pos2=pos1+strlen(pos1)-1;
for (; pos2>pos1 && *pos2==' '; pos2--) *pos2='\0';
obj->name=pos1;
ad->pcmdev=ms_strdup_printf("default:%i",id);
ad->mixdev=ms_strdup_printf("default:%i",id);
{
snd_mixer_t *mixer;
mixer = alsa_mixer_open(ad->mixdev);
if (mixer==NULL) {
ms_free(ad->mixdev);
ad->mixdev=ms_strdup_printf("hw:%i",id);
} else {
alsa_mixer_close(mixer);
}
}
}
linphone try to use name like "default:0" to open and attach mixer. If fail, it will rename mixer to hw:0. If the warning in alsalib doesn't matter.
QuoteReplyEditDelete