pjproject icon indicating copy to clipboard operation
pjproject copied to clipboard

../src/pj/lock.c:179: pj_lock_acquire: Assertion `lock != ((void *)0)' failed.

Open wahjrzd opened this issue 3 years ago • 1 comments

Describe the bug

when sip via tcp, open socket ,like the socket immediately close

Steps to reproduce

Can't be reproduced in debug.

PJSIP version

2.11.1

Context

os: CentOS Linux release 7.9.2009 (Core)

complie settings:./configure --disable-resample --disable-pjsua2 --disable-sound --disable-video --disable-sdl
--disable-ffmpeg --disable-vpx --disable-ipp --disable-ssl
--disable-small-filter --disable-large-filter --disable-speex-aec --disable-g711-codec
--disable-l16-codec --disable-gsm-codec --disable-g722-codec --disable-g7221-codec
--disable-speex-codec --disable-ilbc-codec --disable-srtp
--disable-libyuv --disable-libwebrtc --prefix=$(pwd)/mypj CFLGAS='-fPIC'

Log, call stack, etc

backtrace:

0x00007f30e5b59387 in raise () from /lib64/libc.so.6
0x00007f30e5b5aa78 in abort () from /lib64/libc.so.6
0x00007f30e5b521a6 in __assert_fail_base () from /lib64/libc.so.6
0x00007f30e5b52252 in __assert_fail () from /lib64/libc.so.6
0x00000000005fbc58 in pj_lock_acquire ()
0x00000000005dd53e in tp_state_callback ()
0x00000000005e3a19 in on_accept_complete ()
0x00000000005f8e74 in ioqueue_on_accept_complete ()
0x00000000005f4962 in ioqueue_dispatch_read_event ()
0x00000000005f5fff in pj_ioqueue_poll ()
0x00000000005d8db7 in pjsip_endpt_handle_events2 ()

wahjrzd avatar May 26 '22 01:05 wahjrzd

09:24:16.779 sip_endpoint.c !Processing incoming message: Request msg MESSAGE/cseq=20 (rdata0x7fa32c005e38) 09:24:16.779 endpoint .Response msg 200/MESSAGE/cseq=20 (tdta0x7fa318007d68) created 09:24:16.779 tdta0x7fa318007d68 .Destroying txdata Response msg 200/MESSAGE/cseq=20 (tdta0x7fa318007d68) 09:24:19.277 tcptp:5060 !TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57894, sock=57 09:24:19.277 tcps0x7fa32c00e058 TCP server transport created 09:24:19.278 tcptp:5060 TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57896, sock=58 09:24:19.278 tcps0x7fa32c010a88 TCP server transport created 09:24:19.278 tcps0x7fa32c00e058 TCP connection closed 09:24:19.278 sip_transport.c Transport tcps0x7fa32c00e058 shutting down, force=0 09:24:19.278 tcps0x7fa32c010a88 TCP connection closed 09:24:19.278 sip_transport.c Transport tcps0x7fa32c010a88 shutting down, force=0 09:24:19.278 tcps0x7fa32c00e058 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:19.278 tcps0x7fa32c010a88 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:23.395 sip_endpoint.c Processing incoming message: Request msg MESSAGE/cseq=20 (rdata0x7fa32c009598) 09:24:23.395 endpoint .Response msg 200/MESSAGE/cseq=20 (tdta0x7fa32c00c188) created 09:24:23.395 tdta0x7fa32c00c188 .Destroying txdata Response msg 200/MESSAGE/cseq=20 (tdta0x7fa32c00c188) 09:24:25.278 tcptp:5060 !TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57940, sock=57 09:24:25.278 tcps0x7fa340007728 TCP server transport created 09:24:25.278 tcptp:5060 TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57942, sock=58 09:24:25.278 tcps0x7fa340008f38 TCP server transport created 09:24:25.279 tcps0x7fa340007728 TCP connection closed 09:24:25.279 sip_transport.c Transport tcps0x7fa340007728 shutting down, force=0 09:24:25.279 tcps0x7fa340008f38 TCP connection closed 09:24:25.279 sip_transport.c Transport tcps0x7fa340008f38 shutting down, force=0 09:24:25.279 tcps0x7fa340007728 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:25.279 tcps0x7fa340008f38 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:31.280 tcptp:5060 TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57974, sock=57 09:24:31.280 tcps0x7fa340007728 TCP server transport created 09:24:31.280 tcptp:5060 TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:57976, sock=58 09:24:31.280 tcps0x7fa340008f38 TCP server transport created 09:24:31.280 tcps0x7fa340007728 TCP connection closed 09:24:31.280 sip_transport.c Transport tcps0x7fa340007728 shutting down, force=0 09:24:31.280 tcps0x7fa340008f38 TCP connection closed 09:24:31.280 sip_transport.c Transport tcps0x7fa340008f38 shutting down, force=0 09:24:31.280 tcps0x7fa340007728 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:31.280 tcps0x7fa340008f38 TCP transport destroyed with reason 120104: Connection reset by peer 09:24:33.807 sip_endpoint.c !Processing incoming message: Request msg MESSAGE/cseq=20 (rdata0x7fa340007728) 09:24:33.807 endpoint .Response msg 200/MESSAGE/cseq=20 (tdta0x7fa318005e18) created 09:24:33.807 tdta0x7fa318005e18 .Destroying txdata Response msg 200/MESSAGE/cseq=20 (tdta0x7fa318005e18) 09:24:34.193 sip_endpoint.c !Processing incoming message: Request msg MESSAGE/cseq=20 (rdata0x7fa318005d98) 09:24:34.193 endpoint .Response msg 200/MESSAGE/cseq=20 (tdta0x7fa3400053a8) created 09:24:34.193 tdta0x7fa3400053a8 .Destroying txdata Response msg 200/MESSAGE/cseq=20 (tdta0x7fa3400053a8) 09:24:37.280 tcptp:5060 !TCP listener 10.18.104.201:5060: got incoming TCP connection from 10.18.100.170:58018, sock=57 09:24:37.280 tcps0x7fa32c00c108 TCP server transport created 09:24:37.280 tcps0x7fa32c00c108 !TCP connection closed 09:24:37.281 sip_transport.c Transport tcps0x7fa32c00c108 shutting down, force=0 09:24:37.281 tcps0x7fa32c00c108 TCP transport destroyed with reason 120104: Connection reset by peer GB35114Server: ../src/pj/lock.c:179: pj_lock_acquire: Assertion `lock != ((void *)0)' failed.

wahjrzd avatar May 30 '22 01:05 wahjrzd

good good ,this also fix #3161 , thanks ^-^

wahjrzd avatar May 04 '23 01:05 wahjrzd

Thanks for the confirmation. I have updated the PR description to mention #3161 as well.

sauwming avatar May 04 '23 09:05 sauwming