[Mono-bugs] [Bug 674016] New: KnowTypeCollection creates infinite loop

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 22 10:02:25 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=674016

https://bugzilla.novell.com/show_bug.cgi?id=674016#c0


           Summary: KnowTypeCollection creates infinite loop
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: WCF
        AssignedTo: atsushi at ximian.com
        ReportedBy: david at dasz.at
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13

KnowTypeCollection goes into an infinite loop when processing the DataContract
in my project.

I've been able to get two stacktraces with gdb:


Thread 20 (Thread 0x7fffeb9f8700 (LWP 16672)):
#0  0x00007ffff7542330 in sem_wait () from /lib/libpthread.so.0
#1  0x00000000005f3342 in pthread_stop_world () at pthread_stop_world.c:450
#2  0x00000000005f33a8 in GC_stop_world () at pthread_stop_world.c:603
#3  0x00000000005e9013 in GC_stopped_mark (stop_func=0x5e872b
<GC_never_stop_func>) at alloc.c:503
#4  0x00000000005e8d7a in GC_try_to_collect_inner (stop_func=0x5e872b
<GC_never_stop_func>) at alloc.c:382
#5  0x00000000005e9e05 in GC_collect_or_expand (needed_blocks=1,
ignore_off_page=0) at alloc.c:1045
#6  0x00000000005ea085 in GC_allocobj (sz=10, kind=0) at alloc.c:1125
#7  0x00000000005e6af5 in GC_generic_malloc_inner (lb=66, k=0) at malloc.c:136
#8  0x00000000005e6c2d in GC_generic_malloc (lb=66, k=0) at malloc.c:192
#9  0x00000000005e6e29 in GC_malloc_atomic (lb=66) at malloc.c:262
#10 0x00000000005e16b7 in GC_local_malloc_atomic (bytes=66) at
pthread_support.c:393
#11 0x00000000005761e8 in mono_object_allocate_ptrfree (domain=<value optimized
out>, len=20) at object.c:4202
#12 mono_string_new_size (domain=<value optimized out>, len=20) at
object.c:4826
#13 0x0000000000576290 in mono_string_new_utf16 (domain=0x91f8c0,
text=0x24802a0, len=0) at object.c:4796
#14 0x0000000000576bc1 in mono_string_new_len (domain=0x7ffff7e0dd48,
text=<value optimized out>, length=<value optimized out>) at object.c:4859
#15 0x00000000005210cc in load_cattr_value (image=0xa317d0, t=<value optimized
out>, p=0x7ffff2b2aa02
"http://dasz.at/ZBox/T\016\004Name\017UnaryExpression?\001", end=<value
optimized out>) at reflection.c:7827
#16 0x0000000000521947 in create_custom_attr (image=0xa317d0, method=<value
optimized out>, data=<value optimized out>, len=<value optimized out>,
error=<value optimized out>) at reflection.c:8187
#17 0x0000000000521afb in mono_custom_attrs_construct_by_type (cinfo=0x243f3d0,
attr_klass="System.Runtime.Serialization.DataContractAttribute",
error=0x7fffeb9f7110) at reflection.c:8423
#18 0x0000000000529e42 in mono_reflection_get_custom_attrs_by_type (obj=<value
optimized out>,
attr_klass="System.Runtime.Serialization.DataContractAttribute",
error=0x7fffeb9f7110) at reflection.c:8880
#19 0x00000000004f7c38 in custom_attrs_get_by_type (obj=0x7ffff0f30080,
attr_type=<value optimized out>) at icall.c:7503
#20 0x0000000040049706 in (wrapper managed-to-native)
System.MonoCustomAttrs:GetCustomAttributesInternal (param0=...,
param1=System.MonoType = {...}, param2=false) at xdb.il:1524
#21 0x000000004004946c in System.MonoCustomAttrs:GetCustomAttributesBase
(obj=..., attributeType=System.MonoType = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/corlib/System/MonoCustomAttrs.cs:95
#22 0x000000004004fb54 in System.MonoCustomAttrs:GetCustomAttributes (obj=...,
attributeType=System.MonoType = {...}, inherit=false)
    at
/srv/CCNet/mono/src/mono.local/mcs/class/corlib/System/MonoCustomAttrs.cs:138
#23 0x000000004006edcc in System.MonoType:GetCustomAttributes
(this=System.MonoType = {...}, attributeType=System.MonoType = {...},
inherit=false)
    at /srv/CCNet/mono/src/mono.local/mcs/class/corlib/System/MonoType.cs:582
#24 0x000000004016af0e in
System.Runtime.Serialization.SharedContractMap:Initialize
(this=System.Runtime.Serialization.SharedContractMap = {...})
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/SerializationMap.cs:444
#25 0x000000004016a45c in
System.Runtime.Serialization.KnownTypeCollection:RegisterContract
(this=System.Runtime.Serialization.KnownTypeCollection = {...},
type=System.MonoType = {...})
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs:826
#26 0x0000000040169860 in
System.Runtime.Serialization.KnownTypeCollection:TryRegister
(this=System.Runtime.Serialization.KnownTypeCollection = {...},
type=System.MonoType = {...})
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs:652
#27 0x0000000040151334 in
System.Runtime.Serialization.KnownTypeCollection:InsertItem
(this=System.Runtime.Serialization.KnownTypeCollection = {...}, index=0,
type=System.MonoType = {...})
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/KnownTypeCollection.cs:400
---Type <return> to continue, or q <return> to quit---
#28 0x00000000400a8934 in System.Collections.ObjectModel.Collection`1:Add
(this=System.Runtime.Serialization.KnownTypeCollection = {...},
item=-252510080)
    at
/srv/CCNet/mono/src/mono.local/mcs/class/corlib/System.Collections.ObjectModel/Collection.cs:74
#29 0x0000000040150c6c in
System.Runtime.Serialization.DataContractSerializer:PopulateTypes
(this=System.Runtime.Serialization.DataContractSerializer = {...},
knownTypes=...)
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs:234
#30 0x00000000401694f8 in
System.Runtime.Serialization.DataContractSerializer:.ctor
(this=System.Runtime.Serialization.DataContractSerializer = {...},
type=System.MonoType = {...}, rootName="filter",
    rootNamespace="http://dasz.at/ZBox/", knownTypes=...) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/DataContractSerializer.cs:107
#31 0x0000000040169428 in
System.ServiceModel.Dispatcher.DataContractMessagesFormatter:GetSerializer
(this=System.ServiceModel.Dispatcher.DataContractMessagesFormatter = {...},
partDesc=
    System.ServiceModel.Description.MessagePartDescription = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs:506
#32 0x0000000040168ffc in
System.ServiceModel.Dispatcher.DataContractMessagesFormatter:MessageToParts
(this=System.ServiceModel.Dispatcher.DataContractMessagesFormatter = {...}, md=
    System.ServiceModel.Description.MessageDescription = {...},
message=System.ServiceModel.Channels.XmlReaderMessage = {...})
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs:491
#33 0x0000000040168622 in
System.ServiceModel.Dispatcher.BaseMessagesFormatter:DeserializeRequest
(this=System.ServiceModel.Dispatcher.DataContractMessagesFormatter = {...},
message=
    System.ServiceModel.Channels.XmlReaderMessage = {...},
parameters=System.Object [5])
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs:232
#34 0x0000000040168550 in
System.ServiceModel.Dispatcher.OperationFormatter:DeserializeRequest
(this=System.ServiceModel.Dispatcher.OperationFormatter = {...}, message=
    System.ServiceModel.Channels.XmlReaderMessage = {...},
parameters=System.Object [5])
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseMessagesFormatter.cs:99
#35 0x0000000040168332 in
System.ServiceModel.Dispatcher.OperationInvokerHandler:BuildInvokeParams
(this=System.ServiceModel.Dispatcher.OperationInvokerHandler = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...},
parameters=140737146484552)
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs:116
#36 0x0000000040156548 in
System.ServiceModel.Dispatcher.OperationInvokerHandler:DoProcessRequest
(this=System.ServiceModel.Dispatcher.OperationInvokerHandler = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs:46
#37 0x00000000401560ac in
System.ServiceModel.Dispatcher.OperationInvokerHandler:ProcessRequest
(this=System.ServiceModel.Dispatcher.OperationInvokerHandler = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/OperationInvokerHandler.cs:27
#38 0x000000004015455c in
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler:ProcessRequestChain
(this=System.ServiceModel.Dispatcher.OperationInvokerHandler = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseRequestProcessorHandler.cs:15
#39 0x0000000040154579 in
System.ServiceModel.Dispatcher.BaseRequestProcessorHandler:ProcessRequestChain
(this=System.ServiceModel.Dispatcher.PostReceiveRequestHandler = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseRequestProcessorHandler.cs:16
#40 0x000000004015452b in
System.ServiceModel.Dispatcher.HandlersChain:ProcessRequestChain
(this=System.ServiceModel.Dispatcher.HandlersChain = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseRequestProcessor.cs:72
#41 0x00000000401543b8 in
System.ServiceModel.Dispatcher.BaseRequestProcessor:ProcessRequest
(this=System.ServiceModel.Dispatcher.InputOrReplyRequestProcessor = {...}, mrc=
    System.ServiceModel.Dispatcher.MessageProcessingContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/BaseRequestProcessor.cs:26
#42 0x0000000040153cc6 in
System.ServiceModel.Dispatcher.InputOrReplyRequestProcessor:ProcessReply
(this=System.ServiceModel.Dispatcher.InputOrReplyRequestProcessor = {...}, rc=
    System.ServiceModel.Channels.Http.HttpRequestContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InputOrReplyRequestProcessor.cs:51
#43 0x0000000040152da0 in
System.ServiceModel.Dispatcher.ListenerLoopManager:ProcessRequest
(this=System.ServiceModel.Dispatcher.ListenerLoopManager = {...}, reply=...,
rc=
    System.ServiceModel.Channels.Http.HttpRequestContext = {...}) at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs:574
#44 0x0000000040152b08 in
System.ServiceModel.Dispatcher.ListenerLoopManager:TryReceiveRequestDone
(this=System.ServiceModel.Dispatcher.ListenerLoopManager = {...}, result=...)
    at
/srv/CCNet/mono/src/mono.local/mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs:554
#45 0x0000000040013a81 in (wrapper runtime-invoke)
<Module>:runtime_invoke_void__this___object (param0=System.AsyncCallback =
{...}, param1=140737146486024, param2=140737146486000, param3=1074945957)
    at xdb.il:13
#46 0x000000000041e988 in mono_jit_runtime_invoke
(method="System.AsyncCallback:Invoke ()", obj=0x7ffff0effee0, params=<value
optimized out>, exc=0x7fffeb9f7cf0) at mini.c:5722
#47 0x0000000000572fbb in mono_runtime_invoke
(method="System.AsyncCallback:Invoke ()", obj=0x7ffff0effee0,
params=0x7fffeb9f7d08, exc=0x7fffeb9f7cf0) at object.c:2737
#48 0x00000000005a8410 in mono_async_invoke (data=0x7ffff2a1f200) at
threadpool.c:1131
#49 async_invoke_thread (data=0x7ffff2a1f200) at threadpool.c:2008
#50 0x0000000000594e1b in start_wrapper_internal (data=<value optimized out>)
at threads.c:774
#51 start_wrapper (data=<value optimized out>) at threads.c:822
#52 0x00000000005af6b4 in thread_start_routine (args=0x9eb8a8) at
wthreads.c:285
#53 0x00000000005e28ee in GC_start_routine (arg=0x7ffff2ddba10) at
pthread_support.c:1468
#54 0x00007ffff753b8ba in start_thread () from /lib/libpthread.so.0
#55 0x00007ffff72a302d in clone () from /lib/libc.so.6
#56 0x0000000000000000 in ?? ()



Later:


Thread 20 (Thread 0x7fffeb9f8700 (LWP 17762)):
#0  0x00007ffff7542330 in sem_wait () from /lib/libpthread.so.0
#1  0x00000000005f3342 in pthread_stop_world () at pthread_stop_world.c:450
#2  0x00000000005f33a8 in GC_stop_world () at pthread_stop_world.c:603
#3  0x00000000005e9013 in GC_stopped_mark (stop_func=0x5e872b
<GC_never_stop_func>) at alloc.c:503
#4  0x00000000005e8d7a in GC_try_to_collect_inner (stop_func=0x5e872b
<GC_never_stop_func>) at alloc.c:382
#5  0x00000000005e9e05 in GC_collect_or_expand (needed_blocks=1,
ignore_off_page=0) at alloc.c:1045
#6  0x00000000005ea085 in GC_allocobj (sz=4, kind=4) at alloc.c:1125
#7  0x00000000005e6af5 in GC_generic_malloc_inner (lb=32, k=4) at malloc.c:136
#8  0x00000000005f296e in GC_generic_malloc_many (lb=32, k=4,
result=0x7ffff0efd470) at mallocx.c:513
#9  0x00000000005e183d in GC_local_gcj_malloc (bytes=32,
ptr_to_struct_containing_descr=0x222e090) at pthread_support.c:450
#10 0x0000000040013d6a in (wrapper managed-to-native)
object:__icall_wrapper_mono_object_new_fast (param0=35840144) at xdb.il:80
#11 0x000000004016f97c in ?? ()
#12 0x00007ffff24dc101 in ?? ()
#13 0x0000000000000000 in ?? ()



(gdb) p mono_pmip(0x000000004016f97c)
$1 = 0x234d8a0 " System.Runtime.Serialization.KnownTypeCollection:RemoveItem
(int) + 0x6c (0x4016f910 0x4016faeb) [0x7ffff7e0dd48 -
Kistl.Server.Service.exe]"


The problem vanishes if I revert mono-2-10/1e17218a2.



Reproducible: Always

Steps to Reproduce:
1.
2.
3.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list