Project

General

Profile

Bug #802

smsbox crashes with error lock: Assertion `list != NULL' failed

Added by Ivan Shcherbak 4 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
06/14/2019
Due date:
% Done:

0%

Estimated time:
Affected version:
1.4.5

Description

Kannel 1.4.5

Sometimes one of our production smsboxes gets crashed with the following panic errors in log:

2019-06-14 02:31:37 [128771] [9] PANIC: gwlib/list.c:595: lock: Assertion `list != NULL' failed.
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox(gw_backtrace+0xae) [0x43e6be]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox(gw_panic+0x15f) [0x43e82f]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox() [0x43f9cc]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox(gwlist_delete_equal+0x1a) [0x44006a]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox() [0x44a9d5]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox() [0x45084f]
2019-06-14 02:31:37 [128771] [9] PANIC: /usr/sbin/smsbox() [0x43b7c6]
2019-06-14 02:31:37 [128771] [9] PANIC: /lib64/libpthread.so.0(+0x7e25) [0x7f71ef308e25]
2019-06-14 02:31:37 [128771] [9] PANIC: /lib64/libc.so.6(clone+0x6d) [0x7f71ee45134d]

see backtrace:

[root@kannel1 kannel]# addr2line -e /usr/local/sbin/smsbox 0x43e6be 0x43e82f 0x43f9cc 0x44006a 0x44a9d5 0x45084f 0x43b7c6
/usr/src/gateway-1.4.5/gwlib/log.c:608
/usr/src/gateway-1.4.5/gwlib/log.c:644
/usr/src/gateway-1.4.5/gwlib/list.c:595 (discriminator 1)
/usr/src/gateway-1.4.5/gwlib/list.c:271
/usr/src/gateway-1.4.5/gwlib/http.c:856
/usr/src/gateway-1.4.5/gwlib/fdset.c:354
/usr/src/gateway-1.4.5/gwlib/gwthread-pthread.c:393 (discriminator 2)

looks like in some condition list = dict_get(conn_pool, key); returns NULL in gwlib/http.c:check_pool_conn

This happens time to time once a week and sometimes can not happen a few months. Can't assume the reason of this though.

Guys please fix or suggest how to fix this. Thanks in advance.

Fix_802.patch (1.4 KB) Fix_802.patch Ivan Shcherbak, 06/14/2019 06:18 PM

History

#1 Updated by Ivan Shcherbak 4 months ago

If this fix is appropriate, just let me know and please apply to your code. Thanks.

#2 Updated by Alexander Malysh 4 months ago

  • Status changed from New to Resolved

Hi,

applied to SVN.

Thanks,
Alex

Also available in: Atom PDF