Tue Dec 21 03:58:07 PST 2010 Simon Marlow <marlo...@gmail.com> * boundTaskExiting: don't set task->stopped unless this is the last call (#4850) The bug in this case was that we had a worker thread making a foreign call which invoked a callback (in this case it was performGC, I think). When the callback ended, boundTaskExiting() was setting task->stopped, but the Task is now per-OS-thread, so it is shared by the worker that made the original foreign call. When the foreign call returned, because task->stopped was set, the worker was not placed on the queue of spare workers. Somehow the worker woke up again, and found the spare_workers queue empty, which lead to a crash. Two bugs here: task->stopped should not have been set by boundTaskExiting (this broke when I split the Task and InCall structs, in 6.12.2), and releaseCapabilityAndQueueWorker() should not be testing task->stopped anyway, because it should only ever be called when task->stopped is false (this is now an assertion).
M ./rts/Task.c -2 +8 View patch online: http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20101221115807-12142-f2cc427fa92ff2d4737a72446298acb68af3f572.gz _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc