All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
@ 2008-10-09 13:07 M. Koehrer
  2008-10-09 16:06 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: M. Koehrer @ 2008-10-09 13:07 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 1576 bytes --]

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





-- 
Mathias Koehrer
mathias_koehrer@domain.hid


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

[-- Attachment #2: dmesg.gz --]
[-- Type: application/x-gzip, Size: 1486 bytes --]

[-- Attachment #3: heap.tgz --]
[-- Type: application/x-compressed, Size: 1157 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
  2008-10-09 13:07 [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative! M. Koehrer
@ 2008-10-09 16:06 ` Gilles Chanteperdrix
  2008-10-10  6:36   ` M. Koehrer
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-09 16:06 UTC (permalink / raw)
  To: M. Koehrer; +Cc: xenomai

M. Koehrer wrote:
> 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 ?

-- 
                                                 Gilles.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
  2008-10-09 16:06 ` Gilles Chanteperdrix
@ 2008-10-10  6:36   ` M. Koehrer
  2008-10-10  8:19     ` M. Koehrer
  0 siblings, 1 reply; 6+ messages in thread
From: M. Koehrer @ 2008-10-10  6:36 UTC (permalink / raw)
  To: gilles.chanteperdrix, mathias_koehrer; +Cc: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 905 bytes --]

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


> 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 ?
> 


-- 
Mathias Koehrer
mathias_koehrer@domain.hid


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

[-- Attachment #2: dmesg.complete.gz --]
[-- Type: application/x-gzip, Size: 7851 bytes --]

[-- Attachment #3: linux_config.gz --]
[-- Type: application/x-gzip, Size: 10102 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
  2008-10-10  6:36   ` M. Koehrer
@ 2008-10-10  8:19     ` M. Koehrer
  2008-10-10  9:06       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: M. Koehrer @ 2008-10-10  8:19 UTC (permalink / raw)
  To: gilles.chanteperdrix; +Cc: xenomai

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


> 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
> 
> 
> > 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 ?
> > 
> 
> 


-- 
Mathias Koehrer
mathias_koehrer@domain.hid


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
  2008-10-10  8:19     ` M. Koehrer
@ 2008-10-10  9:06       ` Gilles Chanteperdrix
  2008-10-10 11:42         ` M. Koehrer
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-10-10  9:06 UTC (permalink / raw)
  To: M. Koehrer; +Cc: xenomai

M. Koehrer wrote:
> 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...

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?


diff --git a/include/linux/mm.h b/include/linux/mm.h
index 816cf71..568cd8d 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -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


-- 
                                                 Gilles.


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative!
  2008-10-10  9:06       ` Gilles Chanteperdrix
@ 2008-10-10 11:42         ` M. Koehrer
  0 siblings, 0 replies; 6+ messages in thread
From: M. Koehrer @ 2008-10-10 11:42 UTC (permalink / raw)
  To: gilles.chanteperdrix; +Cc: xenomai

Hello Gilles,

thanks! Now it works fine! 
Great support. 

Best regards

Mathias

> 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?
> 
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 816cf71..568cd8d 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -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
> 


-- 
Mathias Koehrer
mathias_koehrer@domain.hid


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-10-10 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-09 13:07 [Xenomai-help] Bug with Xenomai and xeno_heap: Eeek! page_mapcount(page) went negative! M. Koehrer
2008-10-09 16:06 ` Gilles Chanteperdrix
2008-10-10  6:36   ` M. Koehrer
2008-10-10  8:19     ` M. Koehrer
2008-10-10  9:06       ` Gilles Chanteperdrix
2008-10-10 11:42         ` M. Koehrer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.