QTcpSocket 线程安全吗

quanwei9958 发布于 2015/02/13 19:41
阅读 855
收藏 0

  如题所示,程序运行很久之后就莫名其妙地崩溃了,堆栈定位到libQtCore.so.4里了

  具体堆栈信息如下

  

(gdb) info thread
  Id   Target Id         Frame 
  14   Thread 0xb1624b40 (LWP 2748) 0xb7729424 in __kernel_vsyscall ()
  13   Thread 0xb2892b40 (LWP 2747) 0xb7729424 in __kernel_vsyscall ()
  12   Thread 0xb3425b40 (LWP 2746) 0xb7729424 in __kernel_vsyscall ()
  11   Thread 0xad49fb40 (LWP 2752) 0xb7729424 in __kernel_vsyscall ()
  10   Thread 0xab89bb40 (LWP 12553) 0xb7729424 in __kernel_vsyscall ()
  9    Thread 0xaa098b40 (LWP 12557) 0xb7729424 in __kernel_vsyscall ()
  8    Thread 0xb0cffb40 (LWP 12552) 0xb7729424 in __kernel_vsyscall ()
  7    Thread 0xaf0fdb40 (LWP 2750) 0xb7729424 in __kernel_vsyscall ()
  6    Thread 0xb5f8d740 (LWP 2745) 0xb7729424 in __kernel_vsyscall ()
  5    Thread 0xaa899b40 (LWP 12556) 0xb7729424 in __kernel_vsyscall ()
  4    Thread 0xa96fcb40 (LWP 12558) 0xb7729424 in __kernel_vsyscall ()
  3    Thread 0xab09ab40 (LWP 12554) 0xb7729424 in __kernel_vsyscall ()
  2    Thread 0xac49db40 (LWP 12555) 0xb7729424 in __kernel_vsyscall ()
* 1    Thread 0xacc9eb40 (LWP 12551) __memmove_ssse3 ()
    at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:2579
(gdb) bt
#0  __memmove_ssse3 () at ../sysdeps/i386/i686/multiarch/memcpy-ssse3.S:2579
#1  0x00000068 in ?? ()
#2  0xb6ab9000 in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)



不过相信没人会耐心看,而且就算看也看不到什么的信息,只知道发生SIGSEGV了,我就想问一下QtcpSocket是线程安全的吗?

加载中
0
t
quanwei9958
quanwei9958
当年比较年轻,使用多线程+socket方式,没注意到有异步io这种正确的姿势。
返回顶部
顶部