[Kamailio-Devel] [ openser-Bugs-2082416 ] Seg fault in presence module

SourceForge.net noreply at sourceforge.net
Tue Sep 2 10:58:40 CEST 2008


Bugs item #2082416, was opened at 2008-08-29 13:19
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2082416&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver 1.3.x
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Henning Westerholt (henningw)
Summary: Seg fault in presence module

Initial Comment:
Version 1.3.2

Report by bn-spam at nesbitt dot org

After running for a month or so using the presence module:

Program terminated with signal 11, Segmentation fault.

(gdb) bt
#0  0x0014ccff in handle_subscribe (msg=0x8268da0, str1=0x0, str2=0x0) at subscribe.c:687
#1  0x080527e4 in do_action (a=0x8169c60, msg=0x8268da0) at action.c:821
#2  0x080543f6 in run_action_list (a=0x8169c60, msg=0x8268da0) at action.c:132
#3  0x08054236 in do_action (a=0x8169d98, msg=0x8268da0) at action.c:700
#4  0x080543f6 in run_action_list (a=0x8169d98, msg=0x8268da0) at action.c:132
#5  0x08054236 in do_action (a=0x816adc0, msg=0x8268da0) at action.c:700
#6  0x080543f6 in run_action_list (a=0x816adc0, msg=0x8268da0) at action.c:132
#7  0x08054236 in do_action (a=0x816ae18, msg=0x8268da0) at action.c:700
#8  0x080543f6 in run_action_list (a=0x8167470, msg=0x8268da0) at action.c:132
#9  0x08054719 in run_top_route (a=0x8167470, msg=0x8268da0) at action.c:112
#10 0x0808c84b in receive_msg (
    buf=0x80f876e4 "SUBSCRIBE sip:10.0.5.33:5060 SIP/2.0\r\nVia: SIP/2.0/TCP 10.0.5.74:5060;branch=z9hG4bKk07lgi30385hfesfi501cj0000gp0.1\r\nMax-Forwards: 68\r\nContact: <sip:9827022-lr8qi4ll46rf1 at 10.0.5.74:5060;transport=tcp>"..., len=876, rcv_info=0x80f87680) at receive.c:156
#11 0x080ba2ff in tcp_read_req (con=0x80f87670, bytes_read=0xbff53564) at tcp_read.c:495
#12 0x080bac9e in handle_io (fm=Variable "fm" is not available.
) at tcp_read.c:761
#13 0x080bcff1 in tcp_receive_loop (unix_sock=24) at io_wait.h:715
#14 0x080b890f in tcp_init_children (chd_rank=0x81381fc) at tcp_main.c:1701
#15 0x08068e55 in main (argc=3, argv=0xbff53954) at main.c:886

Looking at modules/presence/subscribe.c around line 687:

 if(parsed_event->parsed!= EVENT_DIALOG &&subs.pres_uri.s)

but:

(gdb) print parsed_event
$15 = (event_t *) 0x0

Backtracking a bit more, it turns out that a goto bad_event: happened because there was no parsed_event.  This falls through to the error: section, which should probably check for a null before handling it as in:

 if(parsed_event && parsed_event->parsed!= EVENT_DIALOG &&subs.pres_uri.s)

----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2008-09-02 08:58

Message:
Logged In: YES 
user_id=337916
Originator: NO

Hi,

i committed the change you suggested to the 1.3 branch. In the 1.4 and
trunk there was already another fix commited. Thanks for the report, please
re-open if this problem happen again.

Henning

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2082416&group_id=139143



More information about the Devel mailing list