public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34
@ 2021-08-04 14:32 mliska at suse dot cz
  2021-08-04 17:13 ` [Bug libelf/28190] " richard.purdie at linuxfoundation dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: mliska at suse dot cz @ 2021-08-04 14:32 UTC (permalink / raw)
  To: elfutils-devel

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

            Bug ID: 28190
           Summary: FAIL: run-backtrace-native.sh with glibc 2.34
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libelf
          Assignee: unassigned at sourceware dot org
          Reporter: mliska at suse dot cz
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

I see the following failure:

[  349s] FAIL: run-backtrace-native.sh
[  349s] =============================
[  349s] 
[  349s] backtrace: backtrace.c:111: callback_verify: Assertion `symname &&
strcmp (symname, "raise") == 0' failed.
[  349s] ./test-subr.sh: line 84: 13043 Aborted                
LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
$VALGRIND_CMD "$@"
[  349s] backtrace-child: no main
[  349s] FAIL run-backtrace-native.sh (exit status: 1)

If I see correctly, symname is pthread_kill@GLIBC_2.2.5 for frameno == 0.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
@ 2021-08-04 17:13 ` richard.purdie at linuxfoundation dot org
  2021-08-04 18:56 ` mark at klomp dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: richard.purdie at linuxfoundation dot org @ 2021-08-04 17:13 UTC (permalink / raw)
  To: elfutils-devel

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

richard.purdie at linuxfoundation dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard.purdie@linuxfoundat
                   |                            |ion.org

--- Comment #1 from richard.purdie at linuxfoundation dot org ---
I can confirm that Yocto Project is seeing the same issue in its automated
testing on aarch64 and x86_64 with glibc 2.34

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
  2021-08-04 17:13 ` [Bug libelf/28190] " richard.purdie at linuxfoundation dot org
@ 2021-08-04 18:56 ` mark at klomp dot org
  2021-08-04 19:04 ` mark at klomp dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-08-04 18:56 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-08-04
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
This comes from the following glibc commit:

commit f779b1efb35fe141e47952af3ac7f0540acca401
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Dec 7 16:21:55 2020 -0300

    nptl: Implement raise in terms of pthread_kill

    Now that pthread_kill is provided by libc.so it is possible to
    implement the generic POSIX implementation as
    'pthread_kill(pthread_self(), sig)'.

    For Linux implementation, pthread_kill read the targeting TID from
    the TCB.  For raise, this it not possible because it would make raise
    fail when issue after vfork (where creates the resulting process
    has a different TID from the parent, but its TCB is not updated as
    for pthread_create).  To make raise use pthread_kill, it is make
    usable from vfork by getting the target thread id through gettid
    syscall.

    Checked on x86_64-linux-gnu and aarch64-linux-gnu.

Before raise simply called the (tg)kill syscall directly. Now we have an extra
frame in the backtrace.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
  2021-08-04 17:13 ` [Bug libelf/28190] " richard.purdie at linuxfoundation dot org
  2021-08-04 18:56 ` mark at klomp dot org
@ 2021-08-04 19:04 ` mark at klomp dot org
  2021-08-05  7:45 ` richard.purdie at linuxfoundation dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-08-04 19:04 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #3 from Mark Wielaard <mark at klomp dot org> ---
Proposed fix:
https://sourceware.org/pipermail/elfutils-devel/2021q3/004016.html

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
                   ` (2 preceding siblings ...)
  2021-08-04 19:04 ` mark at klomp dot org
@ 2021-08-05  7:45 ` richard.purdie at linuxfoundation dot org
  2021-08-05 11:06 ` mark at klomp dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: richard.purdie at linuxfoundation dot org @ 2021-08-05  7:45 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #4 from richard.purdie at linuxfoundation dot org ---
I tested the patch, thanks. This worked on our x86_64 target tests but not on
our aarch64 ones:

case 0: expected symname 'raise' got '__pthread_kill_internal'
/usr/lib/elfutils/ptest/tests/test-subr.sh: line 90: 12895 Aborted             
   $VALGRIND_CMD $program ${1+"$@"}
backtrace-child: no main
FAIL: run-backtrace-native.sh
case 0: expected symname 'raise' got '__pthread_kill_internal'
/usr/lib/elfutils/ptest/tests/test-subr.sh: line 90: 12946 Aborted             
   $VALGRIND_CMD $program ${1+"$@"}
backtrace-child-core.12942: no main
rmdir: failed to remove 'test-12934': Directory not empty
FAIL: run-backtrace-native-core.sh

The full log in case it is needed:
https://autobuilder.yocto.io/pub/non-release/20210804-19/testresults/qemuarm64-ptest/elfutils.log

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
                   ` (3 preceding siblings ...)
  2021-08-05  7:45 ` richard.purdie at linuxfoundation dot org
@ 2021-08-05 11:06 ` mark at klomp dot org
  2021-08-05 16:50 ` richard.purdie at linuxfoundation dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-08-05 11:06 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #5 from Mark Wielaard <mark at klomp dot org> ---
(In reply to richard.purdie from comment #4)
> I tested the patch, thanks. This worked on our x86_64 target tests but not
> on our aarch64 ones:
> 
> case 0: expected symname 'raise' got '__pthread_kill_internal'

Thanks for testing. Of course it was too optimistic to assume all arches would
use the same naming convention. But good to see the error message now says what
the actual symname was.

Second try at a fix:
https://sourceware.org/pipermail/elfutils-devel/2021q3/004019.html

This time actually tries against a couple of different arches on Fedora rawhide
which also just got glibc 2.35.

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
                   ` (4 preceding siblings ...)
  2021-08-05 11:06 ` mark at klomp dot org
@ 2021-08-05 16:50 ` richard.purdie at linuxfoundation dot org
  2021-08-05 17:09 ` mark at klomp dot org
  2021-08-25  8:47 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: richard.purdie at linuxfoundation dot org @ 2021-08-05 16:50 UTC (permalink / raw)
  To: elfutils-devel

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

--- Comment #6 from richard.purdie at linuxfoundation dot org ---
Thanks, this version seems to resolve things!

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
                   ` (5 preceding siblings ...)
  2021-08-05 16:50 ` richard.purdie at linuxfoundation dot org
@ 2021-08-05 17:09 ` mark at klomp dot org
  2021-08-25  8:47 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: mark at klomp dot org @ 2021-08-05 17:09 UTC (permalink / raw)
  To: elfutils-devel

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

Mark Wielaard <mark at klomp dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Mark Wielaard <mark at klomp dot org> ---
commit 9aee0992d6e6ec4cce2c015d8da4b61022c6f6dd
Author: Mark Wielaard <mark@klomp.org>
Date:   Wed Aug 4 21:01:27 2021 +0200

    tests: Allow an extra pthread_kill frame in backtrace tests

    glibc 2.34 calls pthread_kill from the raise function. Before raise
    directly called the (tg)kill syscall. So allow pthread_kill to be the
    first frame in a backtrace where raise is expected. Also change some
    asserts to fprintf plus abort to make it more clear why the testcase
    fails.

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

    Signed-off-by: Mark Wielaard <mark@klomp.org>

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug libelf/28190] FAIL: run-backtrace-native.sh with glibc 2.34
  2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
                   ` (6 preceding siblings ...)
  2021-08-05 17:09 ` mark at klomp dot org
@ 2021-08-25  8:47 ` fweimer at redhat dot com
  7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2021-08-25  8:47 UTC (permalink / raw)
  To: elfutils-devel

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kloczko.tomasz at gmail dot com

--- Comment #8 from Florian Weimer <fweimer at redhat dot com> ---
*** Bug 28263 has been marked as a duplicate of this bug. ***

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-08-25  8:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 14:32 [Bug libelf/28190] New: FAIL: run-backtrace-native.sh with glibc 2.34 mliska at suse dot cz
2021-08-04 17:13 ` [Bug libelf/28190] " richard.purdie at linuxfoundation dot org
2021-08-04 18:56 ` mark at klomp dot org
2021-08-04 19:04 ` mark at klomp dot org
2021-08-05  7:45 ` richard.purdie at linuxfoundation dot org
2021-08-05 11:06 ` mark at klomp dot org
2021-08-05 16:50 ` richard.purdie at linuxfoundation dot org
2021-08-05 17:09 ` mark at klomp dot org
2021-08-25  8:47 ` fweimer at redhat dot com

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