This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/21386] New: t: ../sysdeps/nptl/fork.c:156: __libc_fork: Assertion `THREAD_GETMEM (self, tid) != ppid' failed.


https://sourceware.org/bugzilla/show_bug.cgi?id=21386

            Bug ID: 21386
           Summary: t: ../sysdeps/nptl/fork.c:156: __libc_fork: Assertion
                    `THREAD_GETMEM (self, tid) != ppid' failed.
           Product: glibc
           Version: 2.24
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: avagin at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Here is a small program which triggers an assertion in glibc.
$ cat test.c 
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/wait.h>
#include <sched.h>
#include <unistd.h>
#include <stdio.h>

int main()
{
        int i;
        for (i = 0; i < 2; i++) {
                pid_t pid;

                unshare(CLONE_NEWPID);
                pid = fork();
                printf("%d: %d\n", getpid(), pid);
        }
        while (wait(NULL) > 0);
        return 0;
}

$ gcc test.c -Wall -o t && ./t
25131: 25132
25131: 25133
2: 0
1: 0
1: 3
t: ../sysdeps/nptl/fork.c:156: __libc_fork: Assertion `THREAD_GETMEM (self,
tid) != ppid' failed.

$ rpm -e glibc
  glibc-2.24-4.fc25.x86_64

$ cat /etc/fedora-release 
Fedora release 25 (Twenty Five)

$ uname -a
Linux laptop 4.10.6-200.fc25.x86_64 #1 SMP Mon Mar 27 14:06:23 UTC 2017 x86_64
x86_64 x86_64 GNU/Linux

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]