QEMU emulated nvdimm regions alignment need (128MB) or ndctl create-namespace namespace1.0 might fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Focal |
Fix Released
|
Medium
|
Unassigned | ||
ndctl (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Focal |
Invalid
|
Medium
|
Unassigned | ||
qemu (Ubuntu) |
Invalid
|
Medium
|
Unassigned | ||
Focal |
Invalid
|
Medium
|
Unassigned |
Bug Description
I got a probe error for pfn1.0 (from both pfn0.0 and pfn1.0) when dealing with ndctl:
----
[11257.765457] memory add fail, invalid altmap
[11257.765489] WARNING: CPU: 6 PID: 5680 at arch/x86/
[11257.765489] Modules linked in: nls_iso8859_1 edac_mce_amd crct10dif_pclmul crc32_pclmul dax_pmem_compat device_dax dax_pmem_core nd_pmem nd_btt ghash_clmulni_intel aesni_intel aes_x86_64 crypto_simd cryptd glue_helper input_leds joydev mac_hid nfit serio_raw qemu_fw_cfg sch_fq_codel ip_tables x_tables autofs4 virtio_net net_failover psmouse failover pata_acpi virtio_blk i2c_piix4 floppy
[11257.765505] CPU: 6 PID: 5680 Comm: ndctl Not tainted 5.3.0-24-generic #26-Ubuntu
[11257.765505] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
[11257.765507] RIP: 0010:add_
[11257.765509] Code: 33 c2 01 76 20 48 89 15 99 33 c2 01 48 89 15 a2 33 c2 01 48 c1 e2 0c 48 03 15 97 96 39 01 48 89 15 48 0e c2 01 5b 41 5c 5d c3 <0f> 0b eb ba 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 0f 1f 44
[11257.765509] RSP: 0018:ffffa360c0
[11257.765510] RAX: 00000000ffffffea RBX: 000000000017ffe0 RCX: 0000000000000000
[11257.765511] RDX: 0000000000000000 RSI: ffff8acb7db17448 RDI: ffff8acb7db17448
[11257.765512] RBP: ffffa360c09dfc00 R08: ffff8acb7db17448 R09: 0000000000000004
[11257.765512] R10: 0000000000000000 R11: 0000000000000001 R12: 000000000003fe20
[11257.765513] R13: 0000000000000001 R14: ffffa360c09dfc48 R15: ffff8acb7a7226f8
[11257.765515] FS: 00007febc9fd6bc
[11257.765516] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[11257.765517] CR2: 000055eec8aab398 CR3: 000000013a8fa000 CR4: 00000000000406e0
[11257.765519] Call Trace:
[11257.765523] arch_add_
[11257.765525] devm_memremap_
[11257.765529] pmem_attach_
[11257.765531] ? devm_memremap+
[11257.765532] nd_pmem_
[11257.765542] nvdimm_
[11257.765547] really_
[11257.765549] driver_
[11257.765550] device_
[11257.765551] bind_store+
[11257.765553] drv_attr_
[11257.765554] sysfs_kf_
[11257.765555] kernfs_
[11257.765557] __vfs_write+
[11257.765558] vfs_write+
[11257.765559] ksys_write+
[11257.765561] __x64_sys_
[11257.765567] do_syscall_
[11257.765693] entry_SYSCALL_
[11257.765696] RIP: 0033:0x7febc9e81327
[11257.765698] Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 48 89 54 24 18 48 89 74 24
[11257.765698] RSP: 002b:00007ffd59
[11257.765699] RAX: ffffffffffffffda RBX: 00007febc9fd6ae8 RCX: 00007febc9e81327
[11257.765700] RDX: 0000000000000007 RSI: 000055eec8a9bfa0 RDI: 0000000000000004
[11257.765701] RBP: 0000000000000004 R08: 0000000000000006 R09: 7375622f7379732f
[11257.765701] R10: 0000000000000000 R11: 0000000000000246 R12: 000055eec8a9bfa0
[11257.765702] R13: 0000000000000001 R14: 0000000000000007 R15: 00007ffd59943448
[11257.765703] ---[ end trace 442db04e33790cb5 ]---
[11257.782659] nd_pmem: probe of pfn1.0 failed with error -22
----
It seems that after this point I can't play with my second virtual nvdimm device (pfn1.0).
A namespace destroy works but a namespace creation does not:
rafaeldtinoco@
[
{
"provider"
"dev":"ndbus0"
}
]
rafaeldtinoco@
[
{
"dev":"nmem1",
"id"
"handle":2,
"phys_id":0
},
{
"dev":"nmem0",
"id"
"handle":1,
"phys_id":0
}
]
rafaeldtinoco@
[
{
"dev"
"size"
"available_
"max_
"type":"pmem",
"iset_
"persistenc
},
{
"dev"
"size"
"available_
"max_
"type":"pmem",
"iset_
"persistenc
}
]
Now, whenever trying to access namespace1.0 (from region1/
[11257.782659] nd_pmem: probe of pfn1.0 failed with error -22
[11332.001388] pfn0.0 initialised, 257024 pages in 8ms
[11332.001818] pmem0: detected capacity change from 0 to 1052770304
[11359.739280] pfn0.1 initialised, 257024 pages in 0ms
[11362.643212] pfn0.0 initialised, 257024 pages in 0ms
[11362.644225] pmem0: detected capacity change from 0 to 1052770304
[11406.230365] pfn0.1 initialised, 257024 pages in 0ms
[11406.231281] pmem0: detected capacity change from 0 to 1052770304
[11517.785147] pfn0.0 initialised, 257024 pages in 4ms
[11517.785593] pmem0: detected capacity change from 0 to 1052770304
[11537.431697] pfn0.1 initialised, 257024 pages in 0ms
[11537.432256] pmem0: detected capacity change from 0 to 1052770304
[11627.965947] pfn0.0 initialised, 257024 pages in 0ms
[11627.966415] pmem0: detected capacity change from 0 to 1052770304
[11653.277667] pfn0.1 initialised, 257024 pages in 4ms
[11653.278086] pmem0: detected capacity change from 0 to 1052770304
[11708.696361] pfn0.0 initialised, 257024 pages in 0ms
[11708.697617] pmem0: detected capacity change from 0 to 1052770304
[11753.621295] nd_pmem btt0.0: No existing arenas
[11753.623118] pmem0s: detected capacity change from 0 to 1071484928
[11767.087424] pfn0.1 initialised, 257024 pages in 4ms
[11767.088272] pmem0: detected capacity change from 0 to 1052770304
[11775.815396] dax0.0 initialised, 257024 pages in 4ms
[12848.341346] pfn0.0 initialised, 257024 pages in 0ms
[12848.341785] pmem0: detected capacity change from 0 to 1052770304
[12851.897716] nd_pmem: probe of pfn1.0 failed with error -22
[13023.693246] pfn0.1 initialised, 257024 pages in 0ms
[13023.693662] pmem0: detected capacity change from 0 to 1052770304
[13026.517467] nd_pmem: probe of pfn1.0 failed with error -22
[13067.380701] pmem0: detected capacity change from 0 to 1073610752
[13117.568499] nd_pmem: probe of pfn1.0 failed with error -22
[13946.604199] pfn0.0 initialised, 257024 pages in 0ms
[13946.604777] pmem0: detected capacity change from 0 to 1052770304
[13957.948381] nd_pmem: probe of pfn1.0 failed with error -22
no longer affects: | linux (Ubuntu Focal) |
Changed in ndctl (Ubuntu): | |
status: | New → Confirmed |
Changed in qemu (Ubuntu Focal): | |
status: | Invalid → Confirmed |
Changed in linux (Ubuntu): | |
status: | Invalid → Confirmed |
no longer affects: | qemu (Ubuntu Focal) |
Changed in ndctl (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux (Ubuntu): | |
importance: | Low → Medium |
Changed in qemu (Ubuntu): | |
importance: | Low → Medium |
I'm reporting this because I'm not sure yet if its an emulation issue, since all nvdimm device access I'm doing here is through QEMU emulation feature, like showed here:
https:/ /raw.githubuser content. com/rafaeldtino co/provision/ master/ kvm/libvirt/ nvdimm. xml
or a kernel issue:
rafaeldtinoco@ ndctltest: ~$ uname -a
Linux ndctltest 5.3.0-24-generic #26-Ubuntu SMP Thu Nov 14 01:33:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
rafaeldtinoco@ ndctltest: ~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
Codename: focal