From: kernel test robot <oliver.sang@intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <oe-lkp@lists.linux.dev>, <lkp@intel.com>, <oliver.sang@intel.com>
Subject: [bigeasy-staging:futex_local_v4.5] [futex] 51319c5cb6: BUG:sleeping_function_called_from_invalid_context_at_kernel/nsproxy.c
Date: Tue, 24 Dec 2024 15:36:50 +0800 [thread overview]
Message-ID: <202412241517.b81e285e-lkp@intel.com> (raw)
Hello,
we reported
"[bigeasy-staging:futex_local_v4.5] [futex] 51319c5cb6: stress-ng.pthread.ops_per_sec 68.4% regression"
in
https://lore.kernel.org/all/202412201111.1290bdf8-lkp@intel.com/
now we also notice one new issue as below. it doesn't always happen, but
with considerable rate, and keeps clean on parent by more runs.
7ee6fb8b9098b494 51319c5cb6c2f84994a14d11de0
---------------- ---------------------------
fail:runs %reproduction fail:runs
| | |
:50 34% 17:52 dmesg.BUG:scheduling_while_atomic
:50 34% 17:52 dmesg.BUG:sleeping_function_called_from_invalid_context_at_kernel/nsproxy.c
below full report FYI.
kernel test robot noticed "BUG:sleeping_function_called_from_invalid_context_at_kernel/nsproxy.c" on:
commit: 51319c5cb6c2f84994a14d11de0fc26321bed99d ("futex: Resize futex hash table based on number of threads.")
https://git.kernel.org/cgit/linux/kernel/git/bigeasy/staging.git futex_local_v4.5
in testcase: xfstests
version: xfstests-x86_64-8467552f-1_20241215
with following parameters:
disk: 4HDD
fs: xfs
test: xfs-scratch-reflink-06
config: x86_64-rhel-9.4-func
compiler: gcc-12
test machine: 4 threads Intel(R) Xeon(R) CPU E3-1225 v5 @ 3.30GHz (Skylake) with 16G memory
(please refer to attached dmesg/kmsg for entire log/backtrace)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202412241517.b81e285e-lkp@intel.com
[ 145.073215][ C1] BUG: sleeping function called from invalid context at kernel/nsproxy.c:243
[ 145.073222][ C1] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3374, name: xfs_repair
[ 145.073224][ C1] preempt_count: 7ffffffe, expected: 0
[ 145.073226][ C1] RCU nest depth: 0, expected: 0
[ 145.073229][ C1] CPU: 1 UID: 0 PID: 3374 Comm: xfs_repair Tainted: G S 6.13.0-rc1-00008-g51319c5cb6c2 #1
[ 145.073234][ C1] Tainted: [S]=CPU_OUT_OF_SPEC
[ 145.073235][ C1] Hardware name: HP HP Z238 Microtower Workstation/8183, BIOS N51 Ver. 01.63 10/05/2017
[ 145.073236][ C1] Call Trace:
[ 145.073238][ C1] <TASK>
[ 145.073239][ C1] dump_stack_lvl (lib/dump_stack.c:123 (discriminator 1))
[ 145.073247][ C1] __might_resched (kernel/sched/core.c:8759)
[ 145.073252][ C1] ? free_pid (kernel/pid.c:163)
[ 145.073255][ C1] switch_task_namespaces (include/linux/kernel.h:73 kernel/nsproxy.c:243)
[ 145.073259][ C1] copy_process (kernel/fork.c:2678)
[ 145.073264][ C1] ? __pfx_copy_process (kernel/fork.c:2153)
[ 145.073267][ C1] ? _inline_copy_from_user (arch/x86/include/asm/uaccess_64.h:134 arch/x86/include/asm/uaccess_64.h:134 arch/x86/include/asm/uaccess_64.h:141 include/linux/uaccess.h:178)
[ 145.073271][ C1] ? copy_clone_args_from_user (include/linux/uaccess.h:401 kernel/fork.c:2999)
[ 145.073275][ C1] kernel_clone (include/linux/random.h:26 kernel/fork.c:2832)
[ 145.073277][ C1] ? __pfx_kernel_clone (kernel/fork.c:2791)
[ 145.073279][ C1] ? __pfx___alloc_pages_noprof (mm/page_alloc.c:4717)
[ 145.073283][ C1] ? __pfx_mm_cid_get+0x10/0x10
[ 145.073286][ C1] __do_sys_clone3 (kernel/fork.c:3135)
[ 145.073289][ C1] ? __pfx___do_sys_clone3 (kernel/fork.c:3115)
[ 145.073292][ C1] ? __pfx_try_charge_memcg (mm/memcontrol.c:2186)
[ 145.073296][ C1] ? __memcg_slab_post_alloc_hook (mm/memcontrol.c:3001 (discriminator 2))
[ 145.073299][ C1] ? _raw_spin_lock_irq (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170)
[ 145.073302][ C1] ? __pfx__raw_spin_lock_irq (kernel/locking/spinlock.c:169)
[ 145.073304][ C1] ? __mod_memcg_lruvec_state (mm/memcontrol.c:583 mm/memcontrol.c:766)
[ 145.073307][ C1] ? __pfx__raw_spin_lock (kernel/locking/spinlock.c:153)
[ 145.073309][ C1] ? recalc_sigpending (arch/x86/include/asm/bitops.h:75 include/asm-generic/bitops/instrumented-atomic.h:42 include/linux/thread_info.h:102 kernel/signal.c:180 kernel/signal.c:177)
[ 145.073313][ C1] ? sigprocmask (kernel/signal.c:3242)
[ 145.073315][ C1] ? __lruvec_stat_mod_folio (mm/memcontrol.c:811)
[ 145.073318][ C1] do_syscall_64 (arch/x86/entry/common.c:52 arch/x86/entry/common.c:83)
[ 145.073321][ C1] ? __pfx_sigprocmask (kernel/signal.c:3219)
[ 145.073324][ C1] ? __folio_mod_stat (mm/rmap.c:1303)
[ 145.073328][ C1] ? _copy_to_user (arch/x86/include/asm/uaccess_64.h:126 arch/x86/include/asm/uaccess_64.h:147 include/linux/uaccess.h:197 lib/usercopy.c:26)
[ 145.073330][ C1] ? __x64_sys_rt_sigprocmask (kernel/signal.c:3324 kernel/signal.c:3301 kernel/signal.c:3301)
[ 145.073333][ C1] ? __pfx___x64_sys_rt_sigprocmask (kernel/signal.c:3301)
[ 145.073337][ C1] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:232 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 145.073340][ C1] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 145.073343][ C1] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162)
[ 145.073345][ C1] ? __pfx__raw_spin_lock_irqsave (kernel/locking/spinlock.c:161)
[ 145.073347][ C1] ? mt_find (lib/maple_tree.c:6950)
[ 145.073350][ C1] ? try_to_wake_up (kernel/sched/core.c:4168)
[ 145.073353][ C1] ? wake_q_add (arch/x86/include/asm/atomic.h:93 include/linux/atomic/atomic-arch-fallback.h:749 include/linux/atomic/atomic-instrumented.h:253 include/linux/refcount.h:184 include/linux/refcount.h:241 include/linux/refcount.h:258 include/linux/sched/task.h:119 kernel/sched/core.c:1024)
[ 145.073356][ C1] ? __pfx_try_to_wake_up (kernel/sched/core.c:4168)
[ 145.073359][ C1] ? rwsem_mark_wake (kernel/locking/rwsem.c:434)
[ 145.073363][ C1] ? __pfx_rwsem_mark_wake (kernel/locking/rwsem.c:412)
[ 145.073366][ C1] ? __asan_memset (mm/kasan/shadow.c:84)
[ 145.073369][ C1] ? rseq_ip_fixup (kernel/rseq.c:257 kernel/rseq.c:291)
[ 145.073373][ C1] ? __pfx_rseq_ip_fixup (kernel/rseq.c:275)
[ 145.073376][ C1] ? __pfx_mem_cgroup_handle_over_high (mm/memcontrol.c:2092)
[ 145.073379][ C1] ? do_user_addr_fault (include/linux/mmap_lock.h:171 arch/x86/mm/fault.c:1417)
[ 145.073383][ C1] ? fpregs_restore_userregs (arch/x86/include/asm/bitops.h:75 include/asm-generic/bitops/instrumented-atomic.h:42 include/linux/thread_info.h:102 arch/x86/kernel/fpu/context.h:79)
[ 145.073387][ C1] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
[ 145.073391][ C1] RIP: 0033:0x7f340071d849
[ 145.073394][ C1] Code: 31 ed e9 44 ff ff ff e8 25 e9 00 00 0f 1f 44 00 00 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
All code
========
0: 31 ed xor %ebp,%ebp
2: e9 44 ff ff ff jmp 0xffffffffffffff4b
7: e8 25 e9 00 00 call 0xe931
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: b8 ea ff ff ff mov $0xffffffea,%eax
16: 48 85 ff test %rdi,%rdi
19: 74 2c je 0x47
1b: 48 85 d2 test %rdx,%rdx
1e: 74 27 je 0x47
20: 49 89 c8 mov %rcx,%r8
23: b8 b3 01 00 00 mov $0x1b3,%eax
28: 0f 05 syscall
2a:* 48 85 c0 test %rax,%rax <-- trapping instruction
2d: 7c 18 jl 0x47
2f: 74 01 je 0x32
31: c3 ret
32: 31 ed xor %ebp,%ebp
34: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
38: 4c 89 c7 mov %r8,%rdi
3b: ff d2 call *%rdx
3d: 48 89 c7 mov %rax,%rdi
Code starting with the faulting instruction
===========================================
0: 48 85 c0 test %rax,%rax
3: 7c 18 jl 0x1d
5: 74 01 je 0x8
7: c3 ret
8: 31 ed xor %ebp,%ebp
a: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
e: 4c 89 c7 mov %r8,%rdi
11: ff d2 call *%rdx
13: 48 89 c7 mov %rax,%rdi
[ 145.073397][ C1] RSP: 002b:00007f33b4ff8988 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
[ 145.073400][ C1] RAX: ffffffffffffffda RBX: 00007f340069cef0 RCX: 00007f340071d849
[ 145.073402][ C1] RDX: 00007f340069cef0 RSI: 0000000000000058 RDI: 00007f33b4ff89d0
[ 145.073404][ C1] RBP: 00007f33f20fa680 R08: 00007f33f20fa680 R09: 00007f33b4ff8ac7
[ 145.073405][ C1] R10: 0000000000000008 R11: 0000000000000206 R12: fffffffffffffd80
[ 145.073407][ C1] R13: 0000000000000000 R14: 00007f33b4ff89d0 R15: 00007f33f18fa000
[ 145.073410][ C1] </TASK>
[ 145.073416][ C1] BUG: scheduling while atomic: xfs_repair/3374/0x7fffffff
[ 145.073418][ C1] Modules linked in:
[ 145.073420][ T3374] xfs btrfs blake2b_generic xor zstd_compress raid6_pq libcrc32c snd_soc_avs snd_soc_hda_codec snd_hda_codec_hdmi snd_hda_ext_core sd_mod intel_rapl_msr intel_rapl_common snd_hda_codec_realtek snd_soc_core snd_hda_codec_generic snd_hda_scodec_component x86_pkg_temp_thermal intel_powerclamp snd_compress coretemp sg snd_hda_intel snd_intel_dspcfg kvm_intel snd_intel_sdw_acpi ipmi_devintf ipmi_msghandler i915 kvm snd_hda_codec cec crct10dif_pclmul crc32_pclmul snd_hda_core intel_gtt crc32c_intel snd_hwdep drm_buddy ghash_clmulni_intel mei_wdt wmi_bmof ttm snd_pcm rapl ahci libahci intel_cstate drm_display_helper snd_timer snd drm_kms_helper video serio_raw pcspkr intel_uncore soundcore mei_me i2c_i801 intel_pmc_core intel_pch_thermal libata ie31200_edac i2c_smbus mei intel_vsec pmt_telemetry pmt_class wmi acpi_pad binfmt_misc loop fuse drm dm_mod ip_tables
[ 145.448098][ C1]
[ 145.448101][ C1] CPU: 1 UID: 0 PID: 3374 Comm: xfs_repair Tainted: G S W 6.13.0-rc1-00008-g51319c5cb6c2 #1
[ 145.448106][ C1] Tainted: [S]=CPU_OUT_OF_SPEC, [W]=WARN
[ 145.448107][ C1] Hardware name: HP HP Z238 Microtower Workstation/8183, BIOS N51 Ver. 01.63 10/05/2017
[ 145.448108][ C1] Call Trace:
[ 145.448124][ C1] <TASK>
[ 145.448125][ C1] dump_stack_lvl (lib/dump_stack.c:123 (discriminator 1))
[ 145.448131][ C1] __schedule_bug (kernel/sched/core.c:5930)
[ 145.448136][ C1] schedule_debug (arch/x86/include/asm/preempt.h:33 kernel/sched/core.c:5957)
[ 145.448138][ C1] ? __do_sys_clone3 (kernel/fork.c:3135)
[ 145.448141][ C1] __schedule (arch/x86/include/asm/jump_label.h:36 include/linux/jump_label.h:207 kernel/sched/features.h:57 kernel/sched/core.c:6657)
[ 145.448144][ C1] ? __pfx___schedule (kernel/sched/core.c:6637)
[ 145.448147][ C1] ? __pfx_try_charge_memcg (mm/memcontrol.c:2186)
[ 145.448164][ C1] ? __memcg_slab_post_alloc_hook (mm/memcontrol.c:3001 (discriminator 2))
[ 145.448167][ C1] ? _raw_spin_lock_irq (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:120 kernel/locking/spinlock.c:170)
[ 145.448170][ C1] schedule (arch/x86/include/asm/preempt.h:84 kernel/sched/core.c:6834 kernel/sched/core.c:6848)
[ 145.448173][ C1] syscall_exit_to_user_mode (kernel/entry/common.c:102 include/linux/entry-common.h:329 kernel/entry/common.c:207 kernel/entry/common.c:218)
[ 145.448176][ C1] do_syscall_64 (arch/x86/entry/common.c:102)
[ 145.448178][ C1] ? __pfx_sigprocmask (kernel/signal.c:3219)
[ 145.448181][ C1] ? __folio_mod_stat (mm/rmap.c:1303)
[ 145.448185][ C1] ? _copy_to_user (arch/x86/include/asm/uaccess_64.h:126 arch/x86/include/asm/uaccess_64.h:147 include/linux/uaccess.h:197 lib/usercopy.c:26)
[ 145.448189][ C1] ? __x64_sys_rt_sigprocmask (kernel/signal.c:3324 kernel/signal.c:3301 kernel/signal.c:3301)
[ 145.448207][ C1] ? __pfx___x64_sys_rt_sigprocmask (kernel/signal.c:3301)
[ 145.448211][ C1] ? syscall_exit_to_user_mode (arch/x86/include/asm/irqflags.h:37 arch/x86/include/asm/irqflags.h:92 include/linux/entry-common.h:232 kernel/entry/common.c:206 kernel/entry/common.c:218)
[ 145.448213][ C1] ? do_syscall_64 (arch/x86/entry/common.c:102)
[ 145.448215][ C1] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:107 include/linux/atomic/atomic-arch-fallback.h:2170 include/linux/atomic/atomic-instrumented.h:1302 include/asm-generic/qspinlock.h:111 include/linux/spinlock.h:187 include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162)
[ 145.448218][ C1] ? __pfx__raw_spin_lock_irqsave (kernel/locking/spinlock.c:161)
[ 145.448233][ C1] ? mt_find (lib/maple_tree.c:6950)
[ 145.448236][ C1] ? try_to_wake_up (kernel/sched/core.c:4168)
[ 145.448239][ C1] ? wake_q_add (arch/x86/include/asm/atomic.h:93 include/linux/atomic/atomic-arch-fallback.h:749 include/linux/atomic/atomic-instrumented.h:253 include/linux/refcount.h:184 include/linux/refcount.h:241 include/linux/refcount.h:258 include/linux/sched/task.h:119 kernel/sched/core.c:1024)
[ 145.448242][ C1] ? __pfx_try_to_wake_up (kernel/sched/core.c:4168)
[ 145.448245][ C1] ? rwsem_mark_wake (kernel/locking/rwsem.c:434)
[ 145.448249][ C1] ? __pfx_rwsem_mark_wake (kernel/locking/rwsem.c:412)
[ 145.448252][ C1] ? __asan_memset (mm/kasan/shadow.c:84)
[ 145.448256][ C1] ? rseq_ip_fixup (kernel/rseq.c:257 kernel/rseq.c:291)
[ 145.448259][ C1] ? __pfx_rseq_ip_fixup (kernel/rseq.c:275)
[ 145.448262][ C1] ? __pfx_mem_cgroup_handle_over_high (mm/memcontrol.c:2092)
[ 145.448265][ C1] ? do_user_addr_fault (include/linux/mmap_lock.h:171 arch/x86/mm/fault.c:1417)
[ 145.448268][ C1] ? fpregs_restore_userregs (arch/x86/include/asm/bitops.h:75 include/asm-generic/bitops/instrumented-atomic.h:42 include/linux/thread_info.h:102 arch/x86/kernel/fpu/context.h:79)
[ 145.448273][ C1] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
[ 145.448277][ C1] RIP: 0033:0x7f340071d849
[ 145.448280][ C1] Code: 31 ed e9 44 ff ff ff e8 25 e9 00 00 0f 1f 44 00 00 b8 ea ff ff ff 48 85 ff 74 2c 48 85 d2 74 27 49 89 c8 b8 b3 01 00 00 0f 05 <48> 85 c0 7c 18 74 01 c3 31 ed 48 83 e4 f0 4c 89 c7 ff d2 48 89 c7
All code
========
0: 31 ed xor %ebp,%ebp
2: e9 44 ff ff ff jmp 0xffffffffffffff4b
7: e8 25 e9 00 00 call 0xe931
c: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
11: b8 ea ff ff ff mov $0xffffffea,%eax
16: 48 85 ff test %rdi,%rdi
19: 74 2c je 0x47
1b: 48 85 d2 test %rdx,%rdx
1e: 74 27 je 0x47
20: 49 89 c8 mov %rcx,%r8
23: b8 b3 01 00 00 mov $0x1b3,%eax
28: 0f 05 syscall
2a:* 48 85 c0 test %rax,%rax <-- trapping instruction
2d: 7c 18 jl 0x47
2f: 74 01 je 0x32
31: c3 ret
32: 31 ed xor %ebp,%ebp
34: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
38: 4c 89 c7 mov %r8,%rdi
3b: ff d2 call *%rdx
3d: 48 89 c7 mov %rax,%rdi
Code starting with the faulting instruction
===========================================
0: 48 85 c0 test %rax,%rax
3: 7c 18 jl 0x1d
5: 74 01 je 0x8
7: c3 ret
8: 31 ed xor %ebp,%ebp
a: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
e: 4c 89 c7 mov %r8,%rdi
11: ff d2 call *%rdx
13: 48 89 c7 mov %rax,%rdi
[ 145.448282][ C1] RSP: 002b:00007f33b4ff8988 EFLAGS: 00000206 ORIG_RAX: 00000000000001b3
[ 145.448285][ C1] RAX: ffffffffffffffea RBX: 00007f340069cef0 RCX: 00007f340071d849
[ 145.448287][ C1] RDX: 00007f340069cef0 RSI: 0000000000000058 RDI: 00007f33b4ff89d0
[ 145.448289][ C1] RBP: 00007f33f20fa680 R08: 00007f33f20fa680 R09: 00007f33b4ff8ac7
[ 145.448290][ C1] R10: 0000000000000008 R11: 0000000000000206 R12: fffffffffffffd80
[ 145.448292][ C1] R13: 0000000000000000 R14: 00007f33b4ff89d0 R15: 00007f33f18fa000
[ 145.448295][ C1] </TASK>
[ 156.427599][ T281] _check_xfs_filesystem: filesystem on /dev/sda4 is inconsistent (r)
[ 156.427609][ T281]
[ 156.439078][ T281] (see /lkp/benchmarks/xfstests/results//xfs/127.full for details)
[ 156.439125][ T281]
[ 156.472482][ T281] _check_dmesg: something found in dmesg (see /lkp/benchmarks/xfstests/results//xfs/127.dmesg)
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20241224/202412241517.b81e285e-lkp@intel.com
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-12-24 7:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202412241517.b81e285e-lkp@intel.com \
--to=oliver.sang@intel.com \
--cc=bigeasy@linutronix.de \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.