Threadweaver+KJob+dialog-cancel == segfault

Andreas Pakulat apaku at gmx.de
Sun Sep 30 17:27:09 UTC 2007


Hi,

first I wanted to report a crash when the commit dialog from the svn
plugin is "ok'ed", but that one disappeared (dunno why, maybe because
instead of kjob->start() I now do kjob->exec()).

Anyway, now kdevelop crashes when cancelling that same commit dialog.
The dialog is non-modal and I have a slot that connects to the
cancelClicked() signal. The bracktrace looks pretty useless to me, I
only see threadweaver-stuff. When hitting the cancel button there has
been 1 threadweaver job already executed, but the one for committing is
only created.

The code in question is under branches/work/kdevelop/rework_svnplugin,
in the files svncommitjob.cpp and svnjobbase.cpp (for the
internalJobFailed()).

The backtrace is attached. I appreciate any comments.

Andreas

PS: Mirko, CC'ing you as threadweaver is shown in the backtrace only,
maybe you have an idea...

-- 
Be different: conform.
-------------- next part --------------
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb5ed06c0 (LWP 15190)]
[New Thread 0xb058db90 (LWP 15255)]
[New Thread 0xb0d8db90 (LWP 15254)]
[New Thread 0xb159eb90 (LWP 15253)]
[New Thread 0xb1d9eb90 (LWP 15243)]
[New Thread 0xb28d5b90 (LWP 15223)]
0xb7d5cbf1 in waitpid () from /lib/libpthread.so.0
[Current thread is 0 (LWP 15190)]

Thread 6 (Thread 0xb28d5b90 (LWP 15223)):
#0  0xb64280f7 in select () from /lib/libc.so.6
#1  0xb7e9306c in QProcessManager::run (this=0x8062b20)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/io/qprocess_unix.cpp:288
#2  0xb7df45d7 in QThreadPrivate::start (arg=0x8062b20)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qthread_unix.cpp:181
#3  0xb7d552d3 in start_thread () from /lib/libpthread.so.0
#4  0xb642f4ee in clone () from /lib/libc.so.6

Thread 5 (Thread 0xb1d9eb90 (LWP 15243)):
#0  0xb7d59451 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb7df4a40 in QWaitCondition::wait (this=0x81a8bf8, mutex=0x81bcf10, 
    time=4294967295)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:269
