dgorski / app_tdd

TDD Module for Asterisk
3 stars 2 forks source link

Backtrace when invoking TddRx #5

Closed InterLinked1 closed 2 years ago

InterLinked1 commented 2 years ago

I think this has only been happening since the most recent update a week ago or so, but I'm getting a backtrace (which doesn't crash Asterisk) every time TddRx is called.

e.g.:

[2021-12-17 00:30:27]     -- Executing [711@redacted:1] TddRx("IAX2/redacted-14040", "b(8)") in new stack
[2021-12-17 00:30:27]   == Begin MixMonitor Recording IAX2/redacted-14040
[2021-12-17 00:30:27] ERROR[10000][C-00000065]: json.c:607 ast_json_vpack: Error building JSON from '{s: s, s: s}': NULL string.
[2021-12-17 00:30:27] ERROR[10000][C-00000065]:   Got 9 backtrace records
# 0: /usr/sbin/asterisk(ast_json_pack+0x94) [0x5625880b2e44]
# 1: /usr/lib/asterisk/modules/app_tdd.so(+0x46fa) [0x7f5d688cd6fa]
# 2: /usr/sbin/asterisk(pbx_exec+0xda) [0x5625880e7cba]
# 3: /usr/sbin/asterisk(+0x130469) [0x5625880dc469]
# 4: /usr/sbin/asterisk(+0x132053) [0x5625880de053]
# 5: /usr/sbin/asterisk(+0x13370b) [0x5625880df70b]
# 6: /usr/sbin/asterisk(+0x1b3f3c) [0x56258815ff3c]
# 7: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7f5d8aeb5fa3]
# 8: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7f5d8aa8c4cf]
dgorski commented 2 years ago

This is related to the new options processing, specifically the correlation option. It looks like the test was inverted in the destroy callback. I'm not sure why I didn't see this in testing but it was wrong and I've fixed it.

https://github.com/dgorski/app_tdd/commit/c7bbec370953d1d359fb14bb1b6a9de001d071f4

InterLinked1 commented 2 years ago

Are you sure this issue has been fixed? I noticed I was still seeing it, and after downloading master and running just now (and yes, I unloaded/loaded the module), I still see this:

[2021-12-25 14:49:32] ERROR[32164][C-0000015e]:   Got 9 backtrace records
# 0: /usr/sbin/asterisk(ast_json_pack+0x94) [0x55fd5dabae44]
# 1: /usr/lib/asterisk/modules/app_tdd.so(+0x46ea) [0x7fa5d6a476ea]
# 2: /usr/sbin/asterisk(pbx_exec+0xda) [0x55fd5daefcba]
# 3: /usr/sbin/asterisk(+0x130469) [0x55fd5dae4469]
# 4: /usr/sbin/asterisk(+0x132053) [0x55fd5dae6053]
# 5: /usr/sbin/asterisk(+0x13370b) [0x55fd5dae770b]
# 6: /usr/sbin/asterisk(+0x1b3f2c) [0x55fd5db67f2c]
# 7: /lib/x86_64-linux-gnu/libpthread.so.0(+0x7fa3) [0x7fa5f9032fa3]
# 8: /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fa5f8c094cf]

I think there's something else here that's still not quite right, so this issue should be reopened.