From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117406 invoked by alias); 8 Jul 2015 22:52:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 117396 invoked by uid 89); 8 Jul 2015 22:52:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qk0-f181.google.com X-Received: by 10.55.16.146 with SMTP id 18mr14469640qkq.53.1436395953911; Wed, 08 Jul 2015 15:52:33 -0700 (PDT) Message-ID: <559DA9AF.8090409@gmail.com> Date: Wed, 08 Jul 2015 22:52:00 -0000 From: Martin Sebor User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Szabolcs Nagy CC: Carlos O'Donell , Martin Sebor , GNU C Library , Szabolcs Nagy Subject: Re: [PATCH] pthread_once hangs when init routine throws an exception [BZ #18435] References: <556B7F10.40209@redhat.com> <559D4CD6.5070607@redhat.com> <559D95F7.902@gmail.com> <20150708221339.GN32532@port70.net> In-Reply-To: <20150708221339.GN32532@port70.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00283.txt.bz2 On 07/08/2015 04:13 PM, Szabolcs Nagy wrote: > * Martin Sebor [2015-07-08 15:28:23 -0600]: >>> This patch has serious problems which cause regressions on at >>> least aarch64 and possibly other arches. >> >> I finally got an Aarch64 box, managed to reproduce one of the two >> reported test regressions (the one in tst-join5; the other test >> passes for me) and have been debugging it in between other tasks. >> > > we know the root cause already (you were somehow left > off from the cc at some point). > > here is my analysis and carlos' reply: > http://sourceware.org/ml/libc-alpha/2015-07/msg00260.html Ah, thank you! I've been busy with another project and haven't had a chance to read the list. Let me digest it and follow up on the thread. (A couple of comments are below.) > >> I'm not sure I understand what you mean here. The patch doesn't >> introduce any assumptions that didn't exist before. Callers of >> the cancellation functions don't depend on -fasynchronous-unwind- >> tables: only the functions themselves do (when __EXCEPTIONS is >> defined), and they are being compiled that way. > > the new requirement is to compile pthread_once's > callback argument with async unwind info. That's only required in C++ code that throws exceptions from the once function. C callers are not affected (and in my tests on aarch64 and ppc64le, they're compiled with neither -fexceptions or -fasynchronous-unwind-tables and succeed). This includes tst-once3 which you reported as failing so there must be something more subtle going on. > the problem is that -fexceptions is not 'async unwind safe' > > the cleanup handler is only guaranteed to run if the unwind > goes through extern functions (that may throw). > > there is a proposed new cancellation design that gets rid > of async cancel + inline asm syscalls + cleanup handlers, > with that your patch would be safe, but without it, it isnt. > (that change is scheduled for 2.23) I'm fine deferring the patch until 2.23, though I would like to understand why we're seeing different results for some of the tests. Martin