[Mono-bugs] [Bug 595863] New: Crash when using nhibernate with bidirectional many-to-many relation
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Mon Apr 12 14:37:18 EDT 2010
http://bugzilla.novell.com/show_bug.cgi?id=595863
http://bugzilla.novell.com/show_bug.cgi?id=595863#c0
Summary: Crash when using nhibernate with bidirectional
many-to-many relation
Classification: Mono
Product: Mono: Runtime
Version: SVN
Platform: i686
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: marcus at in-process.se
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/533.2
(KHTML, like Gecko) Chrome/5.0.342.9 Safari/533.2
Mono crashes when defining a bidirectional many-to-many relation.
Reproducible: Always
Steps to Reproduce:
using System;
using FluentNHibernate.Mapping;
using FluentNHibernate;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using FluentNHibernate.Automapping;
namespace Orm.Tests
{
public class ProductMap : ClassMap<Orm.Model.Product>
{
public ProductMap ()
{
Id(x => x.Id);
HasManyToMany<Orm.Model.Rule>(x => x.Rules);
}
}
public class RuleMap : ClassMap<Orm.Model.Rule>
{
public RuleMap ()
{
Id(x => x.Id);
HasManyToMany<Orm.Model.Product>(x => x.Products);
}
}
class MainClass
{
public static void Main (string[] args)
{
var fluentConfig = Fluently.Configure().
Database(MySQLConfiguration.Standard
.Driver<global::NHibernate.Driver.MySqlDataDriver>()
.ConnectionString("<connection here>")
.Dialect<global::NHibernate.Dialect.MySQL5Dialect>()
)
.Mappings(m =>
{
m.FluentMappings.AddFromAssemblyOf<RuleMap>();
});
Configuration cfg = fluentConfig.BuildConfiguration(); <-- Crash
}
}
}
Actual Results:
** ERROR **: compute_class_bitmap: Invalid type 1e for field
System.Collections.Generic.KeyValuePair`2[TKey,TValue]:key
aborting...
Stacktrace:
at FluentNHibernate.MappingModel.AttributeStore.Equals
(FluentNHibernate.MappingModel.AttributeStore) <IL 0x00027, 0xffffffff>
at FluentNHibernate.MappingModel.AttributeStore.Equals
(FluentNHibernate.MappingModel.AttributeStore) <IL 0x0000c, 0x00021>
at FluentNHibernate.MappingModel.AttributeStore.Equals (object) <IL 0x0001b,
0x00042>
at object.Equals (object,object) [0x00017] in
/opt/mono/src/mcs/class/corlib/System/Object.cs:65
at FluentNHibernate.MappingModel.AttributeStore`1.Equals
(FluentNHibernate.MappingModel.AttributeStore`1<T>) <IL 0x0000c, 0x0001b>
at FluentNHibernate.MappingModel.AttributeStore`1.Equals (object) <IL
0x0001b, 0x00060>
at object.Equals (object,object) [0x00017] in
/opt/mono/src/mcs/class/corlib/System/Object.cs:65
at FluentNHibernate.MappingModel.Collections.CollectionMappingBase.Equals
(FluentNHibernate.MappingModel.Collections.CollectionMappingBase) <IL 0x00022,
0x00045>
at FluentNHibernate.MappingModel.Collections.BagMapping.Equals
(FluentNHibernate.MappingModel.Collections.BagMapping) <IL 0x00018, 0x0003e>
at FluentNHibernate.MappingModel.Collections.BagMapping.Equals (object) <IL
0x0001d, 0x00065>
at System.Collections.Generic.EqualityComparer`1/DefaultComparer.Equals (T,T)
[0x00015] in
/opt/mono/src/mcs/class/corlib/System.Collections.Generic/EqualityComparer.cs:85
at System.Linq.Enumerable.Contains<TSource>
(System.Collections.Generic.IEnumerable`1<TSource>,TSource,System.Collections.Generic.IEqualityComparer`1<TSource>)
[0x00026] in /opt/mono/src/mcs/class/System.Core/System.Linq/Enumerable.cs:399
at System.Linq.Enumerable/<CreateExceptIterator>c__Iterator4`1.MoveNext ()
[0x00070] in /opt/mono/src/mcs/class/System.Core/System.Linq/Enumerable.cs:577
at System.Linq.Enumerable.Any<TSource>
(System.Collections.Generic.IEnumerable`1<TSource>) [0x00024] in
/opt/mono/src/mcs/class/System.Core/System.Linq/Enumerable.cs:136
at
FluentNHibernate.Visitors.BiDirectionalManyToManyPairingVisitor.PairCollections
(System.Collections.Generic.IEnumerable`1<FluentNHibernate.MappingModel.Collections.ICollectionMapping>)
<IL 0x0000e, 0x00030>
at
FluentNHibernate.Visitors.BiDirectionalManyToManyPairingVisitor.PairCollections
(System.Collections.Generic.IEnumerable`1<FluentNHibernate.MappingModel.Collections.ICollectionMapping>)
<IL 0x000a8, 0x0018a>
at FluentNHibernate.Visitors.BiDirectionalManyToManyPairingVisitor.Visit
(System.Collections.Generic.IEnumerable`1<FluentNHibernate.MappingModel.HibernateMapping>)
<IL 0x0000e, 0x00026>
at FluentNHibernate.PersistenceModel.ApplyVisitors
(System.Collections.Generic.IEnumerable`1<FluentNHibernate.MappingModel.HibernateMapping>)
<IL 0x00017, 0x00062>
at FluentNHibernate.PersistenceModel.BuildMappings () <IL 0x00036, 0x000ac>
at FluentNHibernate.PersistenceModel.EnsureMappingsBuilt () <IL 0x0000b,
0x0001c>
at FluentNHibernate.PersistenceModel.Configure (NHibernate.Cfg.Configuration)
<IL 0x00001, 0x00023>
at FluentNHibernate.Cfg.FluentMappingsContainer.Apply
(NHibernate.Cfg.Configuration) <IL 0x000ae, 0x00187>
at FluentNHibernate.Cfg.MappingConfiguration.Apply
(NHibernate.Cfg.Configuration) <IL 0x0005c, 0x000d8>
at FluentNHibernate.Cfg.FluentConfiguration.BuildConfiguration () <IL
0x0000c, 0x0002c>
at Orm.Tests.MainClass.Main (string[]) [0x00046] in
/home/kuse/Code/CLI/Orm/Orm.Tests/Main.cs:114
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <IL 0x0001d, 0x00043>
Native stacktrace:
/opt/mono/bin/mono [0x80d9394]
[0xb7746410]
/lib/tls/i686/cmov/libc.so.6(abort+0x182) [0xb7509932]
/lib/libglib-2.0.so.0 [0xb76b1046]
/lib/libglib-2.0.so.0(g_log+0x26) [0xb76b1076]
/opt/mono/bin/mono [0x8195be9]
/opt/mono/bin/mono [0x8196ac8]
/opt/mono/bin/mono [0x8196eb1]
/opt/mono/bin/mono(mono_class_vtable+0x20) [0x8197cd0]
/opt/mono/bin/mono [0x8075373]
/opt/mono/bin/mono [0x8075dd6]
/opt/mono/bin/mono [0x808c3bb]
/opt/mono/bin/mono [0x8061b81]
/opt/mono/bin/mono [0x8063ade]
/opt/mono/bin/mono [0x806463e]
/opt/mono/bin/mono [0x80dcea6]
/opt/mono/bin/mono [0x80ddc2a]
[0xb736d066]
[0xb59d4f93]
[0xb67c7ae3]
[0xb59d4f44]
[0xb59d4f11]
[0xb67c7ae3]
[0xb59d4e3e]
[0xb59d4dbf]
[0xb59d4d2e]
[0xb59d4cc3]
[0xb59d494f]
[0xb59d3d33]
[0xb59cd56f]
[0xb59d1001]
[0xb59d115b]
[0xb59d0c77]
[0xb59cad2b]
[0xb59e38d5]
[0xb59e380d]
[0xb59e352c]
[0xb5b37310]
[0xb5b27c61]
[0xb5b27a95]
[0xb67b9270]
[0xb67b9374]
/opt/mono/bin/mono [0x8064721]
/opt/mono/bin/mono(mono_runtime_invoke+0x40) [0x8194d30]
/opt/mono/bin/mono(mono_runtime_exec_main+0xd6) [0x8198426]
/opt/mono/bin/mono(mono_runtime_run_main+0x112) [0x819a7c2]
/opt/mono/bin/mono(mono_main+0x1971) [0x80b6bc1]
/opt/mono/bin/mono [0x805b565]
/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb74f2b56]
/opt/mono/bin/mono [0x805b4a1]
Debug info from gdb:
Mono support loaded.
[Thread debugging using libthread_db enabled]
[New Thread 0xb63d4b70 (LWP 3038)]
[New Thread 0xb7732b70 (LWP 3037)]
[New Thread 0xb736cb70 (LWP 3036)]
0xb7746422 in __kernel_vsyscall ()
4 Thread 0xb736cb70 (LWP 3036) 0xb7746422 in __kernel_vsyscall ()
3 Thread 0xb7732b70 (LWP 3037) 0xb7746422 in __kernel_vsyscall ()
2 Thread 0xb63d4b70 (LWP 3038) 0xb7746422 in __kernel_vsyscall ()
* 1 Thread 0xb74a96f0 (LWP 3035) 0xb7746422 in __kernel_vsyscall ()
Thread 4 (Thread 0xb736cb70 (LWP 3036)):
#0 0xb7746422 in __kernel_vsyscall ()
#1 0xb7650e15 in pthread_cond_wait@@GLIBC_2.3.2 () from
/lib/tls/i686/cmov/libpthread.so.0
#2 0x08217160 in GC_wait_marker () at pthread_support.c:1785
#3 0x0820fa00 in GC_help_marker (my_mark_no=7) at mark.c:1116
#4 0x08215fd6 in GC_mark_thread (id=0x0) at pthread_support.c:548
#5 0xb764c80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#6 0xb75a88de in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 3 (Thread 0xb7732b70 (LWP 3037)):
#0 0xb7746422 in __kernel_vsyscall ()
#1 0xb7654466 in nanosleep () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x081de868 in collection_thread (unused=0x0) at collection.c:34
#3 0xb764c80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#4 0xb75a88de in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 2 (Thread 0xb63d4b70 (LWP 3038)):
#0 0xb7746422 in __kernel_vsyscall ()
#1 0xb7652f75 in sem_wait@@GLIBC_2.1 () from
/lib/tls/i686/cmov/libpthread.so.0
#2 0x08207428 in mono_sem_wait (sem=0x82d460c, alertable=0) at
mono-semaphore.c:102
#3 0x08147718 in finalizer_thread (unused=0x0) at gc.c:1033
#4 0x081c6355 in start_wrapper (data=0x83dc360) at threads.c:739
#5 0x081fa20e in thread_start_routine (args=0x83f5cec) at wthreads.c:286
#6 0x08216dfd in GC_start_routine (arg=0x4efe0) at pthread_support.c:1390
#7 0xb764c80e in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#8 0xb75a88de in clone () from /lib/tls/i686/cmov/libc.so.6
Thread 1 (Thread 0xb74a96f0 (LWP 3035)):
#0 0xb7746422 in __kernel_vsyscall ()
#1 0xb7653c8b in read () from /lib/tls/i686/cmov/libpthread.so.0
#2 0x080d9564 in read (signal=6, ctx=0xbf89bd7c) at
/usr/include/bits/unistd.h:45
#3 mono_handle_native_sigsegv (signal=6, ctx=0xbf89bd7c) at
mini-exceptions.c:1947
#4 <signal handler called>
#5 0xb7746422 in __kernel_vsyscall ()
#6 0xb75064d1 in raise () from /lib/tls/i686/cmov/libc.so.6
#7 0xb7509932 in abort () from /lib/tls/i686/cmov/libc.so.6
#8 0xb76b1046 in g_logv () from /lib/libglib-2.0.so.0
#9 0xb76b1076 in g_log () from /lib/libglib-2.0.so.0
#10 0x08195be9 in compute_class_bitmap (class=<value optimized out>,
bitmap=0xbf89c6f8, size=<value optimized out>, offset=0, max_set=0xbf89c70c,
static_fields=0) at object.c:718
#11 0x08196ac8 in mono_class_compute_gc_descriptor
(class="System.Collections.Generic.KeyValuePair`2") at object.c:943
#12 0x08196eb1 in mono_class_create_runtime_vtable (domain=0x25e70,
class="System.Collections.Generic.KeyValuePair`2", raise_on_error=0) at
object.c:1861
#13 mono_class_vtable_full (domain=0x25e70,
class="System.Collections.Generic.KeyValuePair`2", raise_on_error=0) at
object.c:1743
#14 0x08197cd0 in mono_class_vtable (domain=0x25e70,
class="System.Collections.Generic.KeyValuePair`2") at object.c:1714
#15 0x08075373 in handle_alloc (cfg=0x8752c48,
klass="System.Collections.Generic.KeyValuePair`2", for_box=<value optimized
out>) at method-to-ir.c:2991
#16 0x08075dd6 in handle_box (cfg=0x8752c48, val=0x875a3d4,
klass="System.Collections.Generic.KeyValuePair`2") at method-to-ir.c:3070
#17 0x0808c3bb in mono_method_to_ir (cfg=0x8752c48,
method="FluentNHibernate.MappingModel.EqualityExtensions:ContentEquals ()",
start_bblock=0x0, end_bblock=0x0, return_var=0x0, dont_inline=0x0,
inline_args=0x0, inline_offset=0,
is_virtual_call=0) at method-to-ir.c:6150
#18 0x08061b81 in mini_method_compile
(method="FluentNHibernate.MappingModel.EqualityExtensions:ContentEquals ()",
opts=59861503, domain=0x25e70, run_cctors=1, compile_aot=<value optimized out>,
parts=0) at mini.c:4019
#19 0x08063ade in mono_jit_compile_method_inner
(method="FluentNHibernate.MappingModel.EqualityExtensions:ContentEquals ()",
opt=<value optimized out>, ex=<value optimized out>) at mini.c:4681
#20 mono_jit_compile_method_with_opt
(method="FluentNHibernate.MappingModel.EqualityExtensions:ContentEquals ()",
opt=<value optimized out>, ex=<value optimized out>) at mini.c:4881
#21 0x0806463e in mono_jit_compile_method
(method="FluentNHibernate.MappingModel.EqualityExtensions:ContentEquals ()") at
mini.c:4906
#22 0x080dcea6 in common_call_trampoline (regs=<value optimized out>,
code=0xb59d4fd9 "\203\304\020\205\300t
\213E\f\213@\f\213M\b\213I\f\272\064\351u\b\203\354\bQP\350\t", arg=<value
optimized out>, tramp=0x0, vt=0x0, vtable_slot=0x0,
need_rgctx_tramp=0) at mini-trampolines.c:492
#23 0x080ddc2a in mono_magic_trampoline (regs=0xbf89cdc8, code=0xb59d4fd9
"\203\304\020\205\300t
\213E\f\213@\f\213M\b\213I\f\272\064\351u\b\203\354\bQP\350\t", arg=0x875d2d0,
tramp=0x0) at mini-trampolines.c:611
#24 0xb736d066 in ?? ()
#25 0xb59d4f93 in ?? ()
#26 0xb67c7ae3 in ?? ()
#27 0xb59d4f44 in ?? ()
#28 0xb59d4f11 in ?? ()
#29 0xb67c7ae3 in ?? ()
#30 0xb59d4e3e in ?? ()
#31 0xb59d4dbf in ?? ()
#32 0xb59d4d2e in ?? ()
#33 0xb59d4cc3 in ?? ()
#34 0xb59d494f in ?? ()
#35 0xb59d3d33 in ?? ()
#36 0xb59cd56f in ?? ()
#37 0xb59d1001 in ?? ()
#38 0xb59d115b in ?? ()
#39 0xb59d0c77 in ?? ()
#40 0xb59cad2b in ?? ()
#41 0xb59e38d5 in ?? ()
#42 0xb59e380d in ?? ()
#43 0xb59e352c in ?? ()
#44 0xb5b37310 in ?? ()
#45 0xb5b27c61 in ?? ()
#46 0xb5b27a95 in ?? ()
#47 0xb67b9270 in ?? ()
#48 0xb67b9374 in ?? ()
#49 0x08064721 in mono_jit_runtime_invoke (method="Orm.Tests.MainClass:Main
()", obj=0x0, params=0xbf89d36c, exc=0x0) at mini.c:5234
#50 0x08194d30 in mono_runtime_invoke (method="Orm.Tests.MainClass:Main ()",
obj=0x0, params=0xbf89d36c, exc=0x0) at object.c:2692
#51 0x08198426 in mono_runtime_exec_main (method="Orm.Tests.MainClass:Main ()",
args=0x2de50, exc=0x0) at object.c:3825
#52 0x0819a7c2 in mono_runtime_run_main (method="Orm.Tests.MainClass:Main ()",
argc=1, argv=0xbf89d59c, exc=0x0) at object.c:3450
#53 0x080b6bc1 in main_thread_handler (argc=3, argv=0xbf89d594) at driver.c:997
#54 mono_main (argc=3, argv=0xbf89d594) at driver.c:1766
#55 0x0805b565 in main (argc=3, argv=0xbf89d594) at main.c:34
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
The application was terminated by a signal: SIGIOT
Expected Results:
No error
--
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list