#2  0xb71e9f18 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x81a8be0, th=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0xb71eea52 in ThreadWeaver::WorkingHardState::waitForAvailableJob (
    this=0x81bcfa0, th=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0xb71e95b5 in ThreadWeaver::WeaverImpl::waitForAvailableJob (
    this=0x81a8be0, th=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0xb71eeb6f in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x81bcfa0, th=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0xb71ea180 in ThreadWeaver::WeaverImpl::applyForWork (this=0x81a8be0, 
    th=0x8754b18, previous=0x84a0210)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0xb71ecc05 in ThreadWeaver::ThreadRunHelper::run (this=0xb1d9e358, 
    parent=0x81a8be0, th=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:87
#8  0xb71ecda8 in ThreadWeaver::Thread::run (this=0x8754b18)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:142
#9  0xb7df45d7 in QThreadPrivate::start (arg=0x8754b18)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qthread_unix.cpp:181
#10 0xb7d552d3 in start_thread () from /lib/libpthread.so.0
#11 0xb642f4ee in clone () from /lib/libc.so.6

Thread 4 (Thread 0xb159eb90 (LWP 15253)):
#0  0xb7d59451 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb7df4a40 in QWaitCondition::wait (this=0x849d9a8, mutex=0x8505b28, 
    time=4294967295)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:269
#2  0xb71e9f18 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x849d990, th=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0xb71eea52 in ThreadWeaver::WorkingHardState::waitForAvailableJob (
    this=0x8896ec8, th=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0xb71e95b5 in ThreadWeaver::WeaverImpl::waitForAvailableJob (
    this=0x849d990, th=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0xb71eeb6f in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x8896ec8, th=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0xb71ea180 in ThreadWeaver::WeaverImpl::applyForWork (this=0x849d990, 
    th=0x8896c98, previous=0x88f2f20)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0xb71ecc05 in ThreadWeaver::ThreadRunHelper::run (this=0xb159e358, 
    parent=0x849d990, th=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:87
#8  0xb71ecda8 in ThreadWeaver::Thread::run (this=0x8896c98)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:142
#9  0xb7df45d7 in QThreadPrivate::start (arg=0x8896c98)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qthread_unix.cpp:181
#10 0xb7d552d3 in start_thread () from /lib/libpthread.so.0
#11 0xb642f4ee in clone () from /lib/libc.so.6

Thread 3 (Thread 0xb0d8db90 (LWP 15254)):
#0  0xb7d59451 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb7df4a40 in QWaitCondition::wait (this=0x849d9a8, mutex=0x8505b28, 
    time=4294967295)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:269
#2  0xb71e9f18 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x849d990, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0xb71eea52 in ThreadWeaver::WorkingHardState::waitForAvailableJob (
    this=0x8896ec8, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0xb71e95b5 in ThreadWeaver::WeaverImpl::waitForAvailableJob (
    this=0x849d990, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0xb71eeb6f in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x8896ec8, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0xb71ea180 in ThreadWeaver::WeaverImpl::applyForWork (this=0x849d990, 
    th=0x81b2f68, previous=0x0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0xb71eeb97 in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x8896ec8, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:74
#8  0xb71ea180 in ThreadWeaver::WeaverImpl::applyForWork (this=0x849d990, 
    th=0x81b2f68, previous=0x0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#9  0xb71ecc05 in ThreadWeaver::ThreadRunHelper::run (this=0xb0d8d358, 
    parent=0x849d990, th=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:87
#10 0xb71ecda8 in ThreadWeaver::Thread::run (this=0x81b2f68)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:142
#11 0xb7df45d7 in QThreadPrivate::start (arg=0x81b2f68)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qthread_unix.cpp:181
#12 0xb7d552d3 in start_thread () from /lib/libpthread.so.0
#13 0xb642f4ee in clone () from /lib/libc.so.6

Thread 2 (Thread 0xb058db90 (LWP 15255)):
#0  0xb7d59451 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0xb7df4a40 in QWaitCondition::wait (this=0x849d9a8, mutex=0x8505b28, 
    time=4294967295)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qwaitcondition_unix.cpp:269
#2  0xb71e9f18 in ThreadWeaver::WeaverImpl::blockThreadUntilJobsAreBeingAssigned (this=0x849d990, th=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:365
#3  0xb71eea52 in ThreadWeaver::WorkingHardState::waitForAvailableJob (
    this=0x8896ec8, th=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:80
#4  0xb71e95b5 in ThreadWeaver::WeaverImpl::waitForAvailableJob (
    this=0x849d990, th=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:356
#5  0xb71eeb6f in ThreadWeaver::WorkingHardState::applyForWork (
    this=0x8896ec8, th=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WorkingHardState.cpp:71
#6  0xb71ea180 in ThreadWeaver::WeaverImpl::applyForWork (this=0x849d990, 
    th=0x88f2ed0, previous=0x0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/WeaverImpl.cpp:351
#7  0xb71ecc05 in ThreadWeaver::ThreadRunHelper::run (this=0xb058d358, 
    parent=0x849d990, th=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:87
#8  0xb71ecda8 in ThreadWeaver::Thread::run (this=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/kdelibs/threadweaver/Weaver/Thread.cpp:142
#9  0xb7df45d7 in QThreadPrivate::start (arg=0x88f2ed0)
    at /home/andreas/KDE-work/4.0/qt-copy/src/corelib/thread/qthread_unix.cpp:181
#10 0xb7d552d3 in start_thread () from /lib/libpthread.so.0
#11 0xb642f4ee in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb5ed06c0 (LWP 15190)):
#0  0xb7d5cbf1 in waitpid () from /lib/libpthread.so.0
#1  0xb788b9c4 in KCrash::startDirectly (argv=0xbfe61988)
    at /home/andreas/KDE-work/4.0/kdelibs/kdeui/util/kcrash.cpp:387
#2  0xb788bfc4 in KCrash::defaultCrashHandler (sig=11)
    at /home/andreas/KDE-work/4.0/kdelibs/kdeui/util/kcrash.cpp:285
#3  0xffffe420 in ?? ()
#4  0x0000000b in ?? ()
#5  0x00000033 in ?? ()
#6  0xc0100000 in ?? ()
#7  0x0000007b in ?? ()
#8  0xc010007b in ?? ()
#9  0x00000001 in ?? ()
#10 0x080538b8 in ?? ()
#11 0xbfe61d88 in ?? ()
#12 0xbfe61d11 in ?? ()
#13 0xb7989d80 in ?? () from /home/andreas/kde4/lib/libkdeui.so.5
#14 0x087f5700 in ?? ()
#15 0x00000000 in ?? ()
#0  0xb7d5cbf1 in waitpid () from /lib/libpthread.so.0


More information about the KDevelop-devel mailing list