Error 14 on OS Call

Jeremy cping at dso.org.sg
Mon Mar 12 23:31:53 EDT 2007


Hi,

I recently started using Python and am working on Python 2.3.6 on Redhat. I
have developed a fat C++ extension for it and have the following problem:

The main module is in the Python code which gets a packet pk of string type
from the extension. It then passes pk to an IP tunnel using
os.write(self.tun_fd,pk).

Sometimes there is a crash at the os.write() call with the message 'OSError:
[Errno 14] Bad address'. When I check the integrity of references tun_fd and
pk by copying them just before write(), there seems to be no problem, so it
looks to me that os or the function reference to write() is bad.

I guess this may be due to a pointer problem in the C++ code. I have been
trying several ways of debugging this problem, but have yet to succeed.

One way I have been trying is to use Purify on Python. However, this leads 
to a segmentation fault in rtlib.o when running make install on the 
instrumented Python code.

Reagrds,
Jeremy







More information about the Python-list mailing list