On 20 April 2012 02:47, Cyrus Harmon <ch-sbcl@...> wrote:
> I'm seeing some deadlock problems trying to asdf:load-system flexi-streams from the SLIME REPL. I seem to
> recall noticing this a few weeks ago and I just ignored it. It only happens the first time this stuff gets
> compiled, I think, and it wasn't annoying enough to track down at the time. However, recent SBCLs seem to
> do something different, as now it hangs entirely. So, in an effort to track down the problem, I figured
> I'd start with this and see if it's at the root of the problem. A stack trace is shown below.
This was fixed at one point in Slime, but Helmut deemed the patch
inappropriate and reverted it. Here's the commit that used to take
care of this (from the slime Git mirror):
Author: Nikodemus Siivola <nsiivola@...>
Date: Tue Jun 14 15:34:18 2011 +0000
sbcl: workaround for auto-flush thread deadlocks
Occasionally auto-flush thread could deadlock with a thread doing
T1: grabs world-lock
T2: decides to flush, grabs stream lock
T1: needs to do output (compiler note, etc), waits on the stream lock
T2: needs the world-lock for a while (PCL dispatch machinery setup, etc)
This is an SBCL issue, no mistake about it -- but sorting out
the world-lock handling is going to take a while, and sticking
a deadline around the FINISH-OUTPUT call avoids the issue.
I'll try to get on with my world-lock work to get this sorted out
properly, and try to think of another workaround that could be put
into Slime in the meanwhile.