Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh 5.0.6 hanged in freejob from TRAPCHLD



On Tue, 30 Sep 2014 16:18:43 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 30, 2014 10:30 AM, "Vincent Lefevre" <vincent@xxxxxxxxxx> wrote:
> >
> > I typed:
> >
> >   ps -aef|gr pulseaudio
> >
> > and zsh hanged.
> 
> The stack trace seems to indicate that the problem likely originates in
> lexrestore() which calls free() directly (without the signal-safe zfree()
> wrapper).  There's a corresponding problem in lexsave() with a direct call
> to malloc().  The CHLD signal interrupts the free, leading to internal
> deadlock when another free is called (correctly via zfree this time, though
> it is optimized out of the backtrace).

The queue_signals() is presumably important.  I don't see that zfree()
makes a practical difference here, though --- the backtrace suggests
malloc() isn't from zsh, in which case zfree() is surely just a simple
front end to free() that checks the pointer isn't NULL?

pws



Messages sorted by: Reverse Date, Date, Thread, Author