Possible race condition when clear_old_concat_parts is called

"Vincent CHAVANIS" <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <079b01c80eb8$b18e6650$9600a8c0@vince>
Only when sms-combine-concatenated-mo is set to 0,
I experienced a segfault in bearbox (bt full traces bellow)
The line where it crashes is :  keys = dict_keys(incoming_concat_msgs) 
(gw/bb_smscconn.c)
I've added a printf after it and it segfaults without showing my debug 
message,
so we can be sure dict_keys segfault.
Maybe we can have here a possible race condition.

@Paul,Alex, have you experiencing that issue before ?

Vincent.

refs:
2007-10-10 15:43:50.191 [22125] [67] DEBUG: HTTP[SMS_7]: Destroying client 
information
2007-10-10 15:43:50.192 [22125] [101] DEBUG: boxc_receiver: got ack
2007-10-10 15:43:51.001 [22125] [93] DEBUG: clear_old_concat_parts called
Erreur de segmentation (core dumped)


Program terminated with signal 11, Segmentation fault.
#0  0x000000000049622f in lock (dict=0x0) at gwlib/dict.c:127
127         mutex_lock(dict->lock);
(gdb) bt full
#0  0x000000000049622f in lock (dict=0x0) at gwlib/dict.c:127
        __func__ = "lock"
#1  0x0000000000496990 in dict_keys (dict=0x0) at gwlib/dict.c:355
        list = (List *) 0x941a20
        item = (Item *) 0x470ce2a2
        i = 2049294384
        j = 4858217
        __func__ = "dict_keys"
#2  0x0000000000417b25 in clear_old_concat_parts () at gw/bb_smscconn.c:1263
        keys = (List *) 0x0
        key = (Octstr *) 0x7a25c0f0
        __func__ = "clear_old_concat_parts"
#3  0x0000000000415d17 in sms_router (arg=0x0) at gw/bb_smscconn.c:527
        msg = (Msg *) 0x0
        startmsg = (Msg *) 0x0
        newmsg = (Msg *) 0x0
        ret = 0
        concat_mo_check = 1192029069
#4  0x00000000004988e4 in new_thread (arg=0x98eb40) at 
gwlib/gwthread-pthread.c:362
        ret = 0
        p = (struct new_thread_args *) 0x98eb40
#5  0x0000003f312062f7 in start_thread () from /lib64/libpthread.so.0
No symbol table info available.
#6  0x0000003f306d0fbd in clone () from /lib64/libc.so.6
No symbol table info available.

--
Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
Service Technique/Reseau - NOC
Developpement SMS/MMS/Kiosques
http://www.telemaque.fr/
[email protected]
Tel : +33 4 92 90 99 84 (fax 9142)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.