Re: Stack consumption in NPTL
- From: Bernd Strieder <strieder@xxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 07 Mar 2008 13:57:46 +0100
Hello,
Chetan wrote:
Hi,
We have an application which creates multiple threads and has some
logging mechanism. We observed that the application crashes when
using
NPTL but works just fine with LinuxThreads.
The stack trace analysis revealed that the crash is due to smaller
stack size. We are setting the stack size to 16K through the program
using pthread_attr_setstacksize() function.
Increasing the stack size to 128K did not reproduce the crash. We are
trying to find out the difference in behavior between LinuxThreads
and
NPTL with respect to stack size, pthread_attr_setstacksize() etc.
Does
anyone know about this? What should be the stack size for the threads
in NPTL?
See
http://people.redhat.com/drepper/nptl-design.pdf
e.g. section 5.6 might be interesting. I'm not fully sure this is the
reason for your problems, but if thread data-structures, thread-local
storage and stack are merged, and the stack size you give is used
without adjustment, then the variations in behaviour compared to
LinuxThreads and by different applications can be explained.
Bernd Strieder
.
- References:
- Stack consumption in NPTL
- From: Chetan
- Stack consumption in NPTL
- Prev by Date: Re: Stack consumption in NPTL
- Next by Date: Re: Stack consumption in NPTL
- Previous by thread: Re: Stack consumption in NPTL
- Next by thread: Re: Stack consumption in NPTL
- Index(es):
Relevant Pages
|