linux core分析---TLS读取异常

TLS概念

TLS 协议主要用于保护网络通信中的数据安全,工作过程主要分为握手阶段和数据传输阶段,绝大多数的 TLS 通信都是基于 TCP 协议的

core 线程调用栈

命令: ./gdb 进程名称 core

查看堆栈: bt
ore was generated by `./SMGSvr'.
Program terminated with signal 6, Aborted.
#0  0x400f5170 in pthread_join () from /lib/libpthread.so.0

Thread 1 (Thread 0x410dc000 (LWP 1140)):
#0  0x400f5170 in pthread_join () from /lib/libpthread.so.0
#1  0x000da0c4 in WaitForSingleObject (hHandle=-1073741826, dwMilliseconds=4294967295) at compat.cpp:213
#2  0x000b60a4 in SMGRun () at SMGManager.cpp:2488
#3  0x00016558 in MySvrMain (argc=1, argv=0xbee65e34) at SMGSvr.cpp:23
#4  0x000f1fc0 in Svrmain (argc=1, argv=0xbee65e34) at LinuxService.cpp:74
#5  0x000f1ff4 in Run (argc=1, argv=0xbee65e34) at LinuxService.cpp:79
#6  0x000f203c in main (argc=1, argv=0xbee65e34) at LinuxService.cpp:89

查看所有线程堆栈:

thread apply all bt


Thread 20 (Thread 0x5d8ff460 (LWP 1284)):
#0  0x41036e94 in nanosleep () from /lib/libc.so.6
#1  0x41064138 in usleep () from /lib/libc.so.6
#2  0x40224358 in BoardClock (lpParam=0x0) at shssm.cpp:891
#3  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#4  0x4106a588 in ?? () from /lib/libc.so.6
#5  0x4106a588 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 19 (Thread 0x4524b460 (LWP 1266)):
#0  0x41036e94 in nanosleep () from /lib/libc.so.6
#1  0x41064138 in usleep () from /lib/libc.so.6
#2  0x433aa6dc in thread_start_handle_msg (arg=0x0) at octvoc.c:10682
#3  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#4  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
#5  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 18 (Thread 0x44236460 (LWP 1264)):
#0  0x41036e94 in nanosleep () from /lib/libc.so.6
#1  0x41064138 in usleep () from /lib/libc.so.6
#2  0x433aa374 in thread_start (arg=0x0) at octvoc.c:10594
#3  0x400f3e64 in start_thread () from /lib/libpthread.so.0
Thread 5 (Thread 0x597a5460 (LWP 1273)):
#0  0x400fbfb4 in #4  0x4106a588 in ?? () from /lib/libc.so.6r
ead () from /lib/libpthread.so.0
#1  0x502822cc in sock_read () from /usr/lib/libSynSip.so
#2  0x50280c7c in BIO_read () from /usr/lib/libSynSCannot access memory at address 0x0ip.so

#3  0x502605f8 in ssl3_read_n () from /usr/lib/libSynSip.so
#4  0x50261454 in ssl3_read_bytes () from /usr/lib/libSynSip.so
#5  0x5025ecc8 in ssl3_read_internal () from /usr/lib/libSynSip.so
#6  0x5025ed54 in ssl3_read () from /usr/lib/libSynSip.so
#7  0x50243024 in SSL_read () from /usr/lib/libSynSip.so
#8  0x501753b8 in tls_tl_read_me#5  0x4106a588 in ?? () from /lib/libc.so.6s
sage (osip_fdset=0x597a4cc8) at eXtl_tls.c:1009
#9  0x501f7554 in SipSocketReadMessage (max_message_nb=1, sec_max=0, usec_max=100000) at udp.c:3097Cannot access memory at address 0x0
#10 0
x501fcaf8 in SipStackInternalBacktrace stopped: previous frame identical to this frame (corrupt stack?)C
heckTimer () at SynConf.cpp:412
#11 0x5020fd64 in SipStackScheduleThread (arg=0x0) at SynStack.cpp:578
#12 0x400f3e64 in start_thread ()
 from /lib/Thread 17 (Thread 0x65c88460 (LWP 1327)):l
ibpthread.so.0
#13 0x4106a588 in ?? () from /lib/libc.so.6
#0  0x400fadd4 in do_futex_wait () from /lib/libpthread.so.0
#1  0x400faea0 in sem_wait@@GLIBC_2.4 () from /lib/libpthread.so.0
#2  0x000ded04 in WaitSemaphore (hSemaphore=2, dwMilliseconds=0) at compat.cpp:2501
#3  0x000b37e4 in OnDiskWork (arg=0x0) at SMGManager.cpp:1254
#4  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#5  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
#6  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 16 (Thread 0x66488460 (LWP 1328)):
#0  0x41036e94 in nanosleep () from /lib/libc.so.6
#1  0x41064138 in usleep () from /lib/libc.so.6
#2  0x0004993c in ProcessOtherThing (arg=0x0) at ChManger.cpp:5420
#3  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#4  0x4106a588 in ?? () from /lib/libc.so.6
#5  0x4106a588 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 15 (Thread 0x5ceff460 (LWP 1283)):
#0  0x400fba04 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x400f6244 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x501cc9e0 in osip_mutex_lock (_mut=0x1486ca20) at port_sema.c:194
#3  0x502099d0 in SipStackInternalLock () at Synsip.cpp:37
#4  0x5020145c in SynSipEventGetEvent (dwSec=0, dwMilliSec=50, phEvent=0x5cefedb0) at SynEvent.cpp:344
#5  0x4029e964 in CbSynSipEventGetEvent (dwSec=0, dwMilliSec=50, phEvent=0x5cefedb0) at SipExport.cpp:2173
#6  0x402c4cb4 in ProcessSipEvent () at SipLogical.cpp:2644
#7  0x402a7020 in SipEventHandleThread (lpParam=0x0) at SipInterface.cpp:1384
#8  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#9  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
#10 0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 14 (Thread 0x6446b460 (LWP 1321)):
#0  0x400fba04 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x400f6244 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x4041cd28 in EnterCriticalSection (cri_mutex=0x40c6ec44 <csSipGlobalLock>) at compat.cpp:1072
#3  0x401ce804 in SmartLock::SLock (this=0x64468e2c) at SipExport.h:34
#4  0x402a91b0 in SipIcHangup (pCh=0x46ceac08) at SipInterface.cpp:2040
#5  0x403786d8 in SsmHangup (ch=448) at ssmapi.cpp:12101
#6  0x000e452c in CtiHangup (nCh=448) at CtiOp.cpp:2402
#7  0x0007f650 in IPHandleCallOutCh (pgwCh=0x606e6f08) at ChManger.cpp:19338
#8  0x00069a7c in HandleCallOutCh (pgwCh=0x606e6f08) at ChManger.cpp:13744
#9  0x0006befc in IPChStateChange (nCh=448, nDriverState=0) at ChManger.cpp:14656
#10 0x00058e94 in ChStateChange (nCh=448, nState=0) at ChManger.cpp:9734
#11 0x00058dd8 in ChStateChange (nCh=448, nState=0, nAppend=24, dwParam=9830400) at ChManger.cpp:9719
#12 0x000e89c0 in ChStateOp (nCh=448, nState=0, nAppend=24, dwParam=9830400) at CtiOp.cpp:3877
#13 0x000e7860 in SynwayEventCallback (pEvent=0x6446ad90) at CtiOp.cpp:3928
#14 0x4018cbc4 in EventCallbackProcA (lpParameter=0x0) at event.cpp:3539
#15 0x400f3e64 in start_thread () from /lib/libpthread.so.0
#16 0x4106a588 in ?? () from /lib/libc.so.6
#17 0x4106a588 in ?? () from /lib/libc.so.6
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 13 (Thread 0x5a05f460 (LWP 1274)):
#0  0x400fba04 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x400f6244 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x501cc9e0 in osip_mutex_lock (_mut=0x1486ca20) at port_sema.c:194
#3  0x502099d0 in SipStackInternalLock () at Synsip.cpp:37
#4  0x501fcb48 in SipCheckTimerOut () at SynConf.cpp:419
#5  0x5020fe18 in SipStackTmOutThread (arg=0x0) at SynStack.cpp:594
#6  0x400f3e64 in start_thread () from /lib/libpthread.so.0
#7  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
#8  0x4106a588 in ?? () from /lib/libc.so.6
Cannot access memory at address 0x0
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Thread 12 (Thread 0x5ea0e460 (LWP 1286)):
#0  0x400fba04 in __lll_lock_wait () from /lib/libpthread.so.0
#1  0x400f6244 in pthread_mutex_lock () from /lib/libpthread.so.0
#2  0x501cc9e0 in osip_mutex_lock (_mut=0x1486ca20) at port_sema.c:194
#3  0x502099d0 in SipStackInternalLock () at Synsip.cpp:37
#4  0x50208560 in SynSipMsgTerminatedCall (dwCallID=398821, dwDialogID=398822) at SynMsg.cpp:1066
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

八月的雨季997

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值