Xenomai v2.4-rc4: freeze with RTAI skin, fine with other skins
Quoted 9 lines · Philippe Gerum
Quoted 6 lines · Fillod Stephane
For the legacy RTAI application to load, the attached patch was necessary.
The patch againstksrc/skins/rtai/shm.cis somewhat defeating the purpose
of a lowerXNCORE_PAGE_SIZE, so a better fix might be expected.This one should prevent
-EINVALfrom being returned. Hopefully.
Nope, it doesn't :-(
Most probably because still (hdrsize + 2 * pagesize > heapsize).
[..]
Quoted 9 lines
Quoted 2 lines
In the mean time, does anyone have a clue where to look particularly?
Hard to say at this point. Since the nucleus watchdog does not trigger, you may want to try disabling
X86_UP_IOAPICwhile keepingX86_UP_APIC, and arm the kernel NMI watchdog on the LAPIC (nmi_watchdog=2). You may be lucky and have a backtrace after the freeze.PS: maybe enabling all the nucleus debug options would catch something
too.
Thanks for the ideas. It looks like part of the problem came from memory corruption (access beyond heap) in the application (not so stable app in the end, he!). I'm still experiencing random freeze when freeing resources when stopping application, but runtime is stable. To be honest, the freeze was not a perfect freeze, I got just a one line trace from do_page_fault(), with no backtrace or pointer. Unhelpful. I have updated http://xenomai.org/index.php/FAQs
Signature · 1 line
Stephane
Quoted 8 lines · Fillod Stephane
Quoted 7 lines · Philippe Gerum
Quoted 6 lines · Fillod Stephane
For the legacy RTAI application to load, the attached patch was necessary.
The patch againstksrc/skins/rtai/shm.cis somewhat defeating the purpose
of a lowerXNCORE_PAGE_SIZE, so a better fix might be expected.
Quoted 5 lines
Quoted 1 line
This one should prevent
-EINVALfrom being returned. Hopefully.Nope, it doesn't :-(
Most probably because still (hdrsize + 2 * pagesize > heapsize).
This rounding was missing too. We need the previous one for kernel local
heaps, and the one below to meet the stricter PAGE_SIZE constraint for
shareable heaps.
nucleus/heap.c +1 -1
@@ -1103,7 +1103,7 @@spl_t s;int err; - heapsize =PAGE_ALIGN (heapsize); + heapsize =xnheap_rounded_size (heapsize,PAGE_SIZE ); heapbase =__alloc_and_reserve_heap (heapsize, memflags);if (!heapbase)
Signature · 1 line
Philippe.