[Mono-bugs] [Bug 55131][Nor] New - Thread.Abort() is causing a crash

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 3 Mar 2004 14:47:19 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by martin@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=55131

--- shadow/55131	2004-03-03 14:47:19.000000000 -0500
+++ shadow/55131.tmp.9187	2004-03-03 14:47:19.000000000 -0500
@@ -0,0 +1,68 @@
+Bug#: 55131
+Product: Mono/Runtime
+Version: unspecified
+OS: SUSE 9.0
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: martin@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Thread.Abort() is causing a crash
+
+Attached is a simple test case which is causing a crash in Thread.Abort(). 
+ 
+This is on SuSE 9 with glibc 2.3.3 from ftp.suse.com/pub/projects/glibc/. 
+I debugged it this afternoon and here's what I found: 
+ 
+a) The thread which is to be killed is waiting in 
+pthread_wait_cond@GLIBC_2.3.2. 
+b) x86_unwind_native_frame fails to correctly unwind the stack: 
+ 
+(gdb) info stack 
+#0  0x4089a89b in uw_frame_state_for () from /lib/libgcc_s.so.1 
+#1  0x4089aa01 in __frame_state_for () from /lib/libgcc_s.so.1 
+#2  0x40340c6b in __frame_state_for () from /lib/tls/libc.so.6 
+#3  0x4007d4f8 in x86_unwind_native_frame (domain=0x808eed8, 
+jit_tls=0x23863d01, ctx=0x89fd130, new_ctx=0x4105c274, lmf=0x4105c134, 
+trace=0x4105c268) 
+    at exceptions-x86.c:410 
+#4  0x4007ddf1 in mono_arch_find_jit_info (domain=0x808eed8, 
+jit_tls=0x8248f58, res=0x4105c334, prev_ji=0x23863d01, ctx=0x4105c3c4, 
+new_ctx=0x4105c274,  
+    trace=0x4105c268, lmf=0x4105c26c, native_offset=0x0, managed=0x0) at 
+exceptions-x86.c:812 
+#5  0x4007e6a9 in mono_arch_handle_exception (ctx=0x4105c3c4, 
+obj=0x886cd50, test_only=1) at exceptions-x86.c:1075 
+#6  0x4007eb06 in mono_arch_handle_exception (ctx=0x4105c4f8, 
+obj=0x886cd50, test_only=0) at exceptions-x86.c:1056 
+#7  0x4004e76a in sigusr1_signal_handler (_dummy=33) at mini.c:7926 
+#8  <signal handler called> 
+#9  0xffffe410 in ?? () 
+#10 0x4105c82c in ?? () 
+#11 0x0000007a in ?? () 
+ 
+(gdb) x/i $eip 
+0xffffe410:	pop    %ebp 
+(gdb)  
+0xffffe411:	pop    %edx 
+(gdb)  
+0xffffe412:	pop    %ecx 
+(gdb)  
+0xffffe413:	ret     
+(gdb) x/x $esp 
+0x40eac870:	0x40eac8d0 
+(gdb)  
+0x40eac874:	0x00000063 
+(gdb)  
+0x40eac878:	0x00000000 
+(gdb)  
+0x40eac87c:	0x402045d0 
+(gdb) x/i 0x402045d0 
+0x402045d0 <pthread_cond_timedwait@@GLIBC_2.3.2+192>:	sub    $0x10,%ebx