Bug 2007877
| Summary: | [abrt] papi-testsuite: _stealtime_shutdown_thread(): stealtime_basic killed by SIGABRT | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Török Edwin <edwin+bugs> | ||||||||||||||||||||||
| Component: | papi | Assignee: | William Cohen <wcohen> | ||||||||||||||||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||||||||||||||||
| Severity: | unspecified | Docs Contact: | |||||||||||||||||||||||
| Priority: | unspecified | ||||||||||||||||||||||||
| Version: | 34 | CC: | lberk, wcohen | ||||||||||||||||||||||
| Target Milestone: | --- | ||||||||||||||||||||||||
| Target Release: | --- | ||||||||||||||||||||||||
| Hardware: | x86_64 | ||||||||||||||||||||||||
| OS: | Unspecified | ||||||||||||||||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/764832f80f5a89777b948e3c8b71dbb186492325 | ||||||||||||||||||||||||
| Whiteboard: | abrt_hash:171db9949f14bddfa08585dad627a09aa6e8888e;VARIANT_ID=workstation; | ||||||||||||||||||||||||
| Fixed In Version: | papi-6.0.0-10.fc34 | Doc Type: | If docs needed, set a value | ||||||||||||||||||||||
| Doc Text: | Story Points: | --- | |||||||||||||||||||||||
| Clone Of: | Environment: | ||||||||||||||||||||||||
| Last Closed: | 2021-11-28 01:09:27 UTC | Type: | --- | ||||||||||||||||||||||
| Regression: | --- | Mount Type: | --- | ||||||||||||||||||||||
| Documentation: | --- | CRM: | |||||||||||||||||||||||
| Verified Versions: | Category: | --- | |||||||||||||||||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||||||||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||||||||||||||||
| Embargoed: | |||||||||||||||||||||||||
| Attachments: |
|
||||||||||||||||||||||||
|
Description
Török Edwin
2021-09-25 22:14:23 UTC
Created attachment 1826219 [details]
File: backtrace
Created attachment 1826220 [details]
File: core_backtrace
Created attachment 1826221 [details]
File: cpuinfo
Created attachment 1826222 [details]
File: dso_list
Created attachment 1826223 [details]
File: environ
Created attachment 1826224 [details]
File: limits
Created attachment 1826225 [details]
File: maps
Created attachment 1826226 [details]
File: mountinfo
Created attachment 1826227 [details]
File: open_fds
Created attachment 1826228 [details]
File: proc_pid_status
I haven't been able to reproduce the crash locally. Could you rerun the reproducer with and report the results of: valgrind /usr/share/papi/components/stealtime/tests/stealtime_basic ==63049== Memcheck, a memory error detector ==63049== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==63049== Using Valgrind-3.17.0 and LibVEX; rerun with -h for copyright info ==63049== Command: /usr/share/papi/components/stealtime/tests/stealtime_basic ==63049== PAPI Error: Couldn't open hw_instructions in exclude_guest=0 test ==63049== Invalid write of size 8 ==63049== at 0x48A8ED5: read_stealtime.isra.0 (linux-stealtime.c:109) ==63049== by 0x48A8F71: _stealtime_start (linux-stealtime.c:345) ==63049== by 0x4880937: PAPI_start (papi.c:2782) ==63049== by 0x10A705: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d58670 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A70: _stealtime_init_thread (linux-stealtime.c:222) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8EE5: read_stealtime.isra.0 (linux-stealtime.c:111) ==63049== by 0x48A8F71: _stealtime_start (linux-stealtime.c:345) ==63049== by 0x4880937: PAPI_start (papi.c:2782) ==63049== by 0x10A705: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586b0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A85: _stealtime_init_thread (linux-stealtime.c:225) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid read of size 8 ==63049== at 0x48A8EE9: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8F71: _stealtime_start (linux-stealtime.c:345) ==63049== by 0x4880937: PAPI_start (papi.c:2782) ==63049== by 0x10A705: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d58670 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A70: _stealtime_init_thread (linux-stealtime.c:222) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8F09: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8F71: _stealtime_start (linux-stealtime.c:345) ==63049== by 0x4880937: PAPI_start (papi.c:2782) ==63049== by 0x10A705: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586f0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A9B: _stealtime_init_thread (linux-stealtime.c:228) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8EE5: read_stealtime.isra.0 (linux-stealtime.c:111) ==63049== by 0x48A8FB7: _stealtime_read (linux-stealtime.c:395) ==63049== by 0x48862D8: _papi_hwi_read (papi_internal.c:1710) ==63049== by 0x4880BB8: PAPI_stop (papi.c:2888) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586b0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A85: _stealtime_init_thread (linux-stealtime.c:225) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid read of size 8 ==63049== at 0x48A8EE9: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8FB7: _stealtime_read (linux-stealtime.c:395) ==63049== by 0x48862D8: _papi_hwi_read (papi_internal.c:1710) ==63049== by 0x4880BB8: PAPI_stop (papi.c:2888) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d58670 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A70: _stealtime_init_thread (linux-stealtime.c:222) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8F09: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8FB7: _stealtime_read (linux-stealtime.c:395) ==63049== by 0x48862D8: _papi_hwi_read (papi_internal.c:1710) ==63049== by 0x4880BB8: PAPI_stop (papi.c:2888) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586f0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A9B: _stealtime_init_thread (linux-stealtime.c:228) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid read of size 8 ==63049== at 0x48A8FD4: _stealtime_read (linux-stealtime.c:399) ==63049== by 0x48862D8: _papi_hwi_read (papi_internal.c:1710) ==63049== by 0x4880BB8: PAPI_stop (papi.c:2888) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586f0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A9B: _stealtime_init_thread (linux-stealtime.c:228) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8EE5: read_stealtime.isra.0 (linux-stealtime.c:111) ==63049== by 0x48A8F8E: _stealtime_stop (linux-stealtime.c:370) ==63049== by 0x4880BDB: PAPI_stop (papi.c:2893) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586b0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A85: _stealtime_init_thread (linux-stealtime.c:225) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid read of size 8 ==63049== at 0x48A8EE9: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8F8E: _stealtime_stop (linux-stealtime.c:370) ==63049== by 0x4880BDB: PAPI_stop (papi.c:2893) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d58670 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A70: _stealtime_init_thread (linux-stealtime.c:222) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== ==63049== Invalid write of size 8 ==63049== at 0x48A8F09: read_stealtime.isra.0 (linux-stealtime.c:114) ==63049== by 0x48A8F8E: _stealtime_stop (linux-stealtime.c:370) ==63049== by 0x4880BDB: PAPI_stop (papi.c:2893) ==63049== by 0x10A719: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Address 0x4d586f0 is 0 bytes after a block of size 0 alloc'd ==63049== at 0x4845464: calloc (vg_replace_malloc.c:1117) ==63049== by 0x48A8A9B: _stealtime_init_thread (linux-stealtime.c:228) ==63049== by 0x4892F0B: _papi_hwi_initialize_thread (threads.c:297) ==63049== by 0x4893511: _papi_hwi_init_global_threads (threads.c:553) ==63049== by 0x4883630: PAPI_library_init.part.0 (papi.c:1156) ==63049== by 0x10A630: ??? (in /usr/share/papi/components/stealtime/tests/stealtime_basic) ==63049== by 0x491CB74: (below main) (libc-start.c:332) ==63049== Trying all stealtime events Found stealtime component 13 - stealtime stealtime:::TOTAL value: 0 stealtime:::CPU1 value: 0 stealtime:::CPU2 value: 0 stealtime:::CPU3 value: 0 stealtime:::CPU4 value: 0 stealtime:::CPU5 value: 0 stealtime:::CPU6 value: 0 stealtime:::CPU7 value: 0 stealtime:::CPU8 value: 0 stealtime:::CPU9 value: 0 stealtime:::CPU10 value: 0 stealtime:::CPU11 value: 0 stealtime:::CPU12 value: 0 stealtime:::CPU13 value: 0 stealtime:::CPU14 value: 0 stealtime:::CPU15 value: 0 stealtime:::CPU16 value: 0 stealtime:::CPU17 value: 0 stealtime:::CPU18 value: 0 stealtime:::CPU19 value: 0 stealtime:::CPU20 value: 0 stealtime:::CPU21 value: 0 stealtime:::CPU22 value: 0 stealtime:::CPU23 value: 0 stealtime:::CPU24 value: 0 Note: for this test the values are expected to all be 0 unless run inside a VM on a busy system. PASSED ==63049== ==63049== HEAP SUMMARY: ==63049== in use at exit: 3,837 bytes in 41 blocks ==63049== total heap usage: 3,787 allocs, 3,746 frees, 3,569,383 bytes allocated ==63049== ==63049== LEAK SUMMARY: ==63049== definitely lost: 3,645 bytes in 40 blocks ==63049== indirectly lost: 0 bytes in 0 blocks ==63049== possibly lost: 0 bytes in 0 blocks ==63049== still reachable: 192 bytes in 1 blocks ==63049== suppressed: 0 bytes in 0 blocks ==63049== Rerun with --leak-check=full to see details of leaked memory ==63049== ==63049== For lists of detected and suppressed errors, rerun with: -s ==63049== ERROR SUMMARY: 6275 errors from 11 contexts (suppressed: 0 from 0) It looks like there is a problem with initialization order: num_events is used before being set (initializing the thread uses num events, but initializing the component is the one that determines how many events there are)
(gdb) b _stealtime_init_thread
Function "_stealtime_init_thread" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_stealtime_init_thread) pending.
(gdb) b _stealtime_init_component
Function "_stealtime_init_component" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (_stealtime_init_component) pending.
(gdb) r
Starting program: /usr/share/papi/components/stealtime/tests/stealtime_basic
Breakpoint 1, _stealtime_init_thread (ctx=0x5555555663a0) at components/stealtime/linux-stealtime.c:219
219 {
Missing separate debuginfos, use: dnf debuginfo-install libpfm-4.11.0-4.fc34.x86_64
(gdb) bt
#0 _stealtime_init_thread (ctx=0x5555555663a0) at components/stealtime/linux-stealtime.c:219
#1 0x00007ffff7f41f0c in _papi_hwi_initialize_thread (dest=dest@entry=0x7fffffffd5f0, tid=tid@entry=0) at threads.c:297
#2 0x00007ffff7f42512 in _papi_hwi_init_global_threads () at threads.c:553
#3 0x00007ffff7f32631 in PAPI_library_init (version=<optimized out>) at papi.c:1156
#4 0x0000555555556631 in main ()
(gdb) c
Continuing.
PAPI Error: Couldn't open hw_instructions in exclude_guest=0 test
[Detaching after vfork from child process 64513]
[Detaching after vfork from child process 64515]
Breakpoint 2, _stealtime_init_component (cidx=13) at components/stealtime/linux-stealtime.c:138
138 {
(gdb) bt
#0 _stealtime_init_component (cidx=13) at components/stealtime/linux-stealtime.c:138
#1 0x00007ffff7f36096 in _papi_hwi_init_global () at papi_internal.c:1951
#2 0x00007ffff7f3263a in PAPI_library_init (version=<optimized out>) at papi.c:1166
#3 0x0000555555556631 in main ()
(gdb) up
I have been able to reproduce the issue. I found an upstream patch in https://bitbucket.org/icl/papi/pull-requests/131 that addresses the problem: commit 3625bdbad9fd57d1cdb1e5615854545167d4adcb Author: Anthony Castaldo <TonyCastaldo.edu> Date: Wed Aug 26 17:18:29 2020 -0400 This modifies PAPI_library_init() to initialize components in two classes, separated by the initialization of the papi thread structure. The first class is those that need no thread structure, currently everything but perf_event and perf_event_uncore. Following the init of the threading structure, we init the second class (perf_event and perf_event_uncore) that DOES need the thread structure to successfully init_component(). This required a change to _papi_hwi_init_global(), to add an argument to distinguish which class it should initialize. Will work to get the patch into the rpms for rawhide, fc35, fc34, and fc33 Backported following patch that addresses the problem
commit 3625bdbad9fd57d1cdb1e5615854545167d4adcb
Author: Anthony Castaldo <TonyCastaldo.edu>
Date: Wed Aug 26 17:18:29 2020 -0400
This modifies PAPI_library_init() to initialize components in two classes,
separated by the initialization of the papi thread structure. The first class
is those that need no thread structure, currently everything but perf_event and
perf_event_uncore. Following the init of the threading structure, we init the
second class (perf_event and perf_event_uncore) that DOES need the thread
structure to successfully init_component(). This required a change to
_papi_hwi_init_global(), to add an argument to distinguish which class it
should initialize.
FEDORA-2021-752e807fdd has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-752e807fdd` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-752e807fdd See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-752e807fdd has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. |