ndctl-58 causing kernel panic w/ latest kernel
Testing ndctl-58 on our NVDIMM-Ns with the latest kernel (4.13.2) causes a panic when configuring a pmem device from raw to sector mode.
ndctl create-namespace -f -e namespace0.0 -m sector
I was not able to reproduce this issue using ndctl-57. Below is the stack trace from configuring a pmem device from raw to sector mode.
BUG: unable to handle kernel NULL pointer dereference at
0000000000000028
IP: holder_class_store+0x253/0x2b0 [libnvdimm]
PGD 101151c067
P4D 101151c067
PUD 101612f067
PMD 0
Oops: 0000 [#1] SMP Modules linked in: ... CPU: 28 PID: 3375 Comm: ndctl Not tainted 4.13.2 #1 task: ffff938a6b32dac0 task.stack: ffffb2c185bec000 RIP: 0010:holder_class_store+0x253/0x2b0 [libnvdimm] RSP: 0018:ffffb2c185befd70 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff93966949f808 RCX: 0000000000000000 RDX: ffff938a6b32dac0 RSI: ffff9392fdbc8264 RDI: ffff938a65af9018 RBP: ffffb2c185befdb8 R08: ffffffff9b8a58f0 R09: 000000000000004c R10: ffff93881fc07c00 R11: 0000000000000000 R12: ffff93966e799000 R13: ffff9392fdbc8260 R14: 0000000000000000 R15: 0000000000000000
FS: 00007fb73a01f780(0000) GS:ffff93966f100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 000000102a7c9000 CR4: 00000000007406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace: dev_attr_store+0x18/0x30 sysfs_kf_write+0x3a/0x50 kernfs_fop_write+0xff/0x180 __vfs_write+0x37/0x170 ? selinux_file_permission+0xe5/0x120 ? security_file_permission+0x3b/0xc0 vfs_write+0xb2/0x1b0 ? syscall_trace_enter+0x1d0/0x2b0 SyS_write+0x55/0xc0 do_syscall_64+0x67/0x150 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7fb739324840 RSP: 002b:00007ffc11306db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb739324840 RDX: 0000000000000004 RSI: 00007fb739c2ba3a RDI: 0000000000000003 RBP: 00007ffc11306e10 R08: 00007fb739283988 R09: 000000000000004c R10: 00000000fffffc00 R11: 0000000000000246 R12: 0000000000405b30 R13: 00007ffc113072d0 R14: 0000000000000000 R15: 0000000000000000 Code: 84 24 48 03 00 00 41 83 c6 01 41 39 c6 0f 8d e8 fe ff ff 49 63 c6 48 8d 04 80 48 c1 e0 04 49 8d bc 04 d0 03 00 00 e8 fd b4 ff ff <44> 8b 68 28 45 85 ed 79 8f 41 83 cf 01 eb c3 c7 83 e8 02 00 00 RIP: holder_class_store+0x253/0x2b0 [libnvdimm] RSP: ffffb2c185befd70 CR2: 0000000000000028 ---[ end trace 7a2cae9df6bf8f08 ]--- Kernel panic - not syncing: Fatal exception Kernel Offset: 0x1a000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff) ---[ end Kernel panic - not syncing: Fatal exception sched: Unexpected reschedule of offline CPU#0! ------------[ cut here ]------------ WARNING: CPU: 28 PID: 3375 at arch/x86/kernel/smp.c:128 native_smp_send_reschedule+0x3c/0x40 Modules linked in: xt_CHECKSUM ipt_MASQUERADE nf_nat_masquerade_ipv4
tun ip6t_rpfilter ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter vfat fat intel_rapl skx_edac x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm btrfs xor irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc raid6_pq aesni_intel crypto_simd ipmi_ssif ses glue_helper mei_me cryptd ioatdma enclosure joydev dax_pmem ipmi_si device_dax ipmi_devintf ipmi_msghandler hpwdt nd_pmem nd_btt nfit mei sg hpilo libnvdimm lpc_ich pcspkr wmi shpchp acpi_power_meter dca nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs sd_mod mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm i2c_core bnx2x mdio ptp smartpqi pps_core libcrc32c scsi_transport_sas crc32c_intel uas usb_storage dm_mirror dm_region_hash dm_log dm_mod
CPU: 28 PID: 3375 Comm: ndctl Tainted: G D 4.13.2 #1 task: ffff938a6b32dac0 task.stack: ffffb2c185bec000 RIP: 0010:native_smp_send_reschedule+0x3c/0x40 RSP: 0018:ffff93966f103cb0 EFLAGS: 00010046 RAX: 000000000000002e RBX: ffff939667403c80 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffff93966f10e018 RDI: ffff93966f10e018 RBP: ffff93966f103cb0 R08: 00000000fffffffe R09: 0000000000000676 R10: 0000000000000005 R11: 0000000000000675 R12: ffff93966740482c R13: 0000000000000004 R14: 0000000000000046 R15: 000000000001bcc0
FS: 00007fb73a01f780(0000) GS:ffff93966f100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000028 CR3: 000000102a7c9000 CR4: 00000000007406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
PKRU: 55555554
Call Trace: <IRQ> try_to_wake_up+0x3f4/0x470 ? enqueue_task_fair+0xb7/0x8a0 default_wake_function+0x12/0x20 __wake_up_common+0x73/0x90 __wake_up_locked+0x13/0x20 ep_poll_callback+0xd0/0x300 __wake_up_common+0x73/0x90 __wake_up+0x39/0x50 wake_up_klogd_work_func+0x40/0x60 irq_work_run_list+0x4d/0x70 ? tick_sched_do_timer+0x70/0x70 irq_work_tick+0x40/0x50 update_process_times+0x42/0x60 tick_sched_handle+0x2d/0x60 tick_sched_timer+0x39/0x70 __hrtimer_run_queues+0xe5/0x230 hrtimer_interrupt+0xa8/0x1a0 local_apic_timer_interrupt+0x35/0x60 smp_apic_timer_interrupt+0x38/0x50 apic_timer_interrupt+0x93/0xa0 RIP: 0010:panic+0x1fd/0x245 RSP: 0018:ffffb2c185befac0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff10 RAX: 0000000000000034 RBX: 0000000000000000 RCX: 0000000000000006 RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffff93966f10e010 RBP: ffffb2c185befb30 R08: 00000000fffffffe R09: 0000000000000675 R10: 0000000000000005 R11: 0000000000000674 R12: ffffffff9ba33fe8 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000046 </IRQ> oops_end+0xb8/0xd0 no_context+0x1a8/0x400 ? kmem_cache_alloc_trace+0x19b/0x1b0 __bad_area_nosemaphore+0xee/0x1d0 bad_area_nosemaphore+0x14/0x20 __do_page_fault+0x89/0x4a0 do_page_fault+0x30/0x80 ? terminate_walk+0xbd/0xd0 page_fault+0x28/0x30 RIP: 0010:holder_class_store+0x253/0x2b0 [libnvdimm] RSP: 0018:ffffb2c185befd70 EFLAGS: 00010202 RAX: 0000000000000000 RBX: ffff93966949f808 RCX: 0000000000000000 RDX: ffff938a6b32dac0 RSI: ffff9392fdbc8264 RDI: ffff938a65af9018 RBP: ffffb2c185befdb8 R08: ffffffff9b8a58f0 R09: 000000000000004c R10: ffff93881fc07c00 R11: 0000000000000000 R12: ffff93966e799000 R13: ffff9392fdbc8260 R14: 0000000000000000 R15: 0000000000000000 dev_attr_store+0x18/0x30 sysfs_kf_write+0x3a/0x50 kernfs_fop_write+0xff/0x180 __vfs_write+0x37/0x170 ? selinux_file_permission+0xe5/0x120 ? security_file_permission+0x3b/0xc0 vfs_write+0xb2/0x1b0 ? syscall_trace_enter+0x1d0/0x2b0 SyS_write+0x55/0xc0 do_syscall_64+0x67/0x150 entry_SYSCALL64_slow_path+0x25/0x25 RIP: 0033:0x7fb739324840 RSP: 002b:00007ffc11306db8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fb739324840 RDX: 0000000000000004 RSI: 00007fb739c2ba3a RDI: 0000000000000003 RBP: 00007ffc11306e10 R08: 00007fb739283988 R09: 000000000000004c R10: 00000000fffffc00 R11: 0000000000000246 R12: 0000000000405b30 R13: 00007ffc113072d0 R14: 0000000000000000 R15: 0000000000000000 Code: dd 00 0f 92 c0 84 c0 74 14 48 8b 05 6f 07 aa 00 be fd 00 00 00 ff 90 a0 00 00 00 5d c3 89 fe 48 c7 c7 28 b1 a3 9b e8 27 d8 09 00 <0f> ff 5d c3 0f 1f 44 00 00 55 48 89 e5 48 83 ec 20 65 48 8b 04 ---[ end trace 7a2cae9df6bf8f09 ]---
Sincerely,
Maurice
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 11 lines · Maurice A.
Testing ndctl-58 on our NVDIMM-Ns with the latest kernel (4.13.2) causes a panic when configuring a pmem device from raw to sector mode.
ndctl create-namespace -f -e namespace0.0 -m sector
I was not able to reproduce this issue using ndctl-57. Below is the stack trace from configuring a pmem device from raw to sector mode.
BUG: unable to handle kernel NULL pointer dereference at0000000000000028
IP:holder_class_store+0x253/0x2b0[libnvdimm]
Can you translate this to a line number? Try the following, and send the output:
$ gdb drivers/nvdimm/libnvdimm.ko (gdb) li *(holder_class_store+0x253) _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 12 lines · Dan Williams
Quoted 10 lines · Maurice A.
Testing ndctl-58 on our NVDIMM-Ns with the latest kernel (4.13.2) causes a panic when configuring a pmem device from raw to sector mode.
ndctl create-namespace -f -e namespace0.0 -m sector
I was not able to reproduce this issue using ndctl-57. Below is the stack trace from configuring a pmem device from raw to sector mode.
Quoted 8 lines
Quoted 3 lines
BUG: unable to handle kernel NULL pointer dereference at0000000000000028
IP:holder_class_store+0x253/0x2b0[libnvdimm]Can you translate this to a line number? Try the following, and send the output:
$ gdb drivers/nvdimm/libnvdimm.ko (gdb) li *(holder_class_store+0x253)
Yup, I ran the command and got the following output:
Reading symbols from /usr/lib/modules/4.13.2/kernel/drivers/nvdimm/libnvdimm.ko...done. (gdb) li *(holder_class_store+0x253)0x7773 is in holder_class_store (drivers/nvdimm/namespace_devs.c:1420).
1415 for (i = 0; i < nd_region->ndr_mappings; i++) {
1416 struct nd_mapping *nd_mapping = &nd_region-
Quoted 1 line
mapping[i];
1417 struct nvdimm_drvdata *ndd =to_ndd(nd_mapping);
1418 struct nd_namespace_index *nsindex;
1419
1420 nsindex = to_namespace_index(ndd, ndd-
Quoted 1 line
ns_current);
1421 if (nsindex == NULL)
1422 loop_bitmask |= 1;
1423 else {
1424 /* check whether existing labels
are v1.1 or v1.2 */
(gdb)
Sincerely,
Maurice
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm