bproc_rfork

Nicholas Henke henken at seas.upenn.edu
Thu May 9 14:34:04 EDT 2002


Hello all --	
	I am working on updating pybproc to the newer bproc and I am running into 
an issue on a remote fork. The code for the rfork is:

	pid = bproc_rfork(node);

	if (pid == -1) {
		PyErr_SetFromErrno(PyExc_OSError);
		return NULL;
	}
	return PyInt_FromLong(pid);

The local process runs fine, and the remote process is forked, but when 
I do os.waitpid(pid), I see that is always exits because of a SEGFAULT, 
or signal 11. Here is the gdb traceback from the core file:

[henken at alpha pybproc]$ gdb -c core `which python2`
GNU gdb Red Hat Linux (5.1-1)
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...(no debugging symbols 
found)...

warning: core file may not match specified executable file.
Core was generated by `/usr/bin/python2 ./test.py'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/i686/libpthread.so.0...done.

warning: Unable to set global thread event mask: generic error
[New Thread 1024 (LWP 26075)]
Error while reading shared library symbols:
Can't attach LWP 26075: No such process
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libutil.so.1...done.
Loaded symbols for /lib/libutil.so.1
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/python2.1/site-packages/bproc.so...done.
Loaded symbols for /usr/lib/python2.1/site-packages/bproc.so
Reading symbols from /usr/lib/libbproc.so.2...done.
Loaded symbols for /usr/lib/libbproc.so.2
Reading symbols from /usr/lib/python2.1/lib-dynload/timemodule.so...done.
Loaded symbols for /usr/lib/python2.1/lib-dynload/timemodule.so
#0  0x4002cf6c in libc_internal_tsd_get (key=_LIBC_TSD_KEY_MALLOC) at 
specific.c:190
190     specific.c: No such file or directory.
         in specific.c
(gdb) bt
#0  0x4002cf6c in libc_internal_tsd_get (key=_LIBC_TSD_KEY_MALLOC) at 
specific.c:190
#1  0x400e27c7 in __libc_malloc (bytes=30) at malloc.c:2808
#2  0x08092454 in PyString_FromString ()
#3  0x0808f781 in PyDict_GetItemString ()
#4  0x0806ef6d in PySys_GetObject ()
#5  0x08056a1f in PyEval_EvalCode ()
#6  0x080550d5 in PyEval_EvalCode ()
#7  0x0806e031 in PyRun_FileExFlags ()
#8  0x0806d34f in PyRun_SimpleFileExFlags ()
#9  0x08051f30 in Py_Main ()
#10 0x4007e647 in __libc_start_main (main=0x80519d0 <main>, argc=2, 
ubp_av=0xbffffa94, init=0x8050e38 <_init>, fini=0x80a48f0 <_fini>,
     rtld_fini=0x4000dcd4 <_dl_fini>, stack_end=0xbffffa8c) at 
../sysdeps/generic/libc-start.c:129
(gdb)


Please CC me via email as I am not subscribed to this list -- If there 
is somewhere else I should be asking this question, let me know.

Nic




More information about the Python-list mailing list