-
Notifications
You must be signed in to change notification settings - Fork 561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DEADLOCK: fork from multi-threaded parent => locks inconsistent #239
Comments
From [email protected] on April 06, 2010 10:38:56 alternatively, we need to do a synchall at pre-fork and leave the |
From [email protected] on May 24, 2012 09:49:37 This bites us when running chrome's unit_tests binary on Linux: (gdb) bt There's only one thread in the process I mentioned above, so the mutex will never be released. In a typical app there are a few approaches to fork and threads:
1 isn't an option for DR. Synchronizing threads in DR is similar to acquiring a really big global lock, which is pretty close to solution 2. We could try to pursue 3, which is what we try to do now, if 2 isn't feasible. |
From [email protected] on May 30, 2012 10:10:28 I implemented the synchall solution here: http://codereview.appspot.com/6247048/ It works most of the time, but it's actually hitting issue #26 (receiving signals during thread init) now. If an app is spawning threads and forking at the same time, then it is very likely that we will be unable to synch with the child thread. Currently, we call add_thread in the child. Here are the possible places where we might try to synch:
Despite these issues, the CL as written improves on the current situation for apps that don't spawn threads and fork concurrently. IMO we should commit the current change, but leave this issue open and blocked on issue #26 . Owner: [email protected] |
From [email protected] on December 01, 2009 11:49:58
when a multi-threaded process forks, the fork child is alone in its new
process but other threads could have held locks at the fork point. we need
to have a way to iterate over all locks held in release build and free them.
I added cleanup of other thread data structs as part of issue #237
Original issue: http://code.google.com/p/dynamorio/issues/detail?id=239
The text was updated successfully, but these errors were encountered: