[Bug threads/26228] New: FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug threads/26228] New: FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26228

            Bug ID: 26228
           Summary: FAIL: gdb.threads/create-fail.exp: iteration x: run
                    till end (SIG32)
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: threads
          Assignee: unassigned at sourceware dot org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

Here ( https://sourceware.org/pipermail/gdb-testers/2020q3/169745.html ) we
find in gdb.sum:
...
FAIL: gdb.threads/create-fail.exp: iteration 10: run till end
FAIL: gdb.threads/create-fail.exp: iteration 1: run till end
FAIL: gdb.threads/create-fail.exp: iteration 2: run till end
FAIL: gdb.threads/create-fail.exp: iteration 3: run till end
FAIL: gdb.threads/create-fail.exp: iteration 4: run till end
FAIL: gdb.threads/create-fail.exp: iteration 5: run till end
FAIL: gdb.threads/create-fail.exp: iteration 6: run till end
FAIL: gdb.threads/create-fail.exp: iteration 7: run till end
FAIL: gdb.threads/create-fail.exp: iteration 8: run till end
FAIL: gdb.threads/create-fail.exp: iteration 9: run till end
...

In more detail, in gdb.log:
...
(gdb) run
Starting program:
/home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64/build/gdb/testsuite/outputs/gdb.threads/create-fail/create-fail
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, main () at
/home/gdb-buildbot-2/fedora-x86-64-4/fedora-x86-64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.threads/create-fail.c:69
69        for (i = 0; i < CPU_SETSIZE; i++)
(gdb) continue
Continuing.
[New Thread 0x7ffff7c83700 (LWP 626354)]
[New Thread 0x7ffff7482700 (LWP 626355)]
[Thread 0x7ffff7c83700 (LWP 626354) exited]
[New Thread 0x7ffff6c81700 (LWP 626356)]
[Thread 0x7ffff7482700 (LWP 626355) exited]
[New Thread 0x7ffff6480700 (LWP 626357)]
[Thread 0x7ffff6c81700 (LWP 626356) exited]
[New Thread 0x7ffff5c7f700 (LWP 626358)]
[Thread 0x7ffff6480700 (LWP 626357) exited]
pthread_create: 22: Invalid argument

Thread 6 "create-fail" received signal SIG32, Real-time event 32.
[Switching to Thread 0x7ffff5c7f700 (LWP 626358)]
0x00007ffff7d87695 in clone () from /lib64/libc.so.6
(gdb) FAIL: gdb.threads/create-fail.exp: iteration 1: run till end
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug threads/26228] FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)

Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26228

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
This could have something to do with glibc version.

The fedora version used by the buildbot is fc31, which uses glibc 2.30.

I don't see the FAIL on my laptop with openSUSE Leap 15.2, which uses glibc
2.26.

On openSUSE Tumbleweed we do see the FAIL (
https://build.opensuse.org/public/build/devel:gcc/openSUSE_Factory/x86_64/gdb/_log
), with glibc 2.31.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug threads/26228] FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26228

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
My understanding of what happens is as follows:

Glibc internally defines SIGCANCEL:
...
./sysdeps/unix/sysv/linux/internal-signals.h:#define SIGCANCEL       __SIGRTMIN
...
which get the value 32:
...
./bits/signum-arch.h:#define __SIGRTMIN 32
...

During the test, the signal arrives at gdb.

GDB has the following behaviour:
...
$ gdb -batch -ex "info handle"
Signal        Stop      Print   Pass to program Description
   ...
SIGCANCEL     No        No      Yes             LWP internal signal
SIG32         Yes       Yes     Yes             Real-time event 32
...

In gdb_signal_from_host we translate the signal with value 32 into a gdb
signal.  There is a bit:
...
#if defined (SIGCANCEL)  
  if (hostsig == SIGCANCEL)
    return GDB_SIGNAL_CANCEL;
#endif
...
but that is not actived, because SIGCANCEL is not defined (because it's an
glibc-internal signal).

This gets actived instead:
...
      else if (hostsig == 32)
        return GDB_SIGNAL_REALTIME_32;
...

So, instead of the appropriate Stop=No behaviour of SIGCANCEL, we have the
Stop=Yes behaviour of SIG32, and the test-case FAILs.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug threads/26228] FAIL: gdb.threads/create-fail.exp: iteration x: run till end (SIG32)

Sourceware - gdb-prs mailing list
In reply to this post by Sourceware - gdb-prs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26228

--- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> ---
Confirmed on current trunk, in opensuse tumbleweed vm bound to 1 cpu with 75%
execution cap.

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