[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
pl2link crashes randomly
From: |
Sebastian Reitenbach |
Subject: |
pl2link crashes randomly |
Date: |
Thu, 7 Apr 2011 13:31:30 +0200 |
User-agent: |
KMail/1.13.5 (Linux/2.6.34.7-0.7-xen; KDE/4.4.4; x86_64; ; ) |
Hi,
while building the gnustep ports I recognized that the building fails when
compiled with llvm from time to time. I cannot remember having seen this with
gcc. I digged a bit deeper, and I found that pl2link dumps core, see the
backtrace below.
To actually be able to compile gnustep-base on OpenBSD with llvm (patch is not
needed with gcc) I have to apply the following patch, that David suggested:
--- Source/NSObject.m.orig Sun Apr 3 10:53:10 2011
+++ Source/NSObject.m Mon Apr 4 17:16:24 2011
@@ -945,7 +947,7 @@ objc_create_block_classes_as_subclasses_of(Class super
finalize_imp = class_getMethodImplementation(self, finalize_sel);
#endif
-#if (defined(__FreeBSD__) || defined(__OpenBSD__)) && defined(__i386__)
+#if defined(__FreeBSD__) && defined(__i386__)
// Manipulate the FPU to add the exception mask. (Fixes SIGFPE
// problems on *BSD)
// Note this only works on x86
While David was suggesting above patch, he also mentioned the SIGFPE that
might happen, but here I see in thread 4: sig=27
from /usr/include/sys/signal.h:
#define SIGPROF 27 /* profiling time alarm */
I tried to reproduce the problem when running from within gdb, tried 50 time,
but it was not reproducible this way. Only trying in the shell, by about a
chance of 1 out of about 20, pl2link crashed.
Sebastian
Thread 4 (process 16610, thread 0x803c1c00):
#0 _thread_kern_sched (scp=0xcfbdf3cc) at
/usr/src/lib/libpthread/uthread/uthread_kern.c:488
#1 0x038301f0 in _thread_sig_handler (sig=27, info=0xcfbdf420,
scp=0xcfbdf3cc) at /usr/src/lib/libpthread/uthread/uthread_sig.c:86
#2 <signal handler called>
#3 0x03c4f5e6 in SparseArrayFind (sarray=Variable "sarray" is not available.
) at sarray2.c:76
#4 0x03c4f5ce in SparseArrayFind (sarray=Variable "sarray" is not available.
) at sarray2.c:94
#5 0x03c49cdb in installMethodsInClass () at dtable.c:34
#6 0x03c49b7a in objc_update_dtable_for_class (cls=Variable "cls" is not
available.
) at dtable.c:407
#7 0x03c4e44f in class_addMethod (cls=Variable "cls" is not available.
) at runtime.c:141
#8 0x0a207253 in GSObjCAddMethods (cls=Variable "cls" is not available.
) at GSObjCRuntime.m:543
#9 0x0a207e0f in GSObjCAddClassBehavior (receiver=Variable "receiver" is not
available.
) at GSObjCRuntime.m:886
#10 0x0a080ba1 in +[NSMutableBitmapCharSet initialize]
(_cmd=dwarf2_read_address: Corrupted DWARF expression.
) at NSCharacterSet.m:256
#11 0x03c4a291 in objc_send_initialize (object=Variable "object" is not
available.
) at dtable.c:600
#12 0x03c53525 in objc_msg_lookup (receiver=Variable "receiver" is not
available.
) at sendmsg2.c:68
#13 0x0a081aa8 in +[NSCharacterSet initialize] (self=DWARF-2 expression error:
DW_OP_reg operations must be used either alone or in conjuction with
DW_OP_piece.
) at NSCharacterSet.m:651
#14 0x03c4a291 in objc_send_initialize (object=Variable "object" is not
available.
) at dtable.c:600
#15 0x03c53525 in objc_msg_lookup (receiver=Variable "receiver" is not
available.
) at sendmsg2.c:68
#16 0x0a1993e5 in pathSeps () at NSString.m:241
#17 0x0a198ec1 in -[NSString lastPathComponent] (self=Unhandled dwarf
expression opcode 0x0
) at NSString.m:3440
#18 0x0a15ea1a in _gnu_process_args (argc=Variable "argc" is not available.
) at NSProcessInfo.m:295
#19 0x0a15e812 in main (argc=-809633216, argv=0xcfbdfa40, env=0xcfbdfa40) at
NSProcessInfo.m:976
#20 0x1c0011e7 in ___start ()
#21 0x1c001167 in _start ()
#22 0x00000000 in ?? ()
Thread 3 (process 16610, thread 0x87325800):
#0 _thread_kern_sched (scp=0x0) at
/usr/src/lib/libpthread/uthread/uthread_kern.c:488
#1 0x0382f736 in _thread_kern_sched_state (state=PS_SLEEP_WAIT,
fname=0x2381c1fc "/usr/src/lib/libpthread/uthread/uthread_nanosleep.c",
lineno=84) at /usr/src/lib/libpthread/uthread/uthread_kern.c:561
#2 0x03822972 in nanosleep (time_to_sleep=0x86d40f74, time_remaining=0x0) at
/usr/src/lib/libpthread/uthread/uthread_nanosleep.c:84
#3 0x0fb1baee in usleep (useconds=Variable "useconds" is not available.
) at /usr/src/lib/libc/gen/usleep.c:46
#4 0x03c522f3 in selector_table_collect_garbage (t=Variable "t" is not
available.
) at hash_table.h:138
#5 0x03c53ca6 in runloop (q=Variable "q" is not available.
) at toydispatch.c:197
#6 0x038265be in _thread_start () at
/usr/src/lib/libpthread/uthread/uthread_create.c:242
#7 0x0000002b in ?? ()
#8 0x00000000 in ?? ()
Thread 2 (process 16610, thread 0x87325c00):
#0 0x0fb3a76d in kill () from /usr/lib/libc.so.58.0
#1 0x0fb71af3 in __stack_smash_handler (func=0x2381cfd6 "_spinlock_debug",
damaged=595707704) at /usr/src/lib/libc/sys/stack_protector.c:89
#2 0x0383036d in _spinlock_debug (lck=Variable "lck" is not available.
) at /usr/src/lib/libpthread/uthread/uthread_spinlock.c:109
#3 0x03827c72 in _thread_malloc_lock () at
/usr/src/lib/libpthread/thread/thread_malloc_lock.c:14
#4 0x0fb9ad3d in malloc (size=3) at /usr/src/lib/libc/stdlib/malloc.c:1218
#5 0x0fb80592 in strdup (str=0x2381c5fa "GC") at
/usr/src/lib/libc/string/strdup.c:45
#6 0x0383044a in pthread_set_name_np (thread=0x87325c00, name=0x2381c5fa
"GC") at /usr/src/lib/libpthread/uthread/uthread_info_openbsd.c:472
#7 0x038269fe in _thread_gc (arg=0x0) at
/usr/src/lib/libpthread/uthread/uthread_gc.c:73
#8 0x038265be in _thread_start () at
/usr/src/lib/libpthread/uthread/uthread_create.c:242
#9 0x0000002b in ?? ()
#10 0x00000000 in ?? ()
Thread 1 (process 16610):
#0 0x0fb3a76d in kill () from /usr/lib/libc.so.58.0
#1 0x0fb71af3 in __stack_smash_handler (func=0x2381cfd6 "_spinlock_debug",
damaged=595707704) at /usr/src/lib/libc/sys/stack_protector.c:89
#2 0x0383036d in _spinlock_debug (lck=Variable "lck" is not available.
) at /usr/src/lib/libpthread/uthread/uthread_spinlock.c:109
#3 0x03827c72 in _thread_malloc_lock () at
/usr/src/lib/libpthread/thread/thread_malloc_lock.c:14
#4 0x0fb9ad3d in malloc (size=3) at /usr/src/lib/libc/stdlib/malloc.c:1218
#5 0x0fb80592 in strdup (str=0x2381c5fa "GC") at
/usr/src/lib/libc/string/strdup.c:45
#6 0x0383044a in pthread_set_name_np (thread=0x87325c00, name=0x2381c5fa
"GC") at /usr/src/lib/libpthread/uthread/uthread_info_openbsd.c:472
#7 0x038269fe in _thread_gc (arg=0x0) at
/usr/src/lib/libpthread/uthread/uthread_gc.c:73
#8 0x038265be in _thread_start () at
/usr/src/lib/libpthread/uthread/uthread_create.c:242
#9 0x0000002b in ?? ()
#10 0x00000000 in ?? ()
- pl2link crashes randomly,
Sebastian Reitenbach <=