* [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory
@ 2009-01-20 16:45 Wolfgang Grandegger
2009-01-20 16:47 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2009-01-20 16:45 UTC (permalink / raw)
To: xenomai-help
Hello,
when I try to run "switchtest" from the test-suite, I get the error
"pthread_create: Cannot allocate memory"
on my MPC5200 PowerPC board. Some resource is exhausted and likely it's
system memory. I already realized heavy memory usage by threads using
the Xenomai POSIX skin.
-bash-3.2# free
total used free shared buffers cached
Mem: 61280 12044 49236 0 0 5796
-bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0
-bash-3.2# free
total used free shared buffers cached
Mem: 61280 59700 1580 0 0 3932
Any idea what could cause the exhaustive use of memory? Is it the same on
x86? This test was done with Linux 2.6.26 i-Pipe 2.2-07 and Xenomai 2.4.x
but it's the same with trunk.
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory
2009-01-20 16:45 [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory Wolfgang Grandegger
@ 2009-01-20 16:47 ` Gilles Chanteperdrix
2009-01-20 16:57 ` Wolfgang Grandegger
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-20 16:47 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: xenomai-help
Wolfgang Grandegger wrote:
> Hello,
>
> when I try to run "switchtest" from the test-suite, I get the error
>
> "pthread_create: Cannot allocate memory"
>
> on my MPC5200 PowerPC board. Some resource is exhausted and likely it's
> system memory. I already realized heavy memory usage by threads using
> the Xenomai POSIX skin.
>
> -bash-3.2# free
> total used free shared buffers cached
> Mem: 61280 12044 49236 0 0 5796
>
> -bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0
>
> -bash-3.2# free
> total used free shared buffers cached
> Mem: 61280 59700 1580 0 0 3932
>
> Any idea what could cause the exhaustive use of memory? Is it the same on
> x86? This test was done with Linux 2.6.26 i-Pipe 2.2-07 and Xenomai 2.4.x
> but it's the same with trunk.
It not is the stack size problem described in TROUBLESHOOTING ?
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory
2009-01-20 16:47 ` Gilles Chanteperdrix
@ 2009-01-20 16:57 ` Wolfgang Grandegger
2009-01-25 22:40 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Grandegger @ 2009-01-20 16:57 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai-help
Gilles Chanteperdrix wrote:
> Wolfgang Grandegger wrote:
>> Hello,
>>
>> when I try to run "switchtest" from the test-suite, I get the error
>>
>> "pthread_create: Cannot allocate memory"
>>
>> on my MPC5200 PowerPC board. Some resource is exhausted and likely it's
>> system memory. I already realized heavy memory usage by threads using
>> the Xenomai POSIX skin.
>>
>> -bash-3.2# free
>> total used free shared buffers cached
>> Mem: 61280 12044 49236 0 0 5796
>>
>> -bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0
>>
>> -bash-3.2# free
>> total used free shared buffers cached
>> Mem: 61280 59700 1580 0 0 3932
>>
>> Any idea what could cause the exhaustive use of memory? Is it the same on
>> x86? This test was done with Linux 2.6.26 i-Pipe 2.2-07 and Xenomai 2.4.x
>> but it's the same with trunk.
>
> It not is the stack size problem described in TROUBLESHOOTING ?
Well, RTFM, it seems to be exactly the problem described in there.
Setting "ulimit -s 2048" before starting "switchtest" helps.
Thanks.
Wolfgang.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory
2009-01-20 16:57 ` Wolfgang Grandegger
@ 2009-01-25 22:40 ` Gilles Chanteperdrix
0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2009-01-25 22:40 UTC (permalink / raw)
To: Wolfgang Grandegger; +Cc: xenomai-help
Wolfgang Grandegger wrote:
> Gilles Chanteperdrix wrote:
>> Wolfgang Grandegger wrote:
>>> Hello,
>>>
>>> when I try to run "switchtest" from the test-suite, I get the error
>>>
>>> "pthread_create: Cannot allocate memory"
>>>
>>> on my MPC5200 PowerPC board. Some resource is exhausted and likely it's
>>> system memory. I already realized heavy memory usage by threads using
>>> the Xenomai POSIX skin.
>>>
>>> -bash-3.2# free
>>> total used free shared buffers cached
>>> Mem: 61280 12044 49236 0 0 5796
>>>
>>> -bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0
>>>
>>> -bash-3.2# free
>>> total used free shared buffers cached
>>> Mem: 61280 59700 1580 0 0 3932
>>>
>>> Any idea what could cause the exhaustive use of memory? Is it the same on
>>> x86? This test was done with Linux 2.6.26 i-Pipe 2.2-07 and Xenomai 2.4.x
>>> but it's the same with trunk.
>> It not is the stack size problem described in TROUBLESHOOTING ?
>
> Well, RTFM, it seems to be exactly the problem described in there.
> Setting "ulimit -s 2048" before starting "switchtest" helps.
What I do not understand is that switchtest sets the pthreads stack size
to 20K, so we should not have this problem...
--
Gilles.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-25 22:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-20 16:45 [Xenomai-help] switchtest fails with pthread_create: Cannot allocate memory Wolfgang Grandegger
2009-01-20 16:47 ` Gilles Chanteperdrix
2009-01-20 16:57 ` Wolfgang Grandegger
2009-01-25 22:40 ` 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.