Re: threaded python seg faults?

2000-10-31 Thread John Polstra

In article [EMAIL PROTECTED],
Dave Cornejo  [EMAIL PROTECTED] wrote:
 For the last couple of days I've been trying to build python 2 from
 the ports tree without success.  I updated my sources a couple of time
 and rebuilt the kernel and world with no effect.
 
 The problem seems to have appeared in the last couple of days and
 seems to happen while loading libc_r.so.4 - Is anyone else seeing
 this, or have any suggestion what I might be doing wrong?
[...]
 Program received signal SIGSEGV, Segmentation fault.
 0x28383ec6 in pthread_mutex_lock () from /usr/lib/libc_r.so.4
 (gdb) bt
 #0  0x28383ec6 in pthread_mutex_lock () from /usr/lib/libc_r.so.4
 #1  0x80bb5b0 in __register_frame_info ()
 #2  0x2834713a in _init () from /usr/lib/libc_r.so.4
 #3  0x28343fe5 in _init () from /usr/lib/libc_r.so.4
 #4  0x2815086c in _rtld () from /usr/libexec/ld-elf.so.1

It's because libc_r isn't getting initialized in time.

Please try applying the appended patch to "src/gnu/lib/libgcc_r/Makefile"
and let us know if it fixes the problem.  You will need to rebuild
and reinstall libgcc_r, and then rebuild python.

Thanks for providing the detailed information!  This never would
have caught my eye otherwise.

John


Index: Makefile
===
RCS file: /home/ncvs/src/gnu/lib/libgcc_r/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- Makefile1999/10/03 02:43:20 1.4
+++ Makefile2000/10/31 18:06:34
@@ -2,5 +2,6 @@
 
 LIB=   gcc_r
 CFLAGS+=-D_PTHREADS
+CFLAGS+=-D'__GTHREAD_MUTEX_INIT_FUNCTION(m)=pthread_mutex_init(m, NULL)'
 
 .include "../libgcc/Makefile"





To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: threaded python seg faults?

2000-10-31 Thread Dave Cornejo

The patch seems to solve my problems, thank you!

dave c

John Polstra wrote:
 It's because libc_r isn't getting initialized in time.
 
 Please try applying the appended patch to "src/gnu/lib/libgcc_r/Makefile"
 and let us know if it fixes the problem.  You will need to rebuild
 and reinstall libgcc_r, and then rebuild python.
 
 Thanks for providing the detailed information!  This never would
 have caught my eye otherwise.
 
 John
 
 
 Index: Makefile
 ===
 RCS file: /home/ncvs/src/gnu/lib/libgcc_r/Makefile,v
 retrieving revision 1.4
 diff -u -r1.4 Makefile
 --- Makefile  1999/10/03 02:43:20 1.4
 +++ Makefile  2000/10/31 18:06:34
 @@ -2,5 +2,6 @@
  
  LIB= gcc_r
  CFLAGS+=-D_PTHREADS
 +CFLAGS+=-D'__GTHREAD_MUTEX_INIT_FUNCTION(m)=pthread_mutex_init(m, NULL)'
  
  .include "../libgcc/Makefile"
 
 
 


-- 
Dave Cornejo @ Dogwood Media, Fremont, California
  "There aren't any monkeys chasing us..." - Xochi


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



threaded python seg faults?

2000-10-30 Thread Dave Cornejo

For the last couple of days I've been trying to build python 2 from
the ports tree without success.  I updated my sources a couple of time
and rebuilt the kernel and world with no effect.

The problem seems to have appeared in the last couple of days and
seems to happen while loading libc_r.so.4 - Is anyone else seeing
this, or have any suggestion what I might be doing wrong?

Further playing around get it working with WITHOUT_THREADS defined, so
the problem seems to point at the threaded libc - which I've rebuilt
several time in the last couple of days.

thanks!
dave

Here's what gdb shows me:

juneau# gdb python
GNU gdb 4.18
Copyright 1998 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-unknown-freebsd"...
(gdb) run
Starting program: /usr/ports/lang/python/work/Python-2.0/python 

Program received signal SIGSEGV, Segmentation fault.
0x28383ec6 in pthread_mutex_lock () from /usr/lib/libc_r.so.4
(gdb) bt
#0  0x28383ec6 in pthread_mutex_lock () from /usr/lib/libc_r.so.4
#1  0x80bb5b0 in __register_frame_info ()
#2  0x2834713a in _init () from /usr/lib/libc_r.so.4
#3  0x28343fe5 in _init () from /usr/lib/libc_r.so.4
#4  0x2815086c in _rtld () from /usr/libexec/ld-elf.so.1
(gdb) quit
The program is running.  Exit anyway? (y or n) y
juneau#


The system is a dual PIII-600 w/512M RAM if that helps...

-- 
Dave Cornejo @ Dogwood Media, Fremont, California
  "There aren't any monkeys chasing us..." - Xochi


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message