473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

hp-ux crash: threading within a c++ module.

[also sent to py*********@python.org]

Hi Python Experts,
I am developing a Python interface to an existing (multithreaded) c++
api. I have it working on several platforms (linux, solaris, irix,
windoze) but I am having a few problems with threading on hp-ux and aix
platforms. Here is one of the problems I see.
% uname -a
HP-UX hpux1 B.11.11 U 9000/800 ...
% python -V
Python 2.4.2
My first problem was: When I tried to import my shared library
(oopython.sl) as a python module HP-UX told be that it does not
support dynamic loading shared libraries that contain TLS (thread local
storage). I managed to solve that by rebuilding the python compiler so
that it was linked with the pthread library. As a result the pthread
library is "pre loaded" by the time I ">> import oopython".
Now, my problem is: When I am running my multi-threading test I see a
crash. The threads are being created in the c++ module. Using python
2.3.4 the test hangs. Using python 2.4.2 the test crashes when calling
gethostbyname(). The stack trace is long so I'll just put in the
interesting parts ... if you want more just ask:

#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
This same code is executed earlier in the test but with only 1 thread
running and it does not crash.

Any help would be much appreciated. I have to solve this problem so
I'll be happy to try things and report back the results.
Thanks,
Blade.

Dec 8 '05 #1
1 1678
I finally figured this threading problem out. Soooo simple. The
thread
stack size needed to be increased....the default thread stack size on
hp-ux is insufficient.

I suggest that change be added to the default Python build process ...
or a note added to the README under the HP-UX section at least.
Now I see a 'gc' error and crash on program termination. I'll post
that
error message in a followup post (a new thread for a few topic).

Thanks,
Blade.

Dec 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rami | last post by:
Hello all, Java has some printing problems with hp pcl5e and pcl6 drivers. I have one another printer that is defined just as "...PCL series", and this printer prints java output correctly. So, I...
0
by: rbt | last post by:
Hello there, Depending on the firmware version of the HP printer and the model type, one will encounter a myriad of combinations of the following strings while reading the index page: hp HP...
4
by: Le | last post by:
Our HP representatives are telling us that backing/restoring our MS SQL Servers with "HP Data Protector (HPDP)" is better and safer than using MS Sql's backup/restore process. I have strong...
0
by: Antonio Paglia | last post by:
Hi guys, I saw an strange behavior with some printers of series HP Laserjet 1000. I have installed several printers on my PC, some of them are : HP LaserJet 1020 e 1010. I'm using...
0
by: recruiterforitjobs | last post by:
Hi, Hope you are doing great, My name is Sumit Kumar, and I am a technical recruiter for Okaya Inc, a technical staff augmentation firm located in NY. I am currently in search of an...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.