* [Xenomai-help] shared memory mlockall error w/ mono interpreter?
@ 2008-11-21 0:16 Henry Bausley
2008-11-21 9:55 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Henry Bausley @ 2008-11-21 0:16 UTC (permalink / raw)
To: xenomai
We have an application that uses shared memory to communicate from our
kernel driver to user space. In our own standard C applications we can
issue an mlockall and we can use multiple threads without a problem.
However, we are also using the mono .NET interpreter which links to a
shared library that links to the xenomai shared memory and issues a
mlockall. Whenever we run programs using the mono interpreter we get
the error message Xenomai: process memory not locked (mlockall). mono
is a .NET virtual machine w/ garbage collection like java.
We tried --enable-posix-auto-mlockall but the third party apps running
under mono still crashes with the mlockall
Any suggestions would be greatly appreciated!!!!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] shared memory mlockall error w/ mono interpreter?
2008-11-21 0:16 [Xenomai-help] shared memory mlockall error w/ mono interpreter? Henry Bausley
@ 2008-11-21 9:55 ` Gilles Chanteperdrix
2008-12-02 18:25 ` Henry Bausley
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-11-21 9:55 UTC (permalink / raw)
To: Henry Bausley; +Cc: xenomai
Henry Bausley wrote:
> We have an application that uses shared memory to communicate from our
> kernel driver to user space. In our own standard C applications we can
> issue an mlockall and we can use multiple threads without a problem.
>
> However, we are also using the mono .NET interpreter which links to a
> shared library that links to the xenomai shared memory and issues a
> mlockall. Whenever we run programs using the mono interpreter we get
> the error message Xenomai: process memory not locked (mlockall). mono
> is a .NET virtual machine w/ garbage collection like java.
Does the mono application need real-time services ?
>
> We tried --enable-posix-auto-mlockall but the third party apps running
> under mono still crashes with the mlockall
How does it crash ? Not enough memory ?
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai-help] shared memory mlockall error w/ mono interpreter?
2008-11-21 9:55 ` Gilles Chanteperdrix
@ 2008-12-02 18:25 ` Henry Bausley
2008-12-02 19:15 ` Gilles Chanteperdrix
2008-12-04 16:43 ` Henry Bausley
0 siblings, 2 replies; 6+ messages in thread
From: Henry Bausley @ 2008-12-02 18:25 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
The mono application doesn't need realtime services. But it does need
access to DPRAM.
It crashes with the message:
Xenomai: process memory not locked (missing mlockall?)
On Fri, 2008-11-21 at 10:55 +0100, Gilles Chanteperdrix wrote:
> Henry Bausley wrote:
> > We have an application that uses shared memory to communicate from our
> > kernel driver to user space. In our own standard C applications we can
> > issue an mlockall and we can use multiple threads without a problem.
> >
> > However, we are also using the mono .NET interpreter which links to a
> > shared library that links to the xenomai shared memory and issues a
> > mlockall. Whenever we run programs using the mono interpreter we get
> > the error message Xenomai: process memory not locked (mlockall). mono
> > is a .NET virtual machine w/ garbage collection like java.
>
> Does the mono application need real-time services ?
>
> >
> > We tried --enable-posix-auto-mlockall but the third party apps running
> > under mono still crashes with the mlockall
>
> How does it crash ? Not enough memory ?
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] shared memory mlockall error w/ mono interpreter?
2008-12-02 18:25 ` Henry Bausley
@ 2008-12-02 19:15 ` Gilles Chanteperdrix
2008-12-04 16:43 ` Henry Bausley
1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-12-02 19:15 UTC (permalink / raw)
To: Henry Bausley; +Cc: xenomai
Henry Bausley wrote:
> The mono application doesn't need realtime services. But it does need
> access to DPRAM.
So, maybe you can create a small character device driver and implement
the mmap method for this driver, this will allow you to share a piece of
memory between kernel and user-space without resorting to Xenomai
services. There are examples of this sort of things in the "Linux
devices drivers" book.
>
> It crashes with the message:
> Xenomai: process memory not locked (missing mlockall?)
Ok. Got it now. So, mono probably calls munlockall. Another solution is
to look for this munlockall in mono sources and recompile mono without it.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Xenomai-help] shared memory mlockall error w/ mono interpreter?
2008-12-02 18:25 ` Henry Bausley
2008-12-02 19:15 ` Gilles Chanteperdrix
@ 2008-12-04 16:43 ` Henry Bausley
2008-12-04 17:41 ` Gilles Chanteperdrix
1 sibling, 1 reply; 6+ messages in thread
From: Henry Bausley @ 2008-12-04 16:43 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
This problem seemed to be caused by the boehm garbage collector used in
mono. The Boehm garbage collector uses SIGXCPU and SIGPWR to
synchronize cross-thread garbage collection. Recompiling the mono
garbage collector to use a different signal values (SIGRTMIN + 5)
instead of SIGXCPU seems to have solved the problem. Does this make
sense.
On Tue, 2008-12-02 at 10:25 -0800, Henry Bausley wrote:
> The mono application doesn't need realtime services. But it does need
> access to DPRAM.
>
> It crashes with the message:
> Xenomai: process memory not locked (missing mlockall?)
>
> On Fri, 2008-11-21 at 10:55 +0100, Gilles Chanteperdrix wrote:
> > Henry Bausley wrote:
> > > We have an application that uses shared memory to communicate from our
> > > kernel driver to user space. In our own standard C applications we can
> > > issue an mlockall and we can use multiple threads without a problem.
> > >
> > > However, we are also using the mono .NET interpreter which links to a
> > > shared library that links to the xenomai shared memory and issues a
> > > mlockall. Whenever we run programs using the mono interpreter we get
> > > the error message Xenomai: process memory not locked (mlockall). mono
> > > is a .NET virtual machine w/ garbage collection like java.
> >
> > Does the mono application need real-time services ?
> >
> > >
> > > We tried --enable-posix-auto-mlockall but the third party apps running
> > > under mono still crashes with the mlockall
> >
> > How does it crash ? Not enough memory ?
> >
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-help] shared memory mlockall error w/ mono interpreter?
2008-12-04 16:43 ` Henry Bausley
@ 2008-12-04 17:41 ` Gilles Chanteperdrix
0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2008-12-04 17:41 UTC (permalink / raw)
To: Henry Bausley; +Cc: xenomai
Henry Bausley wrote:
> This problem seemed to be caused by the boehm garbage collector used in
> mono. The Boehm garbage collector uses SIGXCPU and SIGPWR to
> synchronize cross-thread garbage collection. Recompiling the mono
> garbage collector to use a different signal values (SIGRTMIN + 5)
> instead of SIGXCPU seems to have solved the problem. Does this make
> sense.
Yes, it makes sense, since SIGXCPU is used before the creation of the
first real-time thread to signal that mlockall has not been called.
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-12-04 17:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-21 0:16 [Xenomai-help] shared memory mlockall error w/ mono interpreter? Henry Bausley
2008-11-21 9:55 ` Gilles Chanteperdrix
2008-12-02 18:25 ` Henry Bausley
2008-12-02 19:15 ` Gilles Chanteperdrix
2008-12-04 16:43 ` Henry Bausley
2008-12-04 17:41 ` Gilles Chanteperdrix
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.