[maemo-developers] [maemo-developers] Sofia sip on maemo

From: maemo nokia maemo_team at india.com
Date: Thu Nov 9 11:50:28 EET 2006
Hi

We have compiled & installed the sofia sip library on the
scratchbox. We have been tryig to get sofsip-client running.
Everytime after the client registration, a segmentation fault
occurs.

We are attaching relevant logs. The crash occurs in stun_dns.c:91.

The error reads as follows:

hn-wm.c:302,hn_wm_top_service() ### Failed to read memory limits,
using scratchbox ??
hn-wm.c:335,hn_wm_top_service() unable to find service name 'xterm'
in running wins
hn-wm.c:336,hn_wm_top_service() Thus launcing via osso_manager_launch()
hn-wm.c:1210,hn_wm_dbus_method_call_handler() Checking if service:
'com.nokia.xterm' is watchable
hn-wm.c:1225,hn_wm_dbus_method_call_handler() Showing Launchbanner...

Program received signal SIGSEGV, Segmentation fault.
0xb7f7144e in priv_sres_cb (self=0x8081488, q=0x8082a80, answer=0x0)
at stun_dns.c:91
91        for (i = 0; answer[i] != NULL; i++) {



Do we have a patch to solve this problem?

Thanks


-- 

Search for products and services at: 
http://search.mail.com
-------------- next part --------------
(gdb) set args  sip:abc at 172.20.211.174

(gdb) where

#0  0xb7f7744e in priv_sres_cb (self=0x8081488, q=0x8082a80, answer=0x0) at stun_dns.c:91

#1  0xb7f59b64 in sres_query_report_error (q=0x8082a80, answers=0x0) at sres.c:2671

#2  0xb7f5a1ff in sres_resend_dns_query (res=0x80896d8, q=0x8082a80, timeout=1) at sres.c:2762

#3  0xb7f5a345 in sres_resolver_timer (res=0x80896d8, dummy=-1) at sres.c:2714

#4  0xb7f5e928 in sres_sofia_timer (magic=0x807c250, t=0x807c610, srs=0xffffffff) at sresolv.c:322

#5  0xb7f6738d in su_timer_expire (timers=0x807418c, timeout=0xbf8d2714, now={tv_sec = 3371884568, tv_usec = 438999}) at su_timer.c:556

#6  0xb7fb3421 in su_source_dispatch (gs=0x80740c0, callback=0, user_data=0xffffffff) at su_source.c:404

#7  0xb7b13b37 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0

#8  0xb7b154d5 in g_main_context_acquire () from /usr/lib/libglib-2.0.so.0

#9  0xb7b157fa in g_main_loop_run () from /usr/lib/libglib-2.0.so.0

#10 0x0804d976 in main (ac=-1, av=0xffffffff) at sofsip_cli.c:203

(gdb) n

The program is not being run.

(gdb) r

Starting program: /targets/SDK_PC/usr/local/bin/sofsip_cli sip:abc at 172.20.211.174

warning: Cannot initialize thread debugging library: unknown thread_db error '22'

warning: Cannot initialize thread debugging library: unknown thread_db error '22'

warning: Cannot initialize thread debugging library: unknown thread_db error '22'

warning: Cannot initialize thread debugging library: unknown thread_db error '22'

sofsip_cli[6420]: GLIB MESSAGE default - This program is linked against GStreamer 0.10.4

sofsip_cli[6420]: GLIB DEBUG default - priv_verify_required_elements:191

sofsip_cli[6420]: GLIB MESSAGE default - Verifying GST element "mulawenc" -> FAILED

sofsip_cli[6420]: GLIB MESSAGE default - Verifying GST element "mulawdec" -> FAILED

sofsip_cli[6420]: GLIB MESSAGE default - Verifying GST element "dynudpsink" -> OK

sofsip_cli[6420]: GLIB MESSAGE default - Verifying GST element "udpsrc" -> OK

sofsip_cli[6420]: GLIB WARNING ** default - Some required gstreamer elements not found on the system, cannot initialize the GStreamer-RTP media subsystem!

sofsip_cli[6420]: GLIB CRITICAL ** GLib-GObject - g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

sofsip_cli[6420]: GLIB DEBUG default - ssc_media_class_init:124

sofsip_cli[6420]: GLIB DEBUG default - ssc_media_init:167

sofsip_cli[6420]: GLIB MESSAGE default - Selecting media implementation: dummy

sofsip> UA: unknown event 'nua_r_set_params' (23): 200 OK

   ::tag_null: 0

sofsip> UA: nua_r_getparams: 200 OK

   sip::from: sip:abc at 172.20.211.174

   sip::from_str: "sip:abc at 172.20.211.174"

   nua::retry_count: 3

   nua::max_subscriptions: 20

   nua::media_enable: true

   nua::enableInvite: true

   nua::autoAlert: true

   nua::early_media: false

   nua::only183_100rel: false

   nua::autoAnswer: false

   nua::autoACK: true

   nua::invite_timer: 120

   nua::session_timer: 0

   nua::min_se: 120

   nua::session_refresher: 0

   nua::update_refresh: false

   nua::enableMessage: true

   nua::enableMessenger: false

   nua::callee_caps: false

   nua::media_features: false

   nua::service_route_enable: true

   nua::path_enable: true

   nua::refer_expires: 300

   nua::refer_with_id: true

   nua::substate: 2

   sip::supported: timer, 100rel

   sip::supported_str: "timer, 100rel"

   sip::allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE

   sip::allow_str: "INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, NOTIFY, REFER, UPDATE"

   sip::user_agent: sofia-sip/1.12.3

   sip::user_agent_str: "sofia-sip/1.12.3"

   nua::user_agent: "sofia-sip/1.12.3"

   nua::keepalive: 120000

   nua::outbound: "natify"

   nta::contact: <sip:6XK9Kam2ByepeDQD.is.invalid:5060;transport=udp>

   nta::udp_mtu: 1300

   nta::sip_t1: 500

   nta::sip_t2: 4000

   nta::sip_t4: 5000

   nta::sip_t1x64: 32000

   nta::debug_drop_prob: 0

   nta::default_proxy: <null>

   nta::aliases: <NONE>

   nta::sipflags: 2

   soa::caps_sdp: v=0

o=- 7647252399428294546 1569855897292722834 IN IP4 172.20.211.204

s=-

c=IN IP4 172.20.211.204

t=0 0

m=audio 0 RTP/AVP 0

a=rtpmap:0 PCMU/8000

   soa::caps_sdp_str: "v=0

o=- 7647252399428294546 1569855897292722834 IN IP4 172.20.211.204

s=-

c=IN IP4 172.20.211.204

t=0 0

m=audio 0 RTP/AVP 0

a=rtpmap:0 PCMU/8000

"

   soa::user_sdp: v=0

m=audio 0 RTP/AVP 0

a=rtpmap:0 PCMU/8000

   soa::user_sdp_str: "v=0

m=audio 0 RTP/AVP 0

a=rtpmap:0 PCMU/8000

"

   soa::local_sdp_str: <null>

   soa::af: 3

   soa::srtp_enable: false

   soa::srtp_confidentiality: false

   soa::srtp_integrity: false

   ::tag_null: 0



Starting sofsip-cli in interactive mode. Issue 'h' to get list of available commands.

sofsip> r

UA: REGISTER sip:abc at 172.20.211.174 - registering address to network

sofsip>

Unknown command. Type "help" for help

sofsip> tport_udp_error: No route to host (113) [icmp type=3 code=1]

        reported by [172.20.211.204]:0

nta: REGISTER (75332557): No route to host (113) with udp/[172.20.211.174]:5060

UA: REGISTER: 503 Service Unavailable

sofsip> tport_udp_error: No route to host (113) [icmp type=3 code=1]

        reported by [172.20.211.204]:0

nta_agent: tport: 172.20.211.174:5060: No route to host

tport_udp_error: No route to host (113) [icmp type=3 code=1]

        reported by [172.20.211.204]:0

nta_agent: tport: 172.20.211.174:5060: No route to host



Unknown command. Type "help" for help

sofsip>

Unknown command. Type "help" for help

sofsip> hn-wm.c:264,hn_wm_top_service()  Called with 'xterm'

hn-wm.c:302,hn_wm_top_service() ### Failed to read memory limits, using scratchbox ??

hn-wm.c:335,hn_wm_top_service() unable to find service name 'xterm' in running wins

hn-wm.c:336,hn_wm_top_service() Thus launcing via osso_manager_launch()

hn-wm.c:1210,hn_wm_dbus_method_call_handler() Checking if service: 'com.nokia.xterm' is watchable

hn-wm.c:1225,hn_wm_dbus_method_call_handler() Showing Launchbanner...



Program received signal SIGSEGV, Segmentation fault.

0xb7f7144e in priv_sres_cb (self=0x8081488, q=0x8082a80, answer=0x0) at stun_dns.c:91

91        for (i = 0; answer[i] != NULL; i++) {









The function in "stun_dns.c" :



/**

 * Internal callback used for gathering DNS replies.

 */

static void priv_sres_cb(stun_dns_lookup_t *self,

                         sres_query_t *q,

                         sres_record_t **answer)

{

  int i;



  sres_sort_answers(self->stun_sres, answer);



  /* note: picks the first ones (sort puts records with most

   *       weight at start */



-->  for (i = 0; answer[i] != NULL; i++) {        <------    GDB POINTS TO THIS LOCATION

    sres_srv_record_t *rr = (sres_srv_record_t *) answer[i]->sr_srv;

    if (rr && rr->srv_record && rr->srv_record->r_type == sres_type_srv) {

      const char *tcp_name = STUN_SRV_SERVICE_TCP;

      const char *udp_name = STUN_SRV_SERVICE_UDP;

      if ((self->stun_state & stun_dns_tls) == 0 &&

          strncmp(rr->srv_record->r_name, tcp_name, strlen(tcp_name)) == 0) {

        self->stun_tcp_target = su_strdup(self->stun_home, rr->srv_target);

        self->stun_tcp_port = rr->srv_port;

        self->stun_state |= stun_dns_tls;

        SU_DEBUG_5(("%s: stun (tcp) for domain %s is at %s:%u.\n",

                    __func__, rr->srv_record->r_name, self->stun_tcp_target, self->stun_tcp_port));

      }

      else if ((self->stun_state & stun_dns_udp) == 0 &&

               strncmp(rr->srv_record->r_name, udp_name, strlen(udp_name)) == 0) {

        self->stun_udp_target = su_strdup(self->stun_home, rr->srv_target);

        self->stun_udp_port = rr->srv_port;

        self->stun_state |= stun_dns_udp;

        SU_DEBUG_5(("%s: stun (udp) for domain %s is at %s:%u.\n",

                    __func__, rr->srv_record->r_name, self->stun_udp_target, self->stun_udp_port));

      }

    }

  }



  if (self->stun_state == stun_dns_done) {

    self->stun_cb(self, self->stun_magic);



    sres_resolver_timer(self->stun_sres, -1);

  }



  sres_free_answers(self->stun_sres, answer);

}

More information about the maemo-developers mailing list