473,322 Members | 1,714 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,322 software developers and data experts.

PyImport_ImportModule deadlocks

jms
Hey all,

I have an embedded Python shell and everything works fine, however, in
my stdout catcher (in C to grab tracebacks) for some reason when I do
a :

PyImport_ImportModule( "sys" )

It deadlocks the process, is there a need for me to acquire locks
inside of my stdout catching function before calling that import?
Aug 28 '08 #1
1 1592
En Thu, 28 Aug 2008 11:22:50 -0300, jm*@bughunter.ca
<ju**********@gmail.comescribi�:
I have an embedded Python shell and everything works fine, however, in
my stdout catcher (in C to grab tracebacks) for some reason when I do
a :

PyImport_ImportModule( "sys" )

It deadlocks the process, is there a need for me to acquire locks
inside of my stdout catching function before calling that import?
The deadlock might be due to the import lock. But instead of analyzing
that issue: why do you want to import sys? The sys module is always
available. To access its attributes, use PySys_GetObject &Co.

--
Gabriel Genellina

Aug 29 '08 #2

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

Similar topics

1
by: AKS | last post by:
I am getting lot of deadlocks in my application. As it is very complex ti avoid deadlocks at this stage of application we have done few steps to lessen the impact. We have added retries after...
1
by: Matt White | last post by:
We've found deadlocks in the trace file that were not captured by our Powerbuilder application. Some deadlocks are trapped or, at least, reported to the user as a db error, and others are...
7
by: Marcus | last post by:
Hello all, I am trying to figure out when it is appropriate to use shared and exclusive locks with InnoDB. Using shared locks (lock in share mode), I can easily create a scenario with 2 clients...
9
by: Mike Carr | last post by:
I am running into an issue. Recently I installed IBuySpy Portal and then converted the data source to odp.net. When debugging the app my machine would freeze or become really slow. I can reproduce...
6
by: Greg Stark | last post by:
There's another poster complaining about referential integrity checks causing deadlocks. Unfortunately I've deleted the message so this response (and the archives aren't responding) isn't going to...
2
Bulldog
by: Bulldog | last post by:
I am new to this board and I am using Python 2.2.1 on Windows XP SP2. I am working on embedding some python functionality in a C++ win32 DLL, and I am having issues using the PyImport_ functions...
4
by: David Abrahams | last post by:
I'm seeing highly surprising (and different!) behaviors of PyImport_ImportModule on Linux and Windows when used in a program with python embedding. On Linux, when attempting to import a module...
1
by: Borse, Ganesh | last post by:
Hi, Can you please guide me for the following problem? The call to "PyImport_ImportModule("cStringIO");" is failing with an error of "undefined symbol: PyObject_SelfIter". Before importing this...
4
by: John Rivers | last post by:
There are many references to deadlock handlers that retry the transaction automatically. But IMO a deadlock is the result of a design flaw that should be fixed. My applications treat...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.