Here is the patch to fix this issue (thanks Paul)
diff -rauw /gateway-cvs/gw/bb_smscconn.c /gateway/gw/bb_smscconn.c
--- /gateway-cvs/gw/bb_smscconn.c 2007-06-12 16:08:15.000000000 +0200
+++ /gateway/gw/bb_smscconn.c 2007-10-15 10:40:57.000000000 +0200
@@ -1254,7 +1254,7 @@
Octstr *key;
/* not initialised, go away */
- if (incoming_concat_msgs != NULL)
+ if (incoming_concat_msgs == NULL)
return;
debug("bb.sms.splits", 0, "clear_old_concat_parts called");
Vincent
----- Original Message -----
From: "Vincent CHAVANIS" <[EMAIL PROTECTED]>
To: <devel@kannel.org>
Cc: "Paul Bagyenda" <[EMAIL PROTECTED]>
Sent: Monday, October 15, 2007 1:19 AM
Subject: Possible race condition when clear_old_concat_parts is called
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)