From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14440 invoked by alias); 13 May 2015 20:31:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35115 Received: (qmail 9224 invoked from network); 13 May 2015 20:31:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 From: Kamil Dudka To: Bart Schaefer Cc: zsh-workers@zsh.org Subject: Re: another deadlock in free() called from a signal handler Date: Wed, 13 May 2015 22:30:07 +0200 Message-ID: <1533348.JJkAU7I1uX@nbkamil> User-Agent: KMail/4.14.3 (Linux/3.18.12-gentoo; KDE/4.14.3; x86_64; ; ) In-Reply-To: <150513110135.ZM28258@torch.brasslantern.com> References: <1650705.NsQYeMnTDs@kdudka.brq.redhat.com> <150513110135.ZM28258@torch.brasslantern.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 On Wednesday, May 13, 2015 11:01:35 Bart Schaefer wrote: > On May 13, 6:37pm, Kamil Dudka wrote: > } > } Wouldn't it be safer to wrap [z]free() internally by the signal > } queuing macros? > > Sigh. I'm somewhat resistant to that because if the problem exists with > free() then it probably also exists with other operations at the calling > scope and the farther down we put defensive programming the less likely > we are to get a reproducible bug report for the higher-level problem. True. > } A backtrace of the deadlock (captured with zsh-4.3.11-3.el6) follows: > } > } #10 0x000000000044a339 in lexrestore () at lex.c:342 > > The entire lexrestore() function is gone now, and its replacement has > already got the signal queuing wrapped around it. So I think the problem > you're reporting here was already fixed: > > commit 8727049674b1f39a8926c02dc74e9f19bbd70289 > Author: Barton E. Schaefer > Date: Tue Sep 30 20:34:58 2014 -0700 > > 33298: make lexrestore() more signal-safe Thank you for pointing out the commit! I will have a look if there is more of them... Kamil