From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 620353858C1F; Sat, 29 Apr 2023 22:03:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 620353858C1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1682805781; bh=8kr5tMQ5h1arss5FO3tYWkz4DfjOsTsLwa2W8ZDZo4I=; h=From:To:Subject:Date:From; b=gPI7KuJAjjJm3gmzqGQfJNSFtJZI5IRtCvLPan94xiBVk2C46gvIjCKVAJQ2R2A9E A75HiQcTzpGY8A4zmqzoLpO24i9ghmV8OcIyldIyjg9D32bCwO83lULGObuJEJbdU1 gTp469i3+f1uHvjzCyLdWTSgbQRnPl/R19rQ7hfw= From: "agentzh at gmail dot com" To: systemtap@sourceware.org Subject: [Bug runtime/30405] New: Kernel errors with Fedora 36's 6.2.12 debug kernels Date: Sat, 29 Apr 2023 22:03:00 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: agentzh at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30405 Bug ID: 30405 Summary: Kernel errors with Fedora 36's 6.2.12 debug kernels Product: systemtap Version: unspecified Status: UNCONFIRMED Severity: normal Priority: P2 Component: runtime Assignee: systemtap at sourceware dot org Reporter: agentzh at gmail dot com Target Milestone: --- We noted that when using Fedora 36 x86_64's latest kernel-debug kernel, 6.2.12-100.fc36.x86_64+debug, when using a minimal kprobes stap script, the kernel always reports the following error in dmesg: ``` [ 89.347060] stap_f93d809e35e31d9f81df52024bfed1b5__230 (a.stp): systemta= p: 4.9/0.188, base: ffffffffc06ec000, memory: 52data/28text/25ctx/524390net/389alloc kb, probes: 1 [ 89.347073] BUG: sleeping function called from invalid context at kernel/kallsyms.c:305 [ 89.347076] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1831, name: stapio [ 89.347078] preempt_count: 1, expected: 0 [ 89.347080] RCU nest depth: 0, expected: 0 [ 89.347081] 3 locks held by stapio/1831: [ 89.347083] #0: ffff88810d1ceef8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x52/0x60 [ 89.347094] #1: ffff88816f73c498 (sb_writers#3){.+.+}-{0:0}, at: ksys_write+0x74/0xf0 [ 89.347104] #2: ffffffffc06f9330 (cmd_mutex){+.+.}-{3:3}, at: _stp_ctl_write_cmd+0xe2/0xe10 [stap_f93d809e35e31d9f81df52024bfed1b5__230] [ 89.347116] Preemption disabled at: [ 89.347117] [] _stp_ctl_write_cmd+0xd48/0xe10 [stap_f93d809e35e31d9f81df52024bfed1b5__230] [ 89.347124] CPU: 20 PID: 1831 Comm: stapio Tainted: G OE=20=20= =20=20=20 6.2.12-100.fc36.x86_64+debug #1 [ 89.347127] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1.fc35 04/01/2014 [ 89.347129] Call Trace: [ 89.347131] [ 89.347133] dump_stack_lvl+0x71/0x90 [ 89.347143] __might_resched+0x1c2/0x2e0 [ 89.347148] ? __pfx_stapkp_symbol_callback+0x10/0x10 [stap_f93d809e35e31d9f81df52024bfed1b5__230] [ 89.347154] kallsyms_on_each_symbol+0x6a/0xf0 [ 89.347184] _stp_ctl_write_cmd+0xd62/0xe10 [stap_f93d809e35e31d9f81df52024bfed1b5__230] [ 89.347189] ? lock_acquire+0xe2/0x2c0 [ 89.347196] proc_reg_write+0x53/0xa0 [ 89.347200] vfs_write+0xea/0x530 [ 89.347203] ? __fdget_pos+0x52/0x60 [ 89.347211] ksys_write+0x74/0xf0 [ 89.347215] do_syscall_64+0x58/0x80 [ 89.347221] ? kvm_sched_clock_read+0x14/0x40 [ 89.347224] ? sched_clock_cpu+0xb/0xc0 [ 89.347227] ? lock_release+0x15d/0x400 [ 89.347230] ? _raw_spin_unlock_irq+0x24/0x50 [ 89.347237] ? _raw_spin_unlock_irq+0x24/0x50 [ 89.347240] ? lockdep_hardirqs_on+0x7d/0x100 [ 89.347245] ? _raw_spin_unlock_irq+0x34/0x50 [ 89.347248] ? syscall_exit_to_user_mode+0xe/0x50 [ 89.347252] ? do_syscall_64+0x67/0x80 [ 89.347254] ? lockdep_hardirqs_on+0x7d/0x100 [ 89.347256] ? do_syscall_64+0x67/0x80 [ 89.347259] ? lockdep_hardirqs_on+0x7d/0x100 [ 89.347261] entry_SYSCALL_64_after_hwframe+0x72/0xdc [ 89.347267] RIP: 0033:0x7f0d4ccdbc6f [ 89.347270] Code: 89 54 24 18 48 89 74 24 10 89 7c 24 08 e8 09 76 f8 ff = 48 8b 54 24 18 48 8b 74 24 10 41 89 c0 8b 7c 24 08 b8 01 00 00 00 0f 05 <48> 3= d 00 f0 ff ff 77 31 44 89 c7 48 89 44 24 08 e8 5c 76 f8 ff 48 [ 89.347272] RSP: 002b:00007ffe6bb215c0 EFLAGS: 00000293 ORIG_RAX: 0000000000000001 [ 89.347275] RAX: ffffffffffffffda RBX: 0000000000000008 RCX: 00007f0d4ccdbc6f [ 89.347277] RDX: 000000000000000c RSI: 00007ffe6bb215f0 RDI: 0000000000000004 [ 89.347278] RBP: 000000000000000c R08: 0000000000000000 R09: 00007ffe6bb2077f [ 89.347280] R10: 0000000000000008 R11: 0000000000000293 R12: 00007ffe6bb21a50 [ 89.347281] R13: 00007ffe6bb23c80 R14: 0000000000000001 R15: 00007ffe6bb21ad4 [ 89.347291] ``` The a.stp file is defined as ``` probe kprobe.function("finish_task_switch") ?, kprobe.function("finish_task_switch.*") ? { println("Hit"); exit(); } ``` I'm using the latest master branch of the upstream systemtap repo as of this wring (commit 418f0a45ca447). --=20 You are receiving this mail because: You are the assignee for the bug.=