Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
Hi everybody,
I am using the Xenomai version 2.4.5 with Linux version 2.6.26.5 (adeos patch provided with Xenomai 2.4.5). Pentium D 3.2 GHz.
There seems to be a bug with the Xenomai mmap page handling that leads to a
Eeek! page_mapcount(page) went negative! (-1)
Kernel error.
With previous version (Xeno 2.3.3, Kernel 2.6.20.4) this worked. The situation is the following:
I allocate DMA capable memory in a kernel module.
Then I map to this memory from user space.
So far, everything is fine.
I can access the memory without problem.
However, once I terminate by user space application I get the Eeek.
The strange thing is, that the crash seems to happen with a xeno thread (not the one that mapped to the memory).
I have included the dmesg dump and also a very tiny standalone application that crashes with my system every time I start it.
Untar the heap.tgz archive, run make to build the kernel module and the user space application. Then, insmod the module and run the user space application.
After a couple of seconds, the system crashes with the Eeek.
Any help on this issue is highly welcome!
Best regards
Mathias
Signature · 5 lines
Mathias Koehrer [email protected] Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv
Quoted 9 lines · M. Koehrer
Hi everybody,
I am using the Xenomai version 2.4.5 with Linux version 2.6.26.5 (adeos patch provided with Xenomai 2.4.5). Pentium D 3.2 GHz.
There seems to be a bug with the Xenomai mmap page handling that leads to a
Eeek!page_mapcount(page)went negative! (-1)
Kernel error.
Ok. Could you send us more details, such as the full boot logs and your kernel configuration ?
On your side, is it possible for you to do a bisection with Xenomai versions ?
Signature · 1 line
Gilles.
Hi Gilles,
I attach the full dmesg dump from booting up to the crash of the system. Bootparameters are
root=/dev/sda5 vga=ext quiet isolcpus=1-7
Also, I attach the linux .config file.
Of course I can try with other Xenomai/Kernel version if it helps...
Thanks a lot
Regards
Mathias
Quoted 6 lines
Ok. Could you send us more details, such as the full boot logs and your kernel configuration ?
On your side, is it possible for you to do a bisection with Xenomai versions ?
Signature · 5 lines
Mathias Koehrer [email protected] Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv
Hello Gilles,
I tried a couple of Xenomai/Kernel combinations. The result is the following:
Xeno 2.4.4 and kernel 2.6.25: ok
Xeno 2.4.5 and kernel 2.6.25: ok
Xeno 2.4.5 and kernel 2.6.26: crash
(In all tests, I used the adeos patch that was part of the release Xenomai version).
Thus, some rmap code in kernel 2.6.26 seems to be different than with 2.6.25.
I hope that helps to find out what is wrong...
Best regards
Mathias
Quoted 22 lines
I attach the full dmesg dump from booting up to the crash of the system. Bootparameters are
root=/dev/sda5 vga=ext quiet isolcpus=1-7
Also, I attach the linux .config file.Of course I can try with other Xenomai/Kernel version if it helps...
Thanks a lot
Regards
Mathias
Quoted 6 lines
Ok. Could you send us more details, such as the full boot logs and your kernel configuration ?
On your side, is it possible for you to do a bisection with Xenomai versions ?
Signature · 5 lines
Mathias Koehrer [email protected] Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv
Quoted 5 lines · M. Koehrer
Hello Gilles,
I tried a couple of Xenomai/Kernel combinations. The result is the following:
Quoted 8 lines
Xeno 2.4.4 and kernel 2.6.25: ok
Xeno 2.4.5 and kernel 2.6.25: ok
Xeno 2.4.5 and kernel 2.6.26: crash
(In all tests, I used the adeos patch that was part of the release Xenomai version).Thus, some rmap code in kernel 2.6.26 seems to be different than with 2.6.25.
I hope that helps to find out what is wrong...
Yes, thanks. This is a bug which should have been fixed since then. But here is a patch for your version. Could you try it?
include/linux/mm.h +1 -1
@@ -109,7 +109,7 @@ extern unsigned int kobjsize(const void *objp);#define VM_CAN_NONLINEAR 0x08000000/* Has ->fault & does nonlinear pages */ #define VM_MIXEDMAP 0x10000000/* Can contain "struct page" and pure PFN pages */ -#define VM_PINNED 0x10000000/* Disable faults for the vma */ +#define VM_PINNED 0x20000000/* Disable faults for the vma */ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
Signature · 1 line
Gilles.
Hello Gilles,
thanks! Now it works fine!
Great support.
Best regards
Mathias
Quoted 20 lines
Yes, thanks. This is a bug which should have been fixed since then. But here is a patch for your version. Could you try it?
include/linux/mm.h +0
-0@@ -109,7 +109,7 @@ extern unsigned int kobjsize(const void *objp);#define VM_CAN_NONLINEAR 0x08000000/* Has ->fault & does nonlinear pages */ #define VM_MIXEDMAP 0x10000000/* Can contain "struct page" and pure PFN pages */
include/linux/mm.h +1
-1-#define VM_PINNED 0x10000000/* Disable faults for the vma */ +#define VM_PINNED 0x20000000/* Disable faults for the vma */ #ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */ #define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
Signature · 5 lines
Mathias Koehrer [email protected] Jetzt komfortabel bei Arcor-Digital TV einsteigen: Mehr Happy Ends, mehr Herzschmerz, mehr Fernsehen! Erleben Sie 50 digitale TV Programme und optional 60 Pay TV Sender, einen elektronischen Programmführer mit Movie Star Bewertungen von TV Movie. Außerdem, aktuelle Filmhits und spannende Dokus in der Arcor-Videothek. Infos unter www.arcor.de/tv