FBSD 6 and pthread_testcancel()

Mario Hoerich lists at MHoerich.de
Fri Dec 30 13:52:46 PST 2005


[ Since this specifically mentions licq, I've CCed the licq-maintainer ]

Hi,

Since at least -BETA4, I'm experiencing "random" app-crashes
(most, if not all of them Qt/KDE-based), apparently due to problems
with pthread.  Something is *very* wrong here, but judging from
the recent pthread_testcancel()-thread, the problem might be more
than a mere pilot error.

I've now found a reproducible case: licq-1.3.2.  The previous
port (1.3.0, I think) worked perfectly fine with the exact
same environment. 

OS is 6.0-STABLE (Sat Dec 17 20:11:17 CET 2005), custom kernel.

$ licq
20:59:39: [WRN] Licq: Ignoring stale lockfile (pid 99677)
Licq Segmentation Violation Detected.
zsh: 13123 abort (core dumped)  licq

$ gdb /usr/local/bin/licq /var/core/1001-licq.core
Core was generated by `licq'.
Program terminated with signal 6, Aborted.

[[ Reading lots of symbols ]]

Loaded symbols for /libexec/ld-elf.so.1
#0  0x285330ab in pthread_testcancel () from /usr/lib/libpthread.so.2
[New Thread 0x81d5000 (runnable)]
[New Thread 0x81c3e00 (LWP 100135)]
[New Thread 0x81c3c00 (sleeping)]
[New Thread 0x81c3a00 (sleeping)]
[New Thread 0x81c3800 (runnable)]
[New Thread 0x81af600 (LWP 100104)]
[New Thread 0x81af000 (sleeping)]
(gdb) bt
#0  0x285330ab in pthread_testcancel () from /usr/lib/libpthread.so.2
#1  0x285214cd in sigaction () from /usr/lib/libpthread.so.2
#2  0x2851aa95 in pthread_kill () from /usr/lib/libpthread.so.2
#3  0x2851a374 in raise () from /usr/lib/libpthread.so.2
#4  0x285fca6c in abort () from /lib/libc.so.6
#5  0x08134a1f in licq_handle_sigsegv (s=11) at sighandler.c:95
#6  0x2851f3a8 in sigaction () from /usr/lib/libpthread.so.2
#7  0x28520f62 in sigaction () from /usr/lib/libpthread.so.2
#8  0x2852a165 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
#9  0x2852a1e2 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
#10 0x285e5f1f in _ctx_start () from /lib/libc.so.6
#11 0x00000000 in ?? ()
#12 0xbf5fa430 in ?? ()
#13 0xbf5fa170 in ?? ()
#14 0x00000000 in ?? ()
#15 0x2852a1a0 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
#16 0x2877be22 in UserCodec::defaultEncoding ()
   from /usr/local/lib/licq/licq_qt-gui.so
#17 0x2877be79 in UserCodec::codecForICQUser ()
   from /usr/local/lib/licq/licq_qt-gui.so
#18 0x2873279f in CUserViewItem::setGraphics ()
   from /usr/local/lib/licq/licq_qt-gui.so
#19 0x287330e8 in CUserViewItem::CUserViewItem ()
   from /usr/local/lib/licq/licq_qt-gui.so
#20 0x286c743f in CMainWindow::CreateUserFloaty ()
   from /usr/local/lib/licq/licq_qt-gui.so
#21 0x286e4011 in CMainWindow::CMainWindow ()
   from /usr/local/lib/licq/licq_qt-gui.so
#22 0x286c425c in CLicqGui::Run () from /usr/local/lib/licq/licq_qt-gui.so
#23 0x286c524b in LP_Main () from /usr/local/lib/licq/licq_qt-gui.so
#24 0x286c5ddd in LP_Main_tep () from /usr/local/lib/licq/licq_qt-gui.so
#25 0x285231db in pthread_create () from /usr/lib/libpthread.so.2
#26 0x285e5f1f in _ctx_start () from /lib/libc.so.6
(gdb)



Not sure if this is related, but shortly after

  open("/home/mario/.licq/licq_fifo",0x2,00)	 = 11 (0xb)
  fstat(11,0xbfbfe700)				 = 0 (0x0)
  getdtablesize()					 = 11095 (0x2b57)
  fcntl(11,F_GETFL,0x0)				 = 2 (0x2)

truss(1) detects *varying* unknown syscalls in the midst of
literally thousands of 

  kse_release(0x81adf44)                          = 0 (0x0)

calls.

$ diff -u truss.licq.1 truss.licq.2 | grep SYSCALL 
--- UNKNOWN SYSCALL -1080037532 --
--- UNKNOWN SYSCALL 135951512 --
--- UNKNOWN SYSCALL 136068608 --
--- UNKNOWN SYSCALL 135958528 --
+-- UNKNOWN SYSCALL -1080037532 --
+-- UNKNOWN SYSCALL 677545040 --
+-- UNKNOWN SYSCALL 136068608 --


Is there any additional information I might provide?

Regards,
Mario

PS: I'm not subscribed to -stable (too many lists), so please
keep me CCed. Thanks!


More information about the freebsd-stable mailing list