public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/4737] New: fork is not async-signal-safe
@ 2007-07-04  1:35 nmiell at comcast dot net
  2008-10-11 18:47 ` [Bug libc/4737] " morten+sources dot redhat dot com at afdelingp dot dk
                   ` (19 more replies)
  0 siblings, 20 replies; 32+ messages in thread
From: nmiell at comcast dot net @ 2007-07-04  1:35 UTC (permalink / raw)
  To: glibc-bugs

The following test program will deadlock in ptmalloc_lock_all when using glibc
2.6 (specifically, glibc-2.6-3 as shipped in F7).

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <signal.h>
#include <sys/time.h>

void handler(int unused)
{
        pid_t pid = fork();

        if (pid == 0) {
                exit(0);
        }
}

int main(int argc, char* argv[])
{
        struct sigaction sa;
        struct itimerval itv;

        sa.sa_handler = handler;
        sigemptyset(&sa.sa_mask);
        sa.sa_flags = SA_RESTART;

        sigaction(SIGALRM, &sa, NULL);

        itv.it_interval.tv_sec = 0;
        itv.it_interval.tv_usec = 10;
        itv.it_value.tv_sec = 0;
        itv.it_value.tv_usec = 10;

        setitimer(ITIMER_REAL, &itv, NULL);

        while (1) {
                void * p = malloc(8);
                free(p);
        }

        return 0;
}

-- 
           Summary: fork is not async-signal-safe
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: nmiell at comcast dot net
                CC: glibc-bugs at sources dot redhat dot com


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 32+ messages in thread
[parent not found: <bug-4737-131@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2021-06-28 19:00 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-04  1:35 [Bug libc/4737] New: fork is not async-signal-safe nmiell at comcast dot net
2008-10-11 18:47 ` [Bug libc/4737] " morten+sources dot redhat dot com at afdelingp dot dk
2008-10-20 11:47 ` morten+sources dot redhat dot com at afdelingp dot dk
2008-10-21  5:13 ` nmiell at comcast dot net
2008-10-30 14:55 ` morten+sources dot redhat dot com at afdelingp dot dk
2008-11-05  9:00 ` tom dot honermann at oracle dot com
2008-11-05  9:57 ` tom dot honermann at oracle dot com
2008-11-06 23:10 ` nmiell at comcast dot net
2008-11-07  1:10 ` morten+sources dot redhat dot com at afdelingp dot dk
2008-11-11 21:35 ` tom dot honermann at oracle dot com
2008-11-11 21:41 ` tom dot honermann at oracle dot com
2008-11-11 22:04 ` tom dot honermann at oracle dot com
2008-11-18 22:30 ` tom dot honermann at oracle dot com
2008-11-18 23:45 ` rsa at us dot ibm dot com
2008-11-18 23:57 ` rsa at us dot ibm dot com
2008-11-19  1:39 ` tom dot honermann at oracle dot com
2008-11-19 16:23 ` rsa at us dot ibm dot com
2009-01-14  1:22 ` tom dot honermann at oracle dot com
2009-01-14  8:46 ` jakub at redhat dot com
2009-01-14  9:44 ` tom dot honermann at oracle dot com
2009-01-16 17:19 ` tom dot honermann at oracle dot com
     [not found] <bug-4737-131@http.sourceware.org/bugzilla/>
2011-10-13 17:53 ` llucax at gmail dot com
2011-10-13 17:54 ` llucax at gmail dot com
2011-10-13 17:56 ` llucax at gmail dot com
2011-10-14 14:06 ` bugdal at aerifal dot cx
2012-03-27 13:43 ` krebbel1 at de dot ibm.com
2012-04-11  7:58 ` aj at suse dot de
2014-02-16 19:42 ` jackie.rosen at hushmail dot com
2014-05-28 19:41 ` schwab at sourceware dot org
2014-08-25  2:25 ` naesten at gmail dot com
2015-05-07 15:27 ` gbenson at redhat dot com
2021-06-28 19:00 ` adhemerval.zanella at linaro dot org

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).