Bug 31907 - STP_TIMING: BUG: using smp_processor_id() in preemptible on debug kernels
Summary: STP_TIMING: BUG: using smp_processor_id() in preemptible on debug kernels
Status: UNCONFIRMED
Alias: None
Product: systemtap
Classification: Unclassified
Component: runtime (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-18 23:09 UTC by agentzh
Modified: 2024-06-18 23:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description agentzh 2024-06-18 23:09:44 UTC
We've noted that while running systemtap with STP_TIMING and debug kernels, we would see kernel error messages like this:

```
    [ 4565.662398] BUG: using smp_processor_id() in preemptible [00000000] code: stapio/1158102
    [ 4565.662416] caller is _stp_stat_add+0x4c/0x6f3 [stap_timing_t1]
    [ 4565.662485] CPU: 10 PID: 1158102 Comm: stapio Kdump: loaded Tainted: GF       W  OE     -------  ---  5.14.0-362.8.1.el9_3.x86_64+debug #1
    [ 4565.662494] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.15.0-1 04/01/2014
    [ 4565.662508] Call Trace:
    [ 4565.662512]  <TASK>
    [ 4565.662521]  dump_stack_lvl+0x57/0x81
    [ 4565.662544]  check_preemption_disabled+0xdd/0xe0
    [ 4565.662556]  _stp_stat_add+0x4c/0x6f3 [stap_timing_t1]
    [ 4565.662594]  systemtap_module_init+0x3cf/0x480 [stap_timing_t1]
    [ 4565.662634]  _stp_handle_start+0xf8/0x310 [stap_timing_t1]
    [ 4565.662670]  _stp_ctl_write_cmd+0x309/0x410 [stap_timing_t1]
```

Will prepare a patch to fix this.
Comment 1 agentzh 2024-06-18 23:32:16 UTC
Pushed a fix as commit a85559e84.