switchtest fails with pthread_create: Cannot allocate memory
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.
Quoted 20 lines · Wolfgang Grandegger
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(quoted diff) +0
-2-bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0 -bash-3.2# free total used free shared buffers cachedMem: 61280 59700 1580 0 0 3932
Quoted 3 lines
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 ?
Signature · 1 line
Gilles.
Quoted 21 lines · Gilles Chanteperdrix
Quoted 20 lines · Wolfgang Grandegger
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(quoted diff) +0
-2-bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0 -bash-3.2# free total used free shared buffers cachedMem: 61280 59700 1580 0 0 3932
Quoted 5 lines
Quoted 3 lines
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.
Quoted 22 lines · Wolfgang Grandegger
Quoted 21 lines · Gilles Chanteperdrix
Quoted 20 lines · Wolfgang Grandegger
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(quoted diff) +0
-2-bash-3.2# ./switchtest rtk0 rtk0 rtup0 rtup0 rtus0 rtus0 rtuo0 -bash-3.2# free total used free shared buffers cachedMem: 61280 59700 1580 0 0 3932
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
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...
Signature · 1 line
Gilles.