public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jon at jonshouse dot co.uk" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/13845] Infrequent random stop in futex_wait using printf inside alarm signal handler
Date: Wed, 14 Mar 2012 14:55:00 -0000	[thread overview]
Message-ID: <bug-13845-131-Bv5UtolD8c@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-13845-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=13845

--- Comment #4 from Jonathan Andrews <jon at jonshouse dot co.uk> 2012-03-14 14:55:11 UTC ---
(In reply to comment #3)
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_04

Ok, I found the reference to the issue in an up to date man page for "signal"
on a Debian box. My older development machine does not mention it, nor does the
man page for alarm I referenced.

"unspecified" is also a pretty vague term.

Lots of nice unsafe examples via google - thanks web ....
http://www.ccplusplus.com/2011/10/alarm-function-example-in-c.html

"Interactions between alarm() and setitimer() are unspecified"
No "Only thread safe functions should be used in the alarm signal handler"

Its documented with the assumption that somebody has read it in the correct
order, the documentation isn't thread safe itself :-(

Thanks,
Jon

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2012-03-14 14:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-14 13:08 [Bug libc/13845] New: " jon at jonshouse dot co.uk
2012-03-14 13:31 ` [Bug libc/13845] " schwab@linux-m68k.org
2012-03-14 13:38 ` jon at jonshouse dot co.uk
2012-03-14 14:18 ` schwab@linux-m68k.org
2012-03-14 14:55 ` jon at jonshouse dot co.uk [this message]
2012-03-15 15:03 ` ppluzhnikov at google dot com
2014-06-26 13:59 ` fweimer at redhat dot com

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=bug-13845-131-Bv5UtolD8c@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.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).