ststeiger / trust4

Automatically exported from code.google.com/p/trust4
0 stars 0 forks source link

ProtoBuf "Unknown wire-type 7" occurs when starting nodes #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Connecting a node to a preexisting node (under certain circumstances)

What is the exception log?
Unhandled Exception: ProtoBuf.ProtoException: Unknown wire-type 7
  at ProtoBuf.Serializer`1[DistributedServiceProvider.Contacts.UdpContact].ProcessExtraData (ProtoBuf.SerializationContext read, Int32 fieldTag, WireType wireType, ProtoBuf.SerializationContext write) [0x00000] in <filename unknown>:0 
  at ProtoBuf.Serializer`1[DistributedServiceProvider.Contacts.UdpContact].Deserialize[UdpContact] (DistributedServiceProvider.Contacts.UdpContact& instance, ProtoBuf.SerializationContext context) [0x00000] in <filename unknown>:0

Original issue reported on code.google.com by jrho...@redpointsoftware.com.au on 7 Dec 2010 at 7:46

GoogleCodeExporter commented 9 years ago
The following is the leadup to the exception (the "wireType is" stuff is my own 
debugging):

Bootstrapping DHT
 { 50861fcf-b06f-5c40-e7e4-e667fc1ebb89 23b29425-37dc-7940-abd9-4877662f7f2c c9e4161c-5a89-bc71-5cce-0914930567fb 0a2063ac-8374-476a-fb40-9ca44bc7a8f1 }
Loaded bootstrap contact { 127.0.0.1:13000 ba46791c-43b7-61a2-a951-9dd880f8db1f 
33d6809a-a210-8cfa-d5c4-edfb3f14a60b dae421f2-dde3-2970-01e9-5b2e0e97b055 
3eab1568-9f8d-d5f2-606c-0e90ad037c09}
Reply from { 127.0.0.1:13000 ba46791c-43b7-61a2-a951-9dd880f8db1f 
33d6809a-a210-8cfa-d5c4-edfb3f14a60b dae421f2-dde3-2970-01e9-5b2e0e97b055 
3eab1568-9f8d-d5f2-606c-0e90ad037c09}
wireType is: String
wireType is: Variant
wireType is: 7

Unhandled Exception: ProtoBuf.ProtoException: Invalid tag: 0
  at ProtoBuf.Serializer.ParseFieldToken (UInt32 token, ProtoBuf.WireType& wireType, System.Int32& tag) [0x00000] in <filename unknown>:0 
  at ProtoBuf.Serializer`1[DistributedServiceProvider.MessageConsumers.GetClosestNodes+ResponseMessage].Deserialize[ResponseMessage] (DistributedServiceProvider.MessageConsumers.ResponseMessage& instance, ProtoBuf.SerializationContext context) [0x00000] in <filename unknown>:0

Original comment by jrho...@redpointsoftware.com.au on 7 Dec 2010 at 9:19

GoogleCodeExporter commented 9 years ago

Original comment by martinde...@gmail.com on 7 Dec 2010 at 3:28

GoogleCodeExporter commented 9 years ago
Issue not fixed; still occurs on startup.

Original comment by jrho...@redpointsoftware.com.au on 7 Dec 2010 at 11:18

GoogleCodeExporter commented 9 years ago
I managed to get a *full* stack trace for this issue:

ProtoBuf.Serializer`1[[DistributedServiceProvider.Contacts.UdpContact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].ProcessExtraData (read={ProtoBuf.SerializationContext}, 
fieldTag=15, 
wireType=ProtoBuf.WireType.EndGroup|ProtoBuf.WireType.Fixed64|ProtoBuf.WireType.
String, write={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerT.cs:613
ProtoBuf.Serializer`1[[DistributedServiceProvider.Contacts.UdpContact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].Deserialize (instance={{ 127.0.0.1:12000 
50861fcf-b06f-5c40-e7e4-e667fc1ebb89 23b29425-37dc-7940-abd9-4877662f7f2c 
c9e4161c-5a89-bc71-5cce-0914930567fb 0a2063ac-8374-476a-fb40-9ca44bc7a8f1}}, 
context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerT.cs:533
ProtoBuf.Property.PropertyMessageString`4[[DistributedServiceProvider.Contacts.C
ontact, DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.UdpContact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].DeserializeImpl (source={{ 127.0.0.1:12000 
50861fcf-b06f-5c40-e7e4-e667fc1ebb89 23b29425-37dc-7940-abd9-4877662f7f2c 
c9e4161c-5a89-bc71-5cce-0914930567fb 0a2063ac-8374-476a-fb40-9ca44bc7a8f1}}, 
context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/Property/PropertyMessageString.cs:53
ProtoBuf.Serializer`1[[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].Deserialize (instance={{ 127.0.0.1:12000 
50861fcf-b06f-5c40-e7e4-e667fc1ebb89 23b29425-37dc-7940-abd9-4877662f7f2c 
c9e4161c-5a89-bc71-5cce-0914930567fb 0a2063ac-8374-476a-fb40-9ca44bc7a8f1}}, 
context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerT.cs:476
ProtoBuf.Property.PropertyMessageString`4[[DistributedServiceProvider.Contacts.C
ontact, DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].DeserializeImpl (source=(null), 
context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/Property/PropertyMessageString.cs:53
ProtoBuf.Property.PropertyList`3[[DistributedServiceProvider.MessageConsumers.Ge
tClosestNodes+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, 
PublicKeyToken=null],[System.Collections.Generic.List`1[[DistributedServiceProvi
der.Contacts.Contact, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]], mscorlib, Version=2.0.0.0, 
Culture=neutral, 
PublicKeyToken=b77a5c561934e089],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].DeserializeImpl 
(source={DistributedServiceProvider.MessageConsumers.GetClosestNodes.ResponseMes
sage}, context={ProtoBuf.SerializationContext}, canSetValue=true) in 
/home/james/Desktop/Trust4/protobuf-net/Property/PropertyList.cs:64
ProtoBuf.Property.PropertyList`3[[DistributedServiceProvider.MessageConsumers.Ge
tClosestNodes+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, 
PublicKeyToken=null],[System.Collections.Generic.List`1[[DistributedServiceProvi
der.Contacts.Contact, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]], mscorlib, Version=2.0.0.0, 
Culture=neutral, 
PublicKeyToken=b77a5c561934e089],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].Deserialize 
(source={DistributedServiceProvider.MessageConsumers.GetClosestNodes.ResponseMes
sage}, context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/Property/PropertyList.cs:52
ProtoBuf.Serializer`1[[DistributedServiceProvider.MessageConsumers.GetClosestNod
es+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]].Deserialize 
(instance={DistributedServiceProvider.MessageConsumers.GetClosestNodes.ResponseM
essage}, context={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerT.cs:497
ProtoBuf.Serializer`1[[DistributedServiceProvider.MessageConsumers.GetClosestNod
es+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]].DeserializeChecked 
(instance={DistributedServiceProvider.MessageConsumers.GetClosestNodes.ResponseM
essage}, source={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerT.cs:400
ProtoBuf.SerializerItemProxy`2[[DistributedServiceProvider.MessageConsumers.GetC
losestNodes+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.MessageConsumers.GetClosestNode
s+ResponseMessage, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]].Deserialize (instance=(null), 
source={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/SerializerProxy.cs:86
ProtoBuf.Serializer.Deserialize (source={ProtoBuf.SerializationContext}) in 
/home/james/Desktop/Trust4/protobuf-net/Serializer.cs:297
ProtoBuf.Serializer.Deserialize (source={ProtoBuf.SubStream}) in 
/home/james/Desktop/Trust4/protobuf-net/Serializer.cs:289
ProtoBuf.Serializer.TryDeserializeWithLengthPrefix 
(source={System.IO.MemoryStream}, style=ProtoBuf.PrefixStyle.Base128, tag=0, 
item=(null)) in /home/james/Desktop/Trust4/protobuf-net/Serializer.cs:579
ProtoBuf.Serializer.DeserializeWithLengthPrefix 
(source={System.IO.MemoryStream}, style=ProtoBuf.PrefixStyle.Base128, tag=0) in 
/home/james/Desktop/Trust4/protobuf-net/Serializer.cs:489
ProtoBuf.Serializer.DeserializeWithLengthPrefix 
(source={System.IO.MemoryStream}, style=ProtoBuf.PrefixStyle.Base128) in 
/home/james/Desktop/Trust4/protobuf-net/Serializer.cs:474
ProtoBuf.Serializer.DeserializeWithLengthPrefix 
(source={System.IO.MemoryStream}) in 
/home/james/Desktop/Trust4/protobuf-net/Serializer.cs:321
DistributedServiceProvider.MessageConsumers.GetClosestNodes.DecodeResponse 
(response={byte[218]}) in 
/home/james/Desktop/Trust4/DistributedServiceProvider/DistributedServiceProvider
/MessageConsumers/GetClosestNodes.cs:164
DistributedServiceProvider.MessageConsumers.GetClosestNodes.RemoteGetClosest 
(local={{ 127.0.0.1:12000 50861fcf-b06f-5c40-e7e4-e667fc1ebb89 
23b29425-37dc-7940-abd9-4877662f7f2c c9e4161c-5a89-bc71-5cce-0914930567fb 
0a2063ac-8374-476a-fb40-9ca44bc7a8f1}}, remote={{ 127.0.0.1:13000 
639a7d09-b343-6d88-219c-eec222d360af 5d01e460-d5c0-428d-ac56-5037dea76985 
60f74641-f9bb-8c78-a476-fb09f5df41be 7cae9d7f-2075-f443-9d5f-f574b4b5ba21}}, 
target={50861fcf-b06f-5c40-e7e4-e667fc1ebb89 
23b29425-37dc-7940-abd9-4877662f7f2c c9e4161c-5a89-bc71-5cce-0914930567fb 
0a2063ac-8374-476a-fb40-9ca44bc7a8f1}, limit=5, timeout=5000) in 
/home/james/Desktop/Trust4/DistributedServiceProvider/DistributedServiceProvider
/MessageConsumers/GetClosestNodes.cs:57
DistributedServiceProvider.MessageConsumers.GetClosestNodes+<GetClosestContacts>
c__AnonStorey7.<>m__15 (c={{ 127.0.0.1:13000 
639a7d09-b343-6d88-219c-eec222d360af 5d01e460-d5c0-428d-ac56-5037dea76985 
60f74641-f9bb-8c78-a476-fb09f5df41be 7cae9d7f-2075-f443-9d5f-f574b4b5ba21}}) in 
/home/james/Desktop/Trust4/DistributedServiceProvider/DistributedServiceProvider
/MessageConsumers/GetClosestNodes.cs:83
System.Linq.Enumerable+<CreateSelectManyIterator>c__Iterator12`2[[DistributedSer
viceProvider.Contacts.Contact, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, 
PublicKeyToken=null],[DistributedServiceProvider.Contacts.Contact, 
DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]].MoveNext () in 
/usr/src/packages/BUILD/mono-2.8.1/mcs/class/System.Core/System.Linq/Enumerable.
cs:2266
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[[DistributedServiceP
rovider.Contacts.Contact, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]].MoveNext () in 
/usr/src/packages/BUILD/mono-2.8.1/mcs/class/System.Core/System.Linq/Enumerable.
cs:3013
System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[[DistributedServiceP
rovider.Contacts.Contact, DistributedServiceProvider, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null]].MoveNext () in 
/usr/src/packages/BUILD/mono-2.8.1/mcs/class/System.Core/System.Linq/Enumerable.
cs:3013
System.Collections.Generic.HashSet`1[[DistributedServiceProvider.Contacts.Contac
t, DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]]..ctor 
(collection={System.Linq.Enumerable.<CreateWhereIterator>c__Iterator1D<Distribut
edServiceProvider.Contacts.Contact>}, comparer=(null)) in 
/usr/src/packages/BUILD/mono-2.8.1/mcs/class/System.Core/System.Collections.Gene
ric/HashSet.cs:121
System.Collections.Generic.HashSet`1[[DistributedServiceProvider.Contacts.Contac
t, DistributedServiceProvider, Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=null]]..ctor 
(collection={System.Linq.Enumerable.<CreateWhereIterator>c__Iterator1D<Distribut
edServiceProvider.Contacts.Contact>}) in 
/usr/src/packages/BUILD/mono-2.8.1/mcs/class/System.Core/System.Collections.Gene
ric/HashSet.cs
DistributedServiceProvider.MessageConsumers.GetClosestNodes.GetClosestContacts 
(target={50861fcf-b06f-5c40-e7e4-e667fc1ebb89 
23b29425-37dc-7940-abd9-4877662f7f2c c9e4161c-5a89-bc71-5cce-0914930567fb 
0a2063ac-8374-476a-fb40-9ca44bc7a8f1}, terminate=(null)) in 
/home/james/Desktop/Trust4/DistributedServiceProvider/DistributedServiceProvider
/MessageConsumers/GetClosestNodes.cs:78
DistributedServiceProvider.DistributedRoutingTable.Bootstrap 
(initialContacts={Trust4.Manager.<BootstrapPeers>c__Iterator3}) in 
/home/james/Desktop/Trust4/DistributedServiceProvider/DistributedServiceProvider
/DistributedRoutingTable.cs:108
Trust4.Manager.InitalizeDHT () in 
/home/james/Desktop/Trust4/Trust4/Manager.cs:182
Trust4.Manager..ctor () in /home/james/Desktop/Trust4/Trust4/Manager.cs:59
Trust4.Program.Main (args={string[0]}) in 
/home/james/Desktop/Trust4/Trust4/Program.cs:30

Original comment by jrho...@redpointsoftware.com.au on 7 Dec 2010 at 11:23

GoogleCodeExporter commented 9 years ago
No longer an issue since migration to Data4 DHT.

Original comment by jrho...@redpointsoftware.com.au on 9 Dec 2010 at 4:34