zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zsh 5.0.6 hanged in freejob from TRAPCHLD
Date: Tue, 30 Sep 2014 16:18:43 -0700	[thread overview]
Message-ID: <CAH+w=7aTw0r4RMwh=eg8jySMRsD-vrde8SuxF=Udek4iNQx8Fw@mail.gmail.com> (raw)
In-Reply-To: <20140930172125.GA2703@xvii.vinc17.org>

[-- Attachment #1: Type: text/plain, Size: 683 bytes --]

On Sep 30, 2014 10:30 AM, "Vincent Lefevre" <vincent@vinc17.net> 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).

This resembles the problems in execsave()/execrestore() that I fixed last
October.  I'll send a patch later if no one else gets there first.

  reply	other threads:[~2014-09-30 23:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30 17:21 Vincent Lefevre
2014-09-30 23:18 ` Bart Schaefer [this message]
2014-10-01  0:53   ` PATCH signal-safe lexrestore() [Re: zsh 5.0.6 hanged in freejob from TRAPCHLD] Bart Schaefer
2014-10-01  9:00   ` zsh 5.0.6 hanged in freejob from TRAPCHLD Peter Stephenson
2014-10-01 14:53     ` Bart Schaefer
2014-10-01 15:25       ` Oliver Kiddle
2014-10-01 15:40         ` Peter Stephenson
2014-10-01 16:04           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7aTw0r4RMwh=eg8jySMRsD-vrde8SuxF=Udek4iNQx8Fw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).