Re: sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS
It’s possible that a stack overflowed. Kinetis platforms have a “system MPU” instead of the Arm MPU, and memory access violations trigger a bus fault.
From: devel@... <devel@...> On Behalf Of Christopher Friedt via Lists.Zephyrproject.Org
Sent: Monday, September 30, 2019 7:28 AM
Subject: [Zephyr-devel] sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS
I'm experimenting with Zephyr on the kinetis platform and I am encountering a bus fault while running the "samples/net/sockets/dumb_http_server" example.
The bus fault only seems to happen when I have CONFIG_NO_OPTIMIZATIONS=y . And is triggered in sys_dlist_remove().
IPv4 address: xxx.xxx.xxx.xxx
Single-threaded dumb HTTP server waits for a connection on port 8080...
eth_mcux: Enabled 100M full-duplex mode
At this point, I can ping the device, but as soon as I run curl or use a browser to open the static page, there is a bus fault (imprecise data bus error)
The PC was at sys_dlist_remove and the LR was in sys_dlist_get.
I don't have a full stack trace unfortunately because I'm unable to catch this issue with the debugger at present.
It's a bit concerning to me that disabling optimizations would result in a bus fault in such a critical path. Potentially related to atomic operations?
I haven't yet inspected the sys_dlist*() code yet, but just wanted to probe the list and see if this is a known issue.
Maybe some suggestions for the documentation in this sample project:
User should add/modify samples/net/sockets/dumb_http_server/prj.conf