1 Mar 2010 03:43
Review: Change for handling invalid threads after fork in MacOSX
Glenn Tarcea <gtarcea <at> umich.edu>
2010-03-01 02:43:08 GMT
2010-03-01 02:43:08 GMT
Hi, Could someone review this change and let me know if it would potentially be acceptable? The problem this solves is when a fork() is done the threads in the parent no longer exist in the child. However perform_thread_post_mortem() will still attempt to access these invalid threads. In MacOSX this leads to a number of test failures because gc_assert() is doing an abort when pthead_join() returns a non-zero value (which it does when given an invalid thread). Note: I'm not submitting this yet as an official patch request for the following reasons: 1. I don't understand why the current code works on Linux systems and fails on MacOSX. Since I didn't have a Linux system handy this weekend I couldn't investigate that aspect. 2. The good news: This change causes tests that used to fail on MacOSX to succeed. The bad news: This is turning up other bugs, and in particular threads.impure.lisp has a section of code that hangs. I haven't tracked down why this is happening (but I can easily reproduce it on my system) but since this bug has probably existed in the MacOSX port for a while I'd prefer to fix it as well before suggesting anything for potential inclusion. For this change I just want to make sure it seems reasonable. I haven't submitted any patches to SBCL before and want to make sure I am following any needed protocols. I can provide more details if needed. Thanks, Glenn
V. Glenn Tarcea(Continue reading)
RSS Feed