Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1713556

Summary: [kernel-rt-debug] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974
Product: Red Hat Enterprise Linux 8 Reporter: Qiao Zhao <qzhao>
Component: systemtapAssignee: Frank Ch. Eigler <fche>
systemtap sub component: system-version QA Contact: qe-baseos-tools-bugs
Status: CLOSED WONTFIX Docs Contact:
Severity: unspecified    
Priority: unspecified CC: bhu, dsmith, jlelli, lberk, lgoncalv, mcermak, mjw, mstowell, smakarov, williams
Version: 8.1Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-01 07:41:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1842946    

Description Qiao Zhao 2019-05-24 06:32:19 UTC
Description of problem:

[ 4080.969720] Kprobes globally unoptimized 
[ 4081.030840] stap_ca0b13e550773d853fefa0289b5cd6_155846: loading out-of-tree module taints kernel. 
[ 4081.042795] stap_ca0b13e550773d853fefa0289b5cd6_155846: module verification failed: signature and/or required key missing - tainting kernel 
[ 4081.501077] stap_ca0b13e550773d853fefa0289b5cd6_155846 (group.stap): systemtap: 4.1/0.176, base: 00000000ba0198b9, memory: 216data/160text/40ctx/2063net/881alloc kb, probes: 32 
[ 4082.123330] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 
[ 4082.123332] in_atomic(): 1, irqs_disabled(): 0, pid: 155846, name: stapio 
[ 4082.123333] INFO: lockdep is turned off. 
[ 4082.123334] Preemption disabled at: 
[ 4082.123344] [<ffffffffc15b79d8>] systemtap_module_exit+0x3f8/0xb30 [stap_ca0b13e550773d853fefa0289b5cd6_155846] 
[ 4082.123349] CPU: 54 PID: 155846 Comm: stapio Kdump: loaded Tainted: G        W  OE    --------- -  - 4.18.0-93.rt16.33.el8.x86_64+debug #1 
[ 4082.123350] Hardware name: FUJITSU PRIMEQUEST 3800E/D3858-A1, BIOS V1.0.0.0 R1.68.0 for D3858-A1x            08/16/2018 
[ 4082.123351] Call Trace: 
[ 4082.123361]  dump_stack+0x9a/0xf0 
[ 4082.123369]  ___might_sleep.cold.72+0x188/0x1bb 
[ 4082.123375]  rt_spin_lock+0x75/0x90 
[ 4082.123380]  ? free_percpu+0x37/0x720 
[ 4082.123382]  free_percpu+0x37/0x720 
[ 4082.123389]  _stp_stat_free+0x32/0x70 [stap_ca0b13e550773d853fefa0289b5cd6_155846] 
[ 4082.123394]  ? systemtap_module_exit+0x4b8/0xb30 [stap_ca0b13e550773d853fefa0289b5cd6_155846] 
[ 4082.123400]  ? _stp_cleanup_and_exit+0x10d/0x130 [stap_ca0b13e550773d853fefa0289b5cd6_155846] 
[ 4082.123404]  ? _stp_ctl_write_cmd+0x598/0x660 [stap_ca0b13e550773d853fefa0289b5cd6_155846] 
[ 4082.123411]  ? full_proxy_write+0xf3/0x190 
[ 4082.123418]  ? __sb_start_write+0x26a/0x3f0 
[ 4082.123422]  ? vfs_write+0x15c/0x4b0 
[ 4082.123426]  ? ksys_write+0xb8/0x170 
[ 4082.123429]  ? __ia32_sys_read+0xb0/0xb0 
[ 4082.123438]  ? do_syscall_64+0xa5/0x4a0 
[ 4082.123442]  ? entry_SYSCALL_64_after_hwframe+0x6a/0xdf 
[ 4096.006203] restraintd[2901]: *** Current Time: Thu May 23 10:40:54 2019 Localwatchdog at: Thu May 23 13:08:54 2019 
[ 4119.338165] stap_96cc52abf9a341a3969eda47a6fcab_156745 (group.stap): systemtap: 4.1/0.176, base: 00000000e60369f9, memory: 216data/160text/40ctx/2063net/881alloc kb, probes: 32 
[ 4119.964479] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 
[ 4119.964481] in_atomic(): 1, irqs_disabled(): 0, pid: 156745, name: stapio 
[ 4119.964482] INFO: lockdep is turned off. 
[ 4119.964483] Preemption disabled at: 
[ 4119.964492] [<ffffffffc1c1f9d8>] systemtap_module_exit+0x3f8/0xb30 [stap_96cc52abf9a341a3969eda47a6fcab_156745] 
[ 4119.964496] CPU: 3 PID: 156745 Comm: stapio Kdump: loaded Tainted: G        W  OE    --------- -  - 4.18.0-93.rt16.33.el8.x86_64+debug #1 
[ 4119.964497] Hardware name: FUJITSU PRIMEQUEST 3800E/D3858-A1, BIOS V1.0.0.0 R1.68.0 for D3858-A1x            08/16/2018 
[ 4119.964498] Call Trace: 
[ 4119.964508]  dump_stack+0x9a/0xf0 
[ 4119.964517]  ___might_sleep.cold.72+0x188/0x1bb 
[ 4119.964523]  rt_spin_lock+0x75/0x90 
[ 4119.964527]  ? free_percpu+0x37/0x720 
[ 4119.964529]  free_percpu+0x37/0x720 
[ 4119.964537]  _stp_stat_free+0x32/0x70 [stap_96cc52abf9a341a3969eda47a6fcab_156745] 
[ 4119.964541]  ? systemtap_module_exit+0x4b8/0xb30 [stap_96cc52abf9a341a3969eda47a6fcab_156745] 
[ 4119.964548]  ? _stp_cleanup_and_exit+0x10d/0x130 [stap_96cc52abf9a341a3969eda47a6fcab_156745] 
[ 4119.964552]  ? _stp_ctl_write_cmd+0x598/0x660 [stap_96cc52abf9a341a3969eda47a6fcab_156745] 
[ 4119.964559]  ? full_proxy_write+0xf3/0x190 
[ 4119.964567]  ? __sb_start_write+0x26a/0x3f0 
[ 4119.964571]  ? vfs_write+0x15c/0x4b0 
[ 4119.964575]  ? ksys_write+0xb8/0x170 
[ 4119.964577]  ? __ia32_sys_read+0xb0/0xb0 
[ 4119.964587]  ? do_syscall_64+0xa5/0x4a0 
[ 4119.964591]  ? entry_SYSCALL_64_after_hwframe+0x6a/0xdf 
[ 4156.031537] restraintd[2901]: *** Current Time: Thu May 23 10:41:54 2019 Localwatchdog at: Thu May 23 13:08:54 2019 
[ 4157.528470] stap_7306352c9a2ed50df8ba91e82f47ba_157645 (group.stap): systemtap: 4.1/0.176, base: 00000000ba0198b9, memory: 216data/160text/40ctx/2063net/881alloc kb, probes: 32 
[ 4158.139969] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 
[ 4158.139971] in_atomic(): 1, irqs_disabled(): 0, pid: 157645, name: stapio 
[ 4158.139972] INFO: lockdep is turned off. 
[ 4158.139973] Preemption disabled at: 
[ 4158.139982] [<ffffffffc15b79d8>] systemtap_module_exit+0x3f8/0xb30 [stap_7306352c9a2ed50df8ba91e82f47ba_157645] 
[ 4158.139987] CPU: 57 PID: 157645 Comm: stapio Kdump: loaded Tainted: G        W  OE    --------- -  - 4.18.0-93.rt16.33.el8.x86_64+debug #1 
[ 4158.139989] Hardware name: FUJITSU PRIMEQUEST 3800E/D3858-A1, BIOS V1.0.0.0 R1.68.0 for D3858-A1x            08/16/2018 
[ 4158.139990] Call Trace: 
[ 4158.140000]  dump_stack+0x9a/0xf0 
[ 4158.140007]  ___might_sleep.cold.72+0x188/0x1bb 
[ 4158.140013]  rt_spin_lock+0x75/0x90 
[ 4158.140017]  ? free_percpu+0x37/0x720 
[ 4158.140019]  free_percpu+0x37/0x720 
[ 4158.140027]  _stp_stat_free+0x32/0x70 [stap_7306352c9a2ed50df8ba91e82f47ba_157645] 
[ 4158.140031]  ? systemtap_module_exit+0x4b8/0xb30 [stap_7306352c9a2ed50df8ba91e82f47ba_157645] 
[ 4158.140038]  ? _stp_cleanup_and_exit+0x10d/0x130 [stap_7306352c9a2ed50df8ba91e82f47ba_157645] 
[ 4158.140042]  ? _stp_ctl_write_cmd+0x598/0x660 [stap_7306352c9a2ed50df8ba91e82f47ba_157645] 
[ 4158.140049]  ? full_proxy_write+0xf3/0x190 
[ 4158.140057]  ? __sb_start_write+0x26a/0x3f0 
[ 4158.140061]  ? vfs_write+0x15c/0x4b0 
[ 4158.140065]  ? ksys_write+0xb8/0x170 
[ 4158.140068]  ? __ia32_sys_read+0xb0/0xb0 
[ 4158.140077]  ? do_syscall_64+0xa5/0x4a0 
[ 4158.140080]  ? entry_SYSCALL_64_after_hwframe+0x6a/0xdf 
[ 4195.545100] stap_0fbb2af53c74a9bf8212f571667407_158533 (group.stap): systemtap: 4.1/0.176, base: 00000000e60369f9, memory: 216data/160text/40ctx/2063net/881alloc kb, probes: 32 
[ 4196.165812] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 
[ 4196.165814] in_atomic(): 1, irqs_disabled(): 0, pid: 158533, name: stapio 

Version-Release number of selected component (if applicable):
kernel-rt-debug-4.18.0-93.rt16.33.el8 

How reproducible:
always

Steps to Reproduce:
1. Running tracepoint case on rt debug kernel.
   Case: /kernel/tracepoints/operational 
2. 
3.

Actual results:


Expected results:


Additional info:
The same test case doesn't happen on non-debug kernel.

Comment 2 Clark Williams 2019-05-28 19:35:51 UTC
This looks a lot like a known bug where systemtap interacts badly with RT's locking changes. Reassigning to the systemtap component.

Comment 3 Frank Ch. Eigler 2019-05-28 19:40:02 UTC
Yeah it looks like we free while something is holding a lock, very likely our bug.

Comment 4 Serguei Makarov 2019-05-28 21:10:36 UTC
See related work on RHBZ1272304. This is not a quick bug to fix. There are a number of SystemTap runtime components must be changed as they interact with locking in a way not planned for by RT.

Comment 9 Frank Ch. Eigler 2021-01-05 16:37:55 UTC
btw systemtap-4.4-6.el8 contains the fixes we hoped would improve -rt stability too; they do great for latent problems on non-rt kernels.

Comment 10 RHEL Program Management 2021-02-01 07:41:01 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.