* parted crash on NVME storage on LS1046A-RDB
@ 2025-01-09 9:32 Renaud Barbier
2025-01-09 11:20 ` Ahmad Fatoum
0 siblings, 1 reply; 6+ messages in thread
From: Renaud Barbier @ 2025-01-09 9:32 UTC (permalink / raw)
To: Barebox List
We are investigating the use of NVME storage using a NXP LS1046A CPU.
I have a RDB eval board on which I installed NVME storage whose ext4 partition was created from Linux.
The commit from which the boot loader is built is: 2024.12.0-00214-ge3de867716e9-dirty from Tue Dec 17 2024
The device is probed:
`-- pci-1957:81c0.1
`-- pci-126f:2263.0
`-- 0x00000000-0x6fc86d5fff ( 447.1 GiB): /dev/nvme0n1
`-- 0x00100000-0x401001ff ( 1 GiB): /dev/nvme0n1.0, nvme0n1.Linux filesystem
nvme pci-126f:2263.0: serial: A012410180629000000
nvme pci-126f:2263.0: model: SM681GEF AGS
nvme pci-126f:2263.0: firmware: TFX7GB
The partition below was created from Linux:
barebox@LS1046A RDB Board:/ parted nvme0n1 print
Disk /dev/nvme0n1: 447.1 GiB
Partition Table: gpt
Number Start End Size Name
0 1MB 1074MB 1073MB Linux filesystem
However, attempting to create a new partition:
barebox@LS1046A RDB Board:/ parted nvme0n1 mkpart config ext4 1074MiB 1090MiB
NULL pointer dereference: DABT (current EL) exception (ESR 0x9600000b) at 0x0000000000000008
elr: 00000000fbd69444 lr : 00000000fbd0e110
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : fffffffffffffff8
x4 : 00000000fbff7a6c x5 : 00000000fbff7a68
x6 : 00000000bdfc5a48 x7 : 00000000bde80000
x8 : 00000000bded2dd0 x9 : 00000000fbff7a68
x10: 00000000fbdb4190 x11: 0000000000000002
x12: 00000000bdfc402e x13: 00000000bdfc4053
x14: 00000000ffffffff x15: 00000000ffffffff
x16: 0000000000000000 x17: 00000000fbff7538
x18: 00000000fbff7ac0 x19: 0000000000000000
x20: 00000000bdfc59b0 x21: 00000000bded2dd0
x22: 00000000bdfc5278 x23: 00000000bdfc57a8
x24: 0000000000004000 x25: 00000000fbdb2650
x26: 00000000fbe1c000 x27: 00000000bdfc3fc8
x28: 00000000fbde5db0 x29: 00000000fbff7a90
Call trace:
[<fbd69444>] (dev_remove_param+0x18/0x5c) from [<fbd0e110>] (dos_partition_free+0x30/0x58)
[<fbd0e110>] (dos_partition_free+0x30/0x58) from [<fbd0db68>] (partition_table_free+0x14/0x1c)
[<fbd0db68>] (partition_table_free+0x14/0x1c) from [<fbd0ec64>] (efi_partition_write+0x39c/0x3c0)
[<fbd0ec64>] (efi_partition_write+0x39c/0x3c0) from [<fbd0da08>] (partition_table_write+0x18/0x28)
[<fbd0da08>] (partition_table_write+0x18/0x28) from [<fbd65af8>] (do_parted+0x138/0x154)
[<fbd65af8>] (do_parted+0x138/0x154) from [<fbd0786c>] (execute_command+0x44/0x8c)
[<fbd0786c>] (execute_command+0x44/0x8c) from [<fbd04208>] (execute_binfmt+0x68/0xa0)
[<fbd04208>] (execute_binfmt+0x68/0xa0) from [<fbd120fc>] (run_list_real+0x8cc/0x978)
[<fbd120fc>] (run_list_real+0x8cc/0x978) from [<fbd11684>] (parse_stream_outer+0x144/0x1f0)
[<fbd11684>] (parse_stream_outer+0x144/0x1f0) from [<fbd124dc>] (run_shell+0x64/0xac)
[<fbd124dc>] (run_shell+0x64/0xac) from [<fbd01b30>] (run_init+0x148/0x250)
[<fbd01b30>] (run_init+0x148/0x250) from [<fbd01c88>] (start_barebox+0x50/0x8c)
[<fbd01c88>] (start_barebox+0x50/0x8c) from [<fbd90f48>] (psci_driver_register+0x0/0x1c)
[<fbd90f48>] (psci_driver_register+0x0/0x1c) from [<fbd0000c>] (__bare_init_start+0x0/0x14)
[<fbd0000c>] (__bare_init_start+0x0/0x14) from [<80028800>] (0x80028800)
[<80028800>] (0x80028800) from [<800280c4>] (0x800280c4)
panic: unhandled exception
A bit of debugging shows that dpd->disksig.param is NULL. Is that supposed to be?
barebox@LS1046A RDB Board:/ parted nvme0n1 mkpart config ext4 1074MiB 1090MiB
dos_partition_free: pd = 0x00000000bdfc6980
dos_partition_free: dpart = 0x00000000bdfc7738
dos_partition_free: dpd = 0x00000000bdfc6980
dos_partition_free: dpd->disksig.param= 0x0000000000000000 <==
dos_partition_free: pd = 0x00000000bdfc6980
And the partition is created if dpd->disksig.param is tested for NULL:
barebox@LS1046A RDB Board:/ parted nvme0n1 print
Disk /dev/nvme0n1: 447.1 GiB
Partition Table: gpt
Number Start End Size Name
0 1024KiB 1049600KiB 1048576KiB Linux filesystem
1 1099776KiB 1116159KiB 16384KiB config
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: parted crash on NVME storage on LS1046A-RDB
2025-01-09 9:32 parted crash on NVME storage on LS1046A-RDB Renaud Barbier
@ 2025-01-09 11:20 ` Ahmad Fatoum
2025-01-10 15:48 ` Renaud Barbier
0 siblings, 1 reply; 6+ messages in thread
From: Ahmad Fatoum @ 2025-01-09 11:20 UTC (permalink / raw)
To: Renaud Barbier, Barebox List
On 09.01.25 10:32, Renaud Barbier wrote:
> We are investigating the use of NVME storage using a NXP LS1046A CPU.
> I have a RDB eval board on which I installed NVME storage whose ext4 partition was created from Linux.
> The commit from which the boot loader is built is: 2024.12.0-00214-ge3de867716e9-dirty from Tue Dec 17 2024
>
> The device is probed:
> `-- pci-1957:81c0.1
> `-- pci-126f:2263.0
> `-- 0x00000000-0x6fc86d5fff ( 447.1 GiB): /dev/nvme0n1
> `-- 0x00100000-0x401001ff ( 1 GiB): /dev/nvme0n1.0, nvme0n1.Linux filesystem
>
> nvme pci-126f:2263.0: serial: A012410180629000000
> nvme pci-126f:2263.0: model: SM681GEF AGS
> nvme pci-126f:2263.0: firmware: TFX7GB
>
> The partition below was created from Linux:
>
> barebox@LS1046A RDB Board:/ parted nvme0n1 print
> Disk /dev/nvme0n1: 447.1 GiB
> Partition Table: gpt
> Number Start End Size Name
> 0 1MB 1074MB 1073MB Linux filesystem
>
> However, attempting to create a new partition:
>
> barebox@LS1046A RDB Board:/ parted nvme0n1 mkpart config ext4 1074MiB 1090MiB
> NULL pointer dereference: DABT (current EL) exception (ESR 0x9600000b) at 0x0000000000000008
> elr: 00000000fbd69444 lr : 00000000fbd0e110
> x0 : 0000000000000000 x1 : 0000000000000000
> x2 : 0000000000000000 x3 : fffffffffffffff8
> x4 : 00000000fbff7a6c x5 : 00000000fbff7a68
> x6 : 00000000bdfc5a48 x7 : 00000000bde80000
> x8 : 00000000bded2dd0 x9 : 00000000fbff7a68
> x10: 00000000fbdb4190 x11: 0000000000000002
> x12: 00000000bdfc402e x13: 00000000bdfc4053
> x14: 00000000ffffffff x15: 00000000ffffffff
> x16: 0000000000000000 x17: 00000000fbff7538
> x18: 00000000fbff7ac0 x19: 0000000000000000
> x20: 00000000bdfc59b0 x21: 00000000bded2dd0
> x22: 00000000bdfc5278 x23: 00000000bdfc57a8
> x24: 0000000000004000 x25: 00000000fbdb2650
> x26: 00000000fbe1c000 x27: 00000000bdfc3fc8
> x28: 00000000fbde5db0 x29: 00000000fbff7a90
>
> Call trace:
> [<fbd69444>] (dev_remove_param+0x18/0x5c) from [<fbd0e110>] (dos_partition_free+0x30/0x58)
> [<fbd0e110>] (dos_partition_free+0x30/0x58) from [<fbd0db68>] (partition_table_free+0x14/0x1c)
> [<fbd0db68>] (partition_table_free+0x14/0x1c) from [<fbd0ec64>] (efi_partition_write+0x39c/0x3c0)
> [<fbd0ec64>] (efi_partition_write+0x39c/0x3c0) from [<fbd0da08>] (partition_table_write+0x18/0x28)
> [<fbd0da08>] (partition_table_write+0x18/0x28) from [<fbd65af8>] (do_parted+0x138/0x154)
> [<fbd65af8>] (do_parted+0x138/0x154) from [<fbd0786c>] (execute_command+0x44/0x8c)
> [<fbd0786c>] (execute_command+0x44/0x8c) from [<fbd04208>] (execute_binfmt+0x68/0xa0)
> [<fbd04208>] (execute_binfmt+0x68/0xa0) from [<fbd120fc>] (run_list_real+0x8cc/0x978)
> [<fbd120fc>] (run_list_real+0x8cc/0x978) from [<fbd11684>] (parse_stream_outer+0x144/0x1f0)
> [<fbd11684>] (parse_stream_outer+0x144/0x1f0) from [<fbd124dc>] (run_shell+0x64/0xac)
> [<fbd124dc>] (run_shell+0x64/0xac) from [<fbd01b30>] (run_init+0x148/0x250)
> [<fbd01b30>] (run_init+0x148/0x250) from [<fbd01c88>] (start_barebox+0x50/0x8c)
> [<fbd01c88>] (start_barebox+0x50/0x8c) from [<fbd90f48>] (psci_driver_register+0x0/0x1c)
> [<fbd90f48>] (psci_driver_register+0x0/0x1c) from [<fbd0000c>] (__bare_init_start+0x0/0x14)
> [<fbd0000c>] (__bare_init_start+0x0/0x14) from [<80028800>] (0x80028800)
> [<80028800>] (0x80028800) from [<800280c4>] (0x800280c4)
> panic: unhandled exception
>
> A bit of debugging shows that dpd->disksig.param is NULL. Is that supposed to be?
No, looks like I broke it. I'll send a fix shortly.
>
> barebox@LS1046A RDB Board:/ parted nvme0n1 mkpart config ext4 1074MiB 1090MiB
> dos_partition_free: pd = 0x00000000bdfc6980
> dos_partition_free: dpart = 0x00000000bdfc7738
> dos_partition_free: dpd = 0x00000000bdfc6980
> dos_partition_free: dpd->disksig.param= 0x0000000000000000 <==
> dos_partition_free: pd = 0x00000000bdfc6980
>
> And the partition is created if dpd->disksig.param is tested for NULL:
> barebox@LS1046A RDB Board:/ parted nvme0n1 print
> Disk /dev/nvme0n1: 447.1 GiB
> Partition Table: gpt
> Number Start End Size Name
> 0 1024KiB 1049600KiB 1048576KiB Linux filesystem
> 1 1099776KiB 1116159KiB 16384KiB config
>
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: parted crash on NVME storage on LS1046A-RDB
2025-01-09 11:20 ` Ahmad Fatoum
@ 2025-01-10 15:48 ` Renaud Barbier
2025-01-10 15:52 ` Ahmad Fatoum
0 siblings, 1 reply; 6+ messages in thread
From: Renaud Barbier @ 2025-01-10 15:48 UTC (permalink / raw)
To: Ahmad Fatoum, Barebox List
>
> ***NOTICE*** This came from an external source. Use caution when
> replying, clicking links, or opening attachments.
>
> On 09.01.25 10:32, Renaud Barbier wrote:
> > We are investigating the use of NVME storage using a NXP LS1046A CPU.
> > I have a RDB eval board on which I installed NVME storage whose ext4
> partition was created from Linux.
> > The commit from which the boot loader is built is:
> > 2024.12.0-00214-ge3de867716e9-dirty from Tue Dec 17 2024
> >
> > The device is probed:
> > `-- pci-1957:81c0.1
> > `-- pci-126f:2263.0
> > `-- 0x00000000-0x6fc86d5fff ( 447.1 GiB): /dev/nvme0n1
> > `-- 0x00100000-0x401001ff ( 1 GiB): /dev/nvme0n1.0, nvme0n1.Linux
> filesystem
> >
> > nvme pci-126f:2263.0: serial: A012410180629000000 nvme
> > pci-126f:2263.0: model: SM681GEF AGS nvme pci-126f:2263.0: firmware:
> > TFX7GB
After using the nvme sanitize command from Linux, I tried to recreate the partition from barebox.
A crash happened.
I did notice a call to efi_partition_free below while when the partition table was created Linux it was dos_partition_free.
barebox@LS1046A RDB Board:/ parted /dev/nvme0n1 mklabel gpt
Created new disk label with GUID 00dc0465-aa1f-ad4d-9ada-e5ac1b1e5f13
NULL pointer dereference: DABT (current EL) exception (ESR 0x9600000b) at 0x0000000000000008
elr: 00000000fbd6a450 lr : 00000000fbd0f68c
x0 : 0000000000000000 x1 : 0000000000000000
x2 : 0000000000000000 x3 : 00000000bded2e18
x4 : 00000000bded2dd0 x5 : 00000000bdef5060
x6 : 0000000037e43680 x7 : 000000000000002e
x8 : 00000000bded2dd0 x9 : 0000000000000200
x10: 0000000000001000 x11: 0000000000001000
x12: 00000000fbff7681 x13: 00000000fbff7a79
x14: 00000000ffffffff x15: 00000000ffffffff
x16: 0000000000000000 x17: 00000000fbff74a8
x18: 00000000fbff7a40 x19: 0000000000000000
x20: 00000000bdfc61b8 x21: 00000000bded2e38
x22: 00000000bded2dd0 x23: 00000000fbde90c0
x24: 00000000fbe1f000 x25: 00000000fbdb54a8
x26: 00000000fbe1f000 x27: 00000000bdfc3de8
x28: 00000000fbde90f0 x29: 00000000fbff7ae0
Call trace:
[<fbd6a450>] (dev_remove_param+0x18/0x5c) from [<fbd0f68c>] (efi_partition_free+0x30/0x68)
[<fbd0f68c>] (efi_partition_free+0x30/0x68) from [<fbd0df38>] (partition_table_free+0x14/0x1c)
[<fbd0df38>] (partition_table_free+0x14/0x1c) from [<fbd66b14>] (do_parted+0x148/0x154)
[<fbd66b14>] (do_parted+0x148/0x154) from [<fbd07bd8>] (execute_command+0x44/0x8c)
[<fbd07bd8>] (execute_command+0x44/0x8c) from [<fbd0421c>] (execute_binfmt+0x68/0xa0)
[<fbd0421c>] (execute_binfmt+0x68/0xa0) from [<fbd124f8>] (run_list_real+0x8cc/0x978)
[<fbd124f8>] (run_list_real+0x8cc/0x978) from [<fbd11a80>] (parse_stream_outer+0x144/0x1f0)
[<fbd11a80>] (parse_stream_outer+0x144/0x1f0) from [<fbd128d8>] (run_shell+0x64/0xac)
[<fbd128d8>] (run_shell+0x64/0xac) from [<fbd01bd8>] (run_init+0x148/0x264)
[<fbd01bd8>] (run_init+0x148/0x264) from [<fbd01a38>] (start_barebox+0x50/0x8c)
[<fbd01a38>] (start_barebox+0x50/0x8c) from [<fbd93748>] (psci_driver_register+0x0/0x1c)
[<fbd93748>] (psci_driver_register+0x0/0x1c) from [<fbd0000c>] (__bare_init_start+0x0/0x14)
[<fbd0000c>] (__bare_init_start+0x0/0x14) from [<80028800>] (0x80028800)
[<80028800>] (0x80028800) from [<800280c4>] (0x800280c4)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: parted crash on NVME storage on LS1046A-RDB
2025-01-10 15:48 ` Renaud Barbier
@ 2025-01-10 15:52 ` Ahmad Fatoum
2025-01-10 16:29 ` Renaud Barbier
2025-01-10 16:50 ` Renaud Barbier
0 siblings, 2 replies; 6+ messages in thread
From: Ahmad Fatoum @ 2025-01-10 15:52 UTC (permalink / raw)
To: Renaud Barbier, Barebox List
Hi Renaud,
On 10.01.25 16:48, Renaud Barbier wrote:
>
>
>>
>> ***NOTICE*** This came from an external source. Use caution when
>> replying, clicking links, or opening attachments.
>>
>> On 09.01.25 10:32, Renaud Barbier wrote:
>>> We are investigating the use of NVME storage using a NXP LS1046A CPU.
>>> I have a RDB eval board on which I installed NVME storage whose ext4
>> partition was created from Linux.
>>> The commit from which the boot loader is built is:
>>> 2024.12.0-00214-ge3de867716e9-dirty from Tue Dec 17 2024
>>>
>>> The device is probed:
>>> `-- pci-1957:81c0.1
>>> `-- pci-126f:2263.0
>>> `-- 0x00000000-0x6fc86d5fff ( 447.1 GiB): /dev/nvme0n1
>>> `-- 0x00100000-0x401001ff ( 1 GiB): /dev/nvme0n1.0, nvme0n1.Linux
>> filesystem
>>>
>>> nvme pci-126f:2263.0: serial: A012410180629000000 nvme
>>> pci-126f:2263.0: model: SM681GEF AGS nvme pci-126f:2263.0: firmware:
>>> TFX7GB
>
> After using the nvme sanitize command from Linux, I tried to recreate the partition from barebox.
> A crash happened.
> I did notice a call to efi_partition_free below while when the partition table was created Linux it was dos_partition_free.
Is this with the two patches I Cc'd you on?
Thanks,
Ahmad
>
> barebox@LS1046A RDB Board:/ parted /dev/nvme0n1 mklabel gpt
> Created new disk label with GUID 00dc0465-aa1f-ad4d-9ada-e5ac1b1e5f13
> NULL pointer dereference: DABT (current EL) exception (ESR 0x9600000b) at 0x0000000000000008
> elr: 00000000fbd6a450 lr : 00000000fbd0f68c
> x0 : 0000000000000000 x1 : 0000000000000000
> x2 : 0000000000000000 x3 : 00000000bded2e18
> x4 : 00000000bded2dd0 x5 : 00000000bdef5060
> x6 : 0000000037e43680 x7 : 000000000000002e
> x8 : 00000000bded2dd0 x9 : 0000000000000200
> x10: 0000000000001000 x11: 0000000000001000
> x12: 00000000fbff7681 x13: 00000000fbff7a79
> x14: 00000000ffffffff x15: 00000000ffffffff
> x16: 0000000000000000 x17: 00000000fbff74a8
> x18: 00000000fbff7a40 x19: 0000000000000000
> x20: 00000000bdfc61b8 x21: 00000000bded2e38
> x22: 00000000bded2dd0 x23: 00000000fbde90c0
> x24: 00000000fbe1f000 x25: 00000000fbdb54a8
> x26: 00000000fbe1f000 x27: 00000000bdfc3de8
> x28: 00000000fbde90f0 x29: 00000000fbff7ae0
>
> Call trace:
> [<fbd6a450>] (dev_remove_param+0x18/0x5c) from [<fbd0f68c>] (efi_partition_free+0x30/0x68)
> [<fbd0f68c>] (efi_partition_free+0x30/0x68) from [<fbd0df38>] (partition_table_free+0x14/0x1c)
> [<fbd0df38>] (partition_table_free+0x14/0x1c) from [<fbd66b14>] (do_parted+0x148/0x154)
> [<fbd66b14>] (do_parted+0x148/0x154) from [<fbd07bd8>] (execute_command+0x44/0x8c)
> [<fbd07bd8>] (execute_command+0x44/0x8c) from [<fbd0421c>] (execute_binfmt+0x68/0xa0)
> [<fbd0421c>] (execute_binfmt+0x68/0xa0) from [<fbd124f8>] (run_list_real+0x8cc/0x978)
> [<fbd124f8>] (run_list_real+0x8cc/0x978) from [<fbd11a80>] (parse_stream_outer+0x144/0x1f0)
> [<fbd11a80>] (parse_stream_outer+0x144/0x1f0) from [<fbd128d8>] (run_shell+0x64/0xac)
> [<fbd128d8>] (run_shell+0x64/0xac) from [<fbd01bd8>] (run_init+0x148/0x264)
> [<fbd01bd8>] (run_init+0x148/0x264) from [<fbd01a38>] (start_barebox+0x50/0x8c)
> [<fbd01a38>] (start_barebox+0x50/0x8c) from [<fbd93748>] (psci_driver_register+0x0/0x1c)
> [<fbd93748>] (psci_driver_register+0x0/0x1c) from [<fbd0000c>] (__bare_init_start+0x0/0x14)
> [<fbd0000c>] (__bare_init_start+0x0/0x14) from [<80028800>] (0x80028800)
> [<80028800>] (0x80028800) from [<800280c4>] (0x800280c4)
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: parted crash on NVME storage on LS1046A-RDB
2025-01-10 15:52 ` Ahmad Fatoum
@ 2025-01-10 16:29 ` Renaud Barbier
2025-01-10 16:50 ` Renaud Barbier
1 sibling, 0 replies; 6+ messages in thread
From: Renaud Barbier @ 2025-01-10 16:29 UTC (permalink / raw)
To: Ahmad Fatoum, Barebox List
>> Is this with the two patches I Cc'd you on?
>Sorry, I just noticed the patch. Will try again
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: parted crash on NVME storage on LS1046A-RDB
2025-01-10 15:52 ` Ahmad Fatoum
2025-01-10 16:29 ` Renaud Barbier
@ 2025-01-10 16:50 ` Renaud Barbier
1 sibling, 0 replies; 6+ messages in thread
From: Renaud Barbier @ 2025-01-10 16:50 UTC (permalink / raw)
To: Ahmad Fatoum, Barebox List
All good now:
barebox@LS1046A RDB Board:/ parted nvme0n1 mklabel gpt
Created new disk label with GUID 00dc0465-aa1f-ad4d-9ada-e5ac1b1e5f13
barebox@LS1046A RDB Board:/ parted nvme0n1 unit MB mkpart linux ext4 1MB 1026MB
barebox@LS1046A RDB Board:/ parted nvme0n1 print
Disk /dev/nvme0n1: 447.1 GiB
Partition Table: gpt
Number Start End Size Name
0 1MB 1025MB 1024MB linux
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-01-10 16:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-09 9:32 parted crash on NVME storage on LS1046A-RDB Renaud Barbier
2025-01-09 11:20 ` Ahmad Fatoum
2025-01-10 15:48 ` Renaud Barbier
2025-01-10 15:52 ` Ahmad Fatoum
2025-01-10 16:29 ` Renaud Barbier
2025-01-10 16:50 ` Renaud Barbier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox