mail-archives/mono-bugs/2009-February/085375.html

214 строки
9.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mono-bugs] [Bug 470568] mono_thread_current() called after TlsFree(current_object_key)
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20470568%5D%20mono_thread_current%28%29%20called%20after%0A%20TlsFree%28current_object_key%29&In-Reply-To=bug-470568-28286%40https.bugzilla.novell.com/">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="085374.html">
<LINK REL="Next" HREF="085376.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mono-bugs] [Bug 470568] mono_thread_current() called after TlsFree(current_object_key)</H1>
<B>bugzilla_noreply at novell.com</B>
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20470568%5D%20mono_thread_current%28%29%20called%20after%0A%20TlsFree%28current_object_key%29&In-Reply-To=bug-470568-28286%40https.bugzilla.novell.com/"
TITLE="[Mono-bugs] [Bug 470568] mono_thread_current() called after TlsFree(current_object_key)">bugzilla_noreply at novell.com
</A><BR>
<I>Sun Feb 1 16:13:21 EST 2009</I>
<P><UL>
<LI>Previous message: <A HREF="085374.html">[Mono-bugs] [Bug 471275] Internal compiler error -&gt; System.OverflowException: Value is greater than Int64.MaxValue
</A></li>
<LI>Next message: <A HREF="085376.html">[Mono-bugs] [Bug 471259] NullReferenceException using Reflection with valid Nullable/ByRef arguments
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#85375">[ date ]</a>
<a href="thread.html#85375">[ thread ]</a>
<a href="subject.html#85375">[ subject ]</a>
<a href="author.html#85375">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE><A HREF="https://bugzilla.novell.com/show_bug.cgi?id=470568">https://bugzilla.novell.com/show_bug.cgi?id=470568</A>
User <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">andyhume32 at yahoo.co.uk</A> added comment
<A HREF="https://bugzilla.novell.com/show_bug.cgi?id=470568#c3">https://bugzilla.novell.com/show_bug.cgi?id=470568#c3</A>
--- Comment #3 from Andy Hume &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">andyhume32 at yahoo.co.uk</A>&gt; 2009-02-01 14:13:19 MST ---
Out of interest I installed MingW's gdb; it gives correct locations, see below.
As expected the locations with big offsets were wrong, so the second case was
actually in mini_thread_cleanup.
[[
$ /cygdrive/d/Temp/2009-01/gdb-6.8-mingw-3/bin/gdb.exe --args mono mdoc
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;<A HREF="http://gnu.org/licenses/gpl.html">http://gnu.org/licenses/gpl.html</A>&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;i686-pc-mingw32&quot;...
(gdb) directory /cygwin/usr/src/mono/mono/mono/mini/
Source directories searched: /cygwin/usr/src/mono/mono/mono/mini;$cdir;$cwd
(gdb) directory /cygwin/usr/src/mono/mono/mono/metadata
Source directories searched:
/cygwin/usr/src/mono/mono/mono/metadata;/cygwin/usr
/src/mono/mono/mono/mini;$cdir;$cwd
(gdb) break threads.c:mono_thread_cleanup
No source file named threads.c in loaded symbols.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (threads.c:mono_thread_cleanup) pending.
(gdb) break threads.c:mono_thread_current
No source file named threads.c in loaded symbols.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (threads.c:mono_thread_current) pending.
(gdb) disable breakpoints 2
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y &lt;PENDING&gt; threads.c:mono_thread_cleanup
2 breakpoint keep n &lt;PENDING&gt; threads.c:mono_thread_current
(gdb) run
Starting program: D:\cygwin\usr\local\bin/mono.exe mdoc
[New thread 3360.0x2058]
mono_thread_init: Allocated current_object_key 0x18
[New thread 3360.0x7a0]
Cannot open assembly 'mdoc': No such file or directory.
Breakpoint 1, mono_thread_cleanup () at threads.c:2344
2344 mono_thread_hazardous_try_free_all ();
(gdb) backtrace
#0 mono_thread_cleanup () at threads.c:2344
#1 0x68fb81ff in mono_runtime_cleanup (domain=&lt;incomplete type&gt;)
at appdomain.c:299
#2 0x68ec8b66 in mini_cleanup (domain=0xb84f00) at mini.c:5465
#3 0x68f20cdd in mono_main (argc=2, argv=0x3f2ab0) at driver.c:1608
#4 0x00401392 in main () at main.c:25
(gdb) enable breakpoint 2
(gdb) cont
Continuing.
[Switching to thread 3360.0x7a0]
Breakpoint 2, mono_thread_current () at threads.c:1275
1275 { printf (&quot;%s: mono_thread_current calling GET_CURRENT_OBJECT
key:
0x%x \n&quot;, __func__, current_object_key);
(gdb) backtrace
#0 mono_thread_current () at threads.c:1275
#1 0x68faf7ec in mono_thread_pop_appdomain_ref () at threads.c:2981
#2 0x68faf9ab in thread_cleanup (thread=0xb84d00) at threads.c:528
#3 0x68fb17cd in start_wrapper (data=0xbcd200) at threads.c:639
#4 0x6901a02a in thread_start (arg=0x1144ff8) at win32_threads.c:531
#5 0x7c80b713 in KERNEL32!GetModuleFileNameA ()
from C:\WINDOWS\system32\kernel32.dll
#6 0x00000000 in ?? ()
(gdb) cont
Continuing.
mono_thread_cleanup: TlsFree current_object_key 0x18
mono_thread_current: mono_thread_current calling GET_CURRENT_OBJECT key: 0x18
Error: dll starting at 0xe00000 not found.
Breakpoint 2, mono_thread_current () at threads.c:1275
1275 { printf (&quot;%s: mono_thread_current calling GET_CURRENT_OBJECT
key:
0x%x \n&quot;, __func__, current_object_key);
(gdb) backtrace
#0 mono_thread_current () at threads.c:1275
#1 0x68ec3ead in mini_thread_cleanup (thread=0xb84d00) at mini.c:2241
#2 0x68faf997 in thread_cleanup (thread=0xbcd290) at threads.c:541
#3 0x68fb17cd in start_wrapper (data=0xbcd200) at threads.c:639
#4 0x6901a02a in thread_start (arg=0x1144ff8) at win32_threads.c:531
#5 0x7c80b713 in KERNEL32!GetModuleFileNameA ()
from C:\WINDOWS\system32\kernel32.dll
#6 0x00000000 in ?? ()
(gdb) cont
Continuing.
mono_thread_current: mono_thread_current calling GET_CURRENT_OBJECT key: 0x18
Breakpoint 2, mono_thread_current () at threads.c:1275
1275 { printf (&quot;%s: mono_thread_current calling GET_CURRENT_OBJECT
key:
0x%x \n&quot;, __func__, current_object_key);
(gdb) backtrace
#0 mono_thread_current () at threads.c:1275
#1 0x68fb16bb in mono_thread_cleanup_apartment_state () at threads.c:3730
#2 0x68fb17d2 in start_wrapper (data=0xbcd200) at threads.c:646
#3 0x6901a02a in thread_start (arg=0x1144ff8) at win32_threads.c:531
#4 0x7c80b713 in KERNEL32!GetModuleFileNameA ()
from C:\WINDOWS\system32\kernel32.dll
#5 0x00000000 in ?? ()
(gdb) cont
Continuing.
mono_thread_current: mono_thread_current calling GET_CURRENT_OBJECT key: 0x18
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to thread 3360.0x2058]
0x7c90e4df in ntdll!LdrAlternateResourcesEnabled ()
from C:\WINDOWS\system32\ntdll.dll
(gdb) ba
#0 0x7c90e4df in ntdll!LdrAlternateResourcesEnabled ()
from C:\WINDOWS\system32\ntdll.dll
#1 0x7c90e4f4 in ntdll!LdrAccessOutOfProcessResource ()
from C:\WINDOWS\system32\ntdll.dll
#2 0x7c90cfdc in ntdll!ZwClose () from C:\WINDOWS\system32\ntdll.dll
#3 0x7c809c1b in KERNEL32!CloseHandle ()
from C:\WINDOWS\system32\kernel32.dll
#4 0x690198fd in GC_delete_gc_thread (thr=0x690bc7fc) at win32_threads.c:180
#5 0x6901a124 in GC_DllMain (inst=0x68ec0000, reason=0, reserved=0x1)
at win32_threads.c:810
#6 0x68f1f070 in DllMain (module_handle=0x68ec0000, reason=0, reserved=0x1)
at driver.c:1181
#7 0x68ec1086 in <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">DllMainCRTStartup at 12</A> ()
from D:\cygwin\usr\local\bin\mono.dll
#8 0x7c90118a in ntdll!LdrSetAppCompatDllRedirectionCallback ()
from C:\WINDOWS\system32\ntdll.dll
#9 0x68ec0000 in ?? ()
#10 0x00000000 in ?? ()
(gdb) cont
Continuing.
Program exited with code 02.
(gdb)
]]
--
Configure bugmail: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="085374.html">[Mono-bugs] [Bug 471275] Internal compiler error -&gt; System.OverflowException: Value is greater than Int64.MaxValue
</A></li>
<LI>Next message: <A HREF="085376.html">[Mono-bugs] [Bug 471259] NullReferenceException using Reflection with valid Nullable/ByRef arguments
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#85375">[ date ]</a>
<a href="thread.html#85375">[ thread ]</a>
<a href="subject.html#85375">[ subject ]</a>
<a href="author.html#85375">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
mailing list</a><br>
</body></html>