[openbeosnetteam] Re: BUG: ethernet

Quoting Waldemar:

> did someone of you notice reproducible crashes when loading the
> ethernet kernel module on R5/BONE? The debugger says:
>
> Thread: ethernet_input
> Stack trace:
> xxxx close

The thread stack crawl is just that: "close"?
Nothing below that could provide more call context???
What's the KDL error title? Memory fault?

If it crash on close(), maybe something corrupt or never initialized the fd
value...

> That's all I get (with DEBUG=5). I cannot explain why this happens
> (ethernet_input does not close() anything, does it?). Probably it's
> something very stupid, but it works with the userland testing-stack
> (but then I cannot access the PPP stack ;).

ethernet_input() doesn't do close() anything itself but does call higher
protocols code that may do it. Meat for thought.
;-)

> Instead of killing the ethernet_input thread in ether_stop() I deleted
> the etherq and added queue-deletion detection code to the thread. But I
> doubt this is the real fix (though it does not crash, anymore).

That's a better defensive code, so it's welcome. Plus killing a thread is
considered violent and bad design compared to semaphore deletion detection.

> Is there a bug when killing a real-time kernel thread?

Under R5/BONE? Dunno. Does changing the thread priority fix something?

- Philippe

Other related posts: