* [Bug] Nullpointer Exception in of_diff
@ 2023-06-12 14:26 Johannes Zink
2023-06-12 14:50 ` Ahmad Fatoum
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Zink @ 2023-06-12 14:26 UTC (permalink / raw)
To: barebox
Hi,
I observed a Nullpointer Exception in barebox barebox 2023.05.0 on a Rock3a
when calling
of_diff . .
on the shell. Please find the complete dump below:
barebox@Radxa ROCK3 Model A:/ of_diff . .
diff . .
Cannot read .: No such file or directory
DABT (current EL) exception (ESR 0x9600000b) at 0x000000000000000e
elr: 000000007fd4b8b0 lr : 000000007fd57ba0
x0 : 000000004037ca60 x1 : 000000000000000a
x2 : 0000000000000000 x3 : 000000007fd21910
x4 : 0000000000000002 x5 : 0000000000000020
x6 : 0000000000000000 x7 : 0000000000000000
x8 : 000000007ffefad8 x9 : 0000000000000000
x10: 0000000000000003 x11: 00000000405015c8
x12: 0000000000000000 x13: 0000000040500d38
x14: 00000000403786e0 x15: 0000000000000001
x16: 000000007ffef4b8 x17: 0000000000000001
x18: 000000007ffefa50 x19: fffffffffffffffe
x20: fffffffffffffffe x21: fffffffffffffffe
x22: 0000000000000001 x23: 0000000000000003
x24: 0000000000000001 x25: 0000000000000000
x26: 0000000000000008 x27: 0000000040500978
x28: 0000000000000000 x29: 000000007ffefae0
Call trace:
[<7fd4b8b0>] (of_delete_node+0x4c/0xf8) from [<7fd57ba0>] (do_of_diff+0x78/0xec)
[<7fd57ba0>] (do_of_diff+0x78/0xec) from [<7fd069c4>] (execute_command+0x44/0x8c)
[<7fd069c4>] (execute_command+0x44/0x8c) from [<7fd03dcc>]
(execute_binfmt+0x68/0xa0)
[<7fd03dcc>] (execute_binfmt+0x68/0xa0) from [<7fd0f2c4>]
(run_list_real+0x8e4/0x9d0)
[<7fd0f2c4>] (run_list_real+0x8e4/0x9d0) from [<7fd0e834>]
(parse_stream_outer+0x140/0x1ec)
[<7fd0e834>] (parse_stream_outer+0x140/0x1ec) from [<7fd0f604>]
(run_shell+0x60/0x98)
[<7fd0f604>] (run_shell+0x60/0x98) from [<7fd017f4>] (run_init+0x110/0x250)
[<7fd017f4>] (run_init+0x110/0x250) from [<7fd01984>] (start_barebox+0x50/0x8c)
[<7fd01984>] (start_barebox+0x50/0x8c) from [<7fd7f454>]
(barebox_non_pbl_start+0x13c/0x170)
[<7fd7f454>] (barebox_non_pbl_start+0x13c/0x170) from [<7fd0000c>]
(__bare_init_start+0x0/0x4)
[<7fd0000c>] (__bare_init_start+0x0/0x4) from [<00a0f6f0>] (0xa0f6f0)
[<00a0f6f0>] (0xa0f6f0) from [<00a0f320>] (0xa0f320)
panic: unhandled exception
The behaviour is stable and reproducable on a Rock3A, probably also on other
boards. Maybe someone of the more experienced barebox devs already has an idea
what's going wrong here and wants to have a closer look, otherwise I'd probably
give it a shot within the next few days (and if I manage to find some spare
time...)
Best regards
Johannes
--
Pengutronix e.K. | Johannes Zink |
Steuerwalder Str. 21 | https://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] 3+ messages in thread
* Re: [Bug] Nullpointer Exception in of_diff
2023-06-12 14:26 [Bug] Nullpointer Exception in of_diff Johannes Zink
@ 2023-06-12 14:50 ` Ahmad Fatoum
2023-06-13 11:42 ` Johannes Zink
0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2023-06-12 14:50 UTC (permalink / raw)
To: Johannes Zink, barebox
Hello Johannes,
On 12.06.23 16:26, Johannes Zink wrote:
> Hi,
>
> I observed a Nullpointer Exception in barebox barebox 2023.05.0 on a Rock3a when calling
>
> of_diff . .
This should be already fixed in next. You can ask Sascha to pick
"commands: of_diff: simplify error handling" to master if that
fixes your issue.
> on the shell. Please find the complete dump below:
[snip]
> The behaviour is stable and reproducable on a Rock3A, probably also on other boards. Maybe someone of the more experienced barebox devs already has an idea what's going wrong here and wants to have a closer look, otherwise I'd probably give it a shot within the next few days (and if I manage to find some spare time...)
You can pipe barebox crash logs into Linux scripts/decode_stacktrace.sh
to get line numbers (don't forget to set ARCH/CROSS_COMPILE).
Enabling CONFIG_KASAN=y can also be very useful to pinpoint the origin
of memory corruptions.
Cheers,
Ahmad
>
> Best regards
> Johannes
>
>
--
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] 3+ messages in thread
* Re: [Bug] Nullpointer Exception in of_diff
2023-06-12 14:50 ` Ahmad Fatoum
@ 2023-06-13 11:42 ` Johannes Zink
0 siblings, 0 replies; 3+ messages in thread
From: Johannes Zink @ 2023-06-13 11:42 UTC (permalink / raw)
To: barebox
Hi Ahmad,
On 6/12/23 16:50, Ahmad Fatoum wrote:
> Hello Johannes,
>
> On 12.06.23 16:26, Johannes Zink wrote:
>> Hi,
>>
>> I observed a Nullpointer Exception in barebox barebox 2023.05.0 on a Rock3a when calling
>>
>> of_diff . .
>
> This should be already fixed in next. You can ask Sascha to pick
> "commands: of_diff: simplify error handling" to master if that
> fixes your issue.
thanks for your reply, it is fixed in next indeed. I just gave it a quick test run.
@Sascha: as this fixes a Nullpointer dereference, maybe Ahmad's patch is a
candidate to pick into master?
>
> [snip]
>
> You can pipe barebox crash logs into Linux scripts/decode_stacktrace.sh
> to get line numbers (don't forget to set ARCH/CROSS_COMPILE).
> Enabling CONFIG_KASAN=y can also be very useful to pinpoint the origin
> of memory corruptions.
>
That's good to know, thank you. This will definitely help me the next time.
Johannes
> Cheers,
> Ahmad
>
>>
>> Best regards
>> Johannes
>>
>>
>
--
Pengutronix e.K. | Johannes Zink |
Steuerwalder Str. 21 | https://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] 3+ messages in thread
end of thread, other threads:[~2023-06-13 11:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-12 14:26 [Bug] Nullpointer Exception in of_diff Johannes Zink
2023-06-12 14:50 ` Ahmad Fatoum
2023-06-13 11:42 ` Johannes Zink
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox