public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: carlos <carlos@redhat.com>,
	 Joseph Myers <joseph@codesourcery.com>,
	 Szabolcs Nagy <szabolcs.nagy@arm.com>,
	 libc-alpha <libc-alpha@sourceware.org>
Subject: Re: [RFC PATCH v4 3/5] support record failure: flush stdout, use _exit ()
Date: Wed, 21 Nov 2018 18:55:00 -0000	[thread overview]
Message-ID: <87in0q45w2.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <594755989.8943.1542826325978.JavaMail.zimbra@efficios.com> (Mathieu Desnoyers's message of "Wed, 21 Nov 2018 13:52:05 -0500 (EST)")

* Mathieu Desnoyers:

> ----- On Nov 21, 2018, at 1:50 PM, Florian Weimer fweimer@redhat.com wrote:
>
>> * Mathieu Desnoyers:
>> 
>>> Using "exit ()" from pthread_atfork handlers hangs the process. It is
>>> therefore not a good way to exit when reporting a testing error.
>>>
>>> Use _exit () instead, which directly exits the process. However,
>>> considering that the buffered stdout is used to output test failure
>>> messages, we first need to flush stdout before exiting.
>> 
>> This is not correct; we need the atexit handlers for cleaning up
>> temporary files.
>> 
>> It should be possible to call support_record_failure and rely on the
>> shared memory segment to register the test failure, so that it is
>> eventually reflected in the exit state (even if the failure happens in
>> the subprocess).
>
> Calling exit() from a pthread_atfork handler unfortunately seems to hang
> the process :-/
>
> What would you recommend to deal with that situation ?

Why do you want to terminate the process there?  Is this part of the
test?

Thanks,
Florian

  parent reply	other threads:[~2018-11-21 18:55 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 18:39 [RFC PATCH v4 1/5] glibc: Perform rseq(2) registration at nptl init and thread creation Mathieu Desnoyers
2018-11-21 18:39 ` [RFC PATCH v4 3/5] support record failure: flush stdout, use _exit () Mathieu Desnoyers
2018-11-21 18:50   ` Florian Weimer
2018-11-21 18:52     ` Mathieu Desnoyers
2018-11-21 18:55       ` Mathieu Desnoyers
2018-11-21 18:56         ` Florian Weimer
2018-11-21 22:23           ` Mathieu Desnoyers
2018-11-21 18:55       ` Florian Weimer [this message]
2018-11-21 18:39 ` [RFC PATCH v4 4/5] support record failure: allow use from constructor Mathieu Desnoyers
2018-11-21 18:48   ` Florian Weimer
2018-11-21 18:39 ` [RFC PATCH v4 2/5] glibc: sched_getcpu(): use rseq cpu_id TLS on Linux Mathieu Desnoyers
2018-11-21 18:48 ` [RFC PATCH v4 5/5] rseq registration tests Mathieu Desnoyers
2018-11-21 18:51   ` Mathieu Desnoyers
2018-11-22 14:36 ` [RFC PATCH v4 1/5] glibc: Perform rseq(2) registration at nptl init and thread creation Rich Felker
2018-11-22 15:04   ` Mathieu Desnoyers
2018-11-22 15:12     ` Florian Weimer
2018-11-22 15:17       ` Rich Felker
2018-11-22 15:21         ` Florian Weimer
2018-11-22 15:33           ` Mathieu Desnoyers
2018-11-22 15:45             ` Rich Felker
2018-11-22 16:25             ` Szabolcs Nagy
2018-11-22 18:35               ` Mathieu Desnoyers
2018-11-22 19:02                 ` Rich Felker
2018-11-22 19:36                   ` Mathieu Desnoyers
2018-11-22 15:14     ` Rich Felker
2018-11-22 15:47       ` Mathieu Desnoyers
2018-11-22 16:28         ` Florian Weimer
2018-11-22 16:47           ` Mathieu Desnoyers
2018-11-22 17:00             ` Florian Weimer
2018-11-22 17:10               ` Rich Felker
2018-11-23 13:10                 ` Florian Weimer
2018-11-23 14:29                   ` Rich Felker
2018-11-23 17:05                     ` Mathieu Desnoyers
2018-11-23 17:30                       ` Rich Felker
2018-11-23 17:39                         ` Florian Weimer
2018-11-23 17:44                           ` Rich Felker
2018-11-23 18:01                             ` Florian Weimer
2018-11-23 17:52                         ` Mathieu Desnoyers
2018-11-23 18:36                           ` Rich Felker
2018-11-23 21:09                             ` Mathieu Desnoyers
2018-11-26  8:28                               ` Florian Weimer
2018-11-26 15:51                                 ` Mathieu Desnoyers
2018-11-26 16:03                                   ` Florian Weimer
2018-11-26 17:10                                     ` Rich Felker
2018-11-26 19:22                                       ` Mathieu Desnoyers
2018-12-03 21:30                                         ` Mathieu Desnoyers
2018-11-26 16:31                                   ` Mathieu Desnoyers
2018-11-26 17:08                                     ` Rich Felker
2018-12-05 17:24                                       ` Mathieu Desnoyers
2018-11-26 11:56                               ` Szabolcs Nagy
2018-11-22 17:29               ` Mathieu Desnoyers
2018-11-23 13:29                 ` Florian Weimer

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=87in0q45w2.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=carlos@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=szabolcs.nagy@arm.com \
    /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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).