Bug 133474 - deadlock in KProcessController destructor
Summary: deadlock in KProcessController destructor
Status: RESOLVED NOT A BUG
Alias: None
Product: kdelibs
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Other
: NOR crash
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-03 05:41 UTC by Benjamin Reed
Modified: 2008-01-27 19:49 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Reed 2006-09-03 05:41:12 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363) 
OS:                Other

I'm still trying to do more investigation, but HEAD seems to exhibit deadlocks in the KProcessController destructor.

Here is the output of a tool called "Spin Control" which samples apps locked in the "spinning beachball of death":

---(snip!)---
Call graph:
    6000 Thread_4a03
      6000 start
        6000 _start
          6000 main
            6000 KApplication::~KApplication [in-charge]()
              6000 KProcessController::deref()
                6000 KProcessController::~KProcessController [in-charge deleting]()
                  6000 close
                    6000 close
    6000 Thread_4b03
      6000 _pthread_body
        6000 QThreadPrivate::start(void*)
          6000 QProcessManager::run()
            6000 select
              6000 select
    6000 Thread_4c03
      6000 _pthread_body
        6000 __CFSocketManager
          6000 select
            6000 select

Total number in stack (recursive counted multiple, when >=5):

Sort by top of stack, same collapsed (when >= 5):
        select        12000
        close        6000
---(snip!)---

it looks like there are 3 threads, one is trying to close one of the FDs created in the pipe(), and the other two are selecting on them.  For some reason they never finish though.
Comment 1 Benjamin Reed 2006-09-03 17:22:54 UTC
I checked in a "workaround" for this, which is to say, I #ifdef'd it out on darwin  :)

However, it feels wrong to do so, any ideas how I can go about fixing this properly?
Comment 2 Benjamin Reed 2008-01-27 19:49:45 UTC
not sure this is valid anymore; once I do some new profiling there will be opportunities to reopen such bugs.  :)