This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author blade_doyle
Recipients
Date 2005-12-13.20:22:25
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
On HP-UX the default thread stack size is
"insufficient" and probably needs to be increased if
threads are performing any heavy tasks.  Obviously, the
ideal size depends on you application but I find that
THREAD_STACK_SIZE=0x50000 works well for me.

Using the default thread stack size my multi-threading
tests were failing with a corrupt stack sometimes and
this stack trace other times:

#0  0x79db8c0c in _isspace+0x2d8 () from
/usr/lib/libnss_dns.1
#1  0x7aff62c4 in nss_search+0x28c () from /usr/lib/libc.2
#2  0x7af4d320 in __gethostbyname_r+0x140 () from
/usr/lib/libc.2
#3  0x7af4d4bc in gethostbyname+0x94 () from
/usr/lib/libc.2
#4  here, I am calling: gethostbyname("localhost")
[cut]
#23 0x7a8c49ac in OpSession::begin+0x1c0 ()
from /space/bdoyle/hprisc/lib/oopython.sl
#24 0x7aa42660 in PyCFunction_Call+0xc8 ()
from
/space/bdoyle/PythonBinding/Python-2.4.2/libpython2.4.sl
[cut]
#38 0x7aabbda0 in PyEval_CallObjectWithKeywords+0x1c4 ()
from
/space/bdoyle/PythonBinding/Python-2.4.2/libpython2.4.sl
#39 0x7ab17e8c in t_bootstrap+0xa0 ()
from
/space/bdoyle/PythonBinding/Python-2.4.2/libpython2.4.sl
#40 0x7ab6400c in __pthread_body+0x44 () from
/usr/lib/libpthread.1
#41 0x7ab6e29c in __pthread_start+0x14 () from
/usr/lib/libpthread.1


I tested both Python 2.3.4 and 2.4.2 and increased
stack size solves the probem on both.

I suggest that a note be added to the Python README
under the HP-UX section.  The note should suggest that
the "BASECFLAGS" environment variable be set to include
"-DTHREAD_STACK_SIZE=0x50000" prior to running
configure.  I dont know that 0x50000 is really the
ideal stack size.....

Blade.
History
Date User Action Args
2008-01-20 09:58:20adminlinkissue1379804 messages
2008-01-20 09:58:20admincreate