sys_dlist_remove: bus fault with CONFIG_NO_OPTIMIZATIONS


Christopher Friedt
 

Hi list,

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().

Logs show:

initializing network
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.

Any thoughts?


PS:

Maybe some suggestions for the documentation in this sample project:

User should add/modify samples/net/sockets/dumb_http_server/prj.conf

* CONFIG_NET_CONFIG_MY_IPV4_ADDR
* CONFIG_NET_CONFIG_MY_IPV4_NETMASK
* CONFIG_NET_CONFIG_MY_IPV4_GW

Join devel@lists.zephyrproject.org to automatically receive all group messages.