From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1375 invoked by alias); 5 Aug 2015 21:49:50 -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: 36002 Received: (qmail 6440 invoked from network); 5 Aug 2015 21:49:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=1adD0+cUhrED6dYMAvHKcakYnzeUQo/MStDGTwsG94I=; b=a2bchkVbJsBTp+ZBw0NYBeRFNZCnZDAIQk1hXpFP16NcqPFDZcCGN06UAvoDmcc6J/ B7X8dvgL1YJ56Qq8tSgmIF4Xjj6Ni5/b0CUBstcBoC9Qjh+2KK/cgzWzebzVklCgfL0u adzYA3trXVzFhlXn7n1eK3rfLaV66OggtGYP4mkHMheDfYWo09XEUIDYIAgAyfheo8Rk lNdNSKDyey1Ko+rZpTYX6gONzy28k+pV7UI2+92PcFFMKbcXBty9dK9fKOUDSOjLQhQv 7tYgPGaLHdfSGKS/MG5LEuS/DLt6ZftQh80VCmHR/lcKDV+rUyGbqVBhj80U6PxzLS68 BLVw== X-Received: by 10.60.76.69 with SMTP id i5mr9921348oew.42.1438811387493; Wed, 05 Aug 2015 14:49:47 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <150805132014.ZM7746@torch.brasslantern.com> References: <150803085228.ZM24837@torch.brasslantern.com> <150803135818.ZM24977@torch.brasslantern.com> <150804235400.ZM9958@torch.brasslantern.com> <150805085258.ZM17673@torch.brasslantern.com> <150805115249.ZM7158@torch.brasslantern.com> <150805132014.ZM7746@torch.brasslantern.com> From: Mathias Fredriksson Date: Thu, 6 Aug 2015 00:49:07 +0300 Message-ID: Subject: Re: Deadlock when receiving kill-signal from child process To: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On Wed, Aug 5, 2015 at 11:20 PM, Bart Schaefer wrote: } } Dang. Not sure there's much we can do about that one, that's the stdio } library deadlocking internally on a mutex because a signal arrived. } It'd be pretty ugly for us to try to wrap every stdio call with signal } blocking. Oh, interesting how this is only a problem on some systems. } } Yet another one of these. We may have to resort to treating all signals } the way we treat WINCH, that is, having them constantly queued except } for specific moments when we unqueue them. Ah, that explains why I have been able to work around this issue with WINCH. } } diff --git a/Src/parse.c b/Src/parse.c Still locks up, interesting though is that this patch allows Ctrl+C to exit the program even though it's frozen, the previous patch disabled Ctrl+C, the one before that enabled Ctrl+C and before that it didn't work either. Sorry for rambling, just trying to provide any additional information I can. forked child: #0 0x00007fff8abf95da in syscall_thread_switch () #1 0x00007fff853a982d in _OSSpinLockLockSlow () #2 0x00007fff896e16d9 in szone_force_lock () #3 0x00007fff896e15e6 in _malloc_fork_prepare () #4 0x00007fff82cb8097 in fork () #5 0x000000010b9f6638 in zfork () #6 0x000000010b9fa0c5 in execcmd () #7 0x000000010b9f5128 in execpline () #8 0x000000010b9f46d2 in execlist () #9 0x000000010b9f44fa in execode () #10 0x000000010b9f80ff in runshfunc () #11 0x000000010b9f7bea in doshfunc () #12 0x000000010ba3c867 in dotrapargs () #13 0x000000010ba3b9ca in handletrap () #14 0x000000010ba3b2c8 in zhandler () #15 #16 0x00007fff896ddfc7 in small_free_list_add_ptr () #17 0x00007fff896d9ccf in szone_free_definite_size () #18 0x000000010ba2bc12 in bld_eprog () #19 0x000000010ba0cc3c in loop () #20 0x000000010ba0fa94 in zsh_main () #21 0x00007fff8610c5c9 in start () no fork: #0 0x00007fff8abf95da in syscall_thread_switch () #1 0x00007fff853a982d in _OSSpinLockLockSlow () #2 0x00007fff896d98d6 in szone_free_definite_size () #3 0x000000010663c351 in freejob () #4 0x000000010663bd9d in printjob () #5 0x000000010663b0f2 in update_job () #6 0x0000000106665593 in wait_for_processes () #7 0x00000001066652be in zhandler () #8 #9 0x00007fff896d9e25 in szone_free_definite_size () #10 0x0000000106666885 in dotrapargs () #11 0x00000001066659ca in handletrap () #12 0x00000001066652c8 in zhandler () #13 0x000000010661fa29 in execpline () #14 0x000000010661e6d2 in execlist () #15 0x000000010661e4fa in execode () #16 0x0000000106636e43 in loop () #17 0x0000000106639a94 in zsh_main () #18 0x00007fff8610c5c9 in start ()