Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize MapField serialization by removing MessageAdapter #8143

Merged
merged 4 commits into from Jan 26, 2021

Conversation

JamesNK
Copy link
Contributor

@JamesNK JamesNK commented Dec 15, 2020

Removes MessageAdapter allocations when serializing/deserializing MapFields.

@google-cla google-cla bot added the cla: yes label Dec 15, 2020
@JamesNK
Copy link
Contributor Author

JamesNK commented Dec 15, 2020

@jtattermusch

@jtattermusch
Copy link
Contributor

Looks like this make C# conformance test fail.

There is currently a problem with displaying protobuf test results publicly (hopefully it's going to be fixed soon),
so I'm pasting the output here:

++ make test_csharp
mkdir google-protobuf
oldpwd=`pwd` && ( cd . && $oldpwd/../src/protoc -I. -I../src --cpp_out=$oldpwd --java_out=$oldpwd --ruby_out=$oldpwd --objc_out=$oldpwd --python_out=$oldpwd --php_out=$oldpwd --js_out=import_style=commonjs,binary:$oldpwd conformance.proto ../src/google/protobuf/test_messages_proto3.proto )
oldpwd=`pwd` && ( cd . && $oldpwd/../src/protoc -I. -I../src --cpp_out=$oldpwd --java_out=$oldpwd --ruby_out=$oldpwd --objc_out=$oldpwd --python_out=$oldpwd --js_out=import_style=commonjs,binary:$oldpwd ../src/google/protobuf/test_messages_proto2.proto )
[libprotobuf WARNING google/protobuf/compiler/ruby/ruby_generator.cc:545] Extensions are not yet supported for proto2 .proto files.
[libprotobuf WARNING google/protobuf/compiler/ruby/ruby_generator.cc:245] Extensions are not yet supported for proto2 .proto files.
[libprotobuf WARNING google/protobuf/compiler/ruby/ruby_generator.cc:245] Extensions are not yet supported for proto2 .proto files.
[libprotobuf WARNING google/protobuf/compiler/ruby/ruby_generator.cc:245] Extensions are not yet supported for proto2 .proto files.
[libprotobuf WARNING google/protobuf/compiler/ruby/ruby_generator.cc:245] Extensions are not yet supported for proto2 .proto files.
oldpwd=`pwd` && ( cd . && $oldpwd/../src/protoc -I. -I../src --cpp_out=$oldpwd --java_out=$oldpwd --ruby_out=$oldpwd --python_out=$oldpwd --js_out=import_style=commonjs,binary:$oldpwd/google-protobuf ../src/google/protobuf/any.proto ../src/google/protobuf/duration.proto ../src/google/protobuf/field_mask.proto ../src/google/protobuf/struct.proto ../src/google/protobuf/timestamp.proto ../src/google/protobuf/wrappers.proto )
touch protoc_middleman
  CXX      conformance_test_runner-conformance_test.o
  CXX      conformance_test_runner-conformance_test_main.o
  CXX      conformance_test_runner-binary_json_conformance_suite.o
  CXX      conformance_test_runner-text_format_conformance_suite.o
  CXX      conformance_test_runner-conformance_test_runner.o
  CXX      third_party/jsoncpp/conformance_test_runner-jsoncpp.o
  CXX      conformance_test_runner-conformance.pb.o
  CXX      google/protobuf/conformance_test_runner-test_messages_proto3.pb.o
  CXX      google/protobuf/conformance_test_runner-test_messages_proto2.pb.o
  CXXLD    conformance-test-runner
Writing shortcut script conformance-csharp...
./conformance-test-runner --enforce_recommended --failure_list failure_list_csharp.txt --text_format_failure_list text_format_failure_list_csharp.txt ./conformance-csharp

Unhandled Exception: System.Exception:  Protobuf request doesn't have specific payload type (conformance.FailureSet)
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 127
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] FindFailures: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17340
[libprotobuf INFO conformance_test_runner.cc:176] child exited, status=0

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto2.TestAllTypesProto2.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs:line 4412
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto2.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17346
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 48

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4783
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17352
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 96

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4783
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.JsonOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17358
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 96

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto2.TestAllTypesProto2.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs:line 4416
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto2.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17364
[libprotobuf INFO conformance_test_runner.cc:176] child exited, status=242

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4787
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17370
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 48

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4787
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.JsonOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17376
[libprotobuf INFO conformance_test_runner.cc:176] child exited, status=249

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 214
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto2.TestAllTypesProto2.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs:line 4428
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto2.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17382
[libprotobuf INFO conformance_test_runner.cc:176] child exited, status=12

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 214
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4799
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17388
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 48

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 214
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4799
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.JsonOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17394
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 48

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto2.TestAllTypesProto2.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto2.cs:line 4420
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto2.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17400
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 16

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4791
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17406
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 48

Unhandled Exception: System.ArgumentNullException: Value cannot be null.
Parameter name: key
   at Google.Protobuf.ProtoPreconditions.CheckNotNullUnconstrained[T](T value, String name) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/ProtoPreconditions.cs:line 74
   at Google.Protobuf.Collections.MapField`2.set_Item(TKey key, TValue value) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 209
   at Google.Protobuf.Collections.MapField`2.AddEntriesFrom(ParseContext& ctx, Codec codec) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/Collections/MapField.cs:line 455
   at ProtobufTestMessages.Proto3.TestAllTypesProto3.pb::Google.Protobuf.IBufferMessage.InternalMergeFrom(ParseContext& input) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Test.TestProtos/TestMessagesProto3.cs:line 4791
   at Google.Protobuf.CodedInputStream.ReadRawMessage(IMessage message) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/CodedInputStream.cs:line 690
   at Google.Protobuf.MessageExtensions.MergeFrom(IMessage message, ByteString data, Boolean discardUnknownFields, ExtensionRegistry registry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageExtensions.cs:line 273
   at Google.Protobuf.MessageParser`1.ParseFrom(ByteString data) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf/MessageParser.cs:line 290
   at Google.Protobuf.Conformance.Program.PerformRequest(ConformanceRequest request, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 116
   at Google.Protobuf.Conformance.Program.RunTest(BinaryReader input, BinaryWriter output, TypeRegistry typeRegistry) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 71
   at Google.Protobuf.Conformance.Program.Main(String[] args) in /tmp/protobuf/protobuf/csharp/src/Google.Protobuf.Conformance/Program.cs:line 56
Aborted (core dumped)
[libprotobuf ERROR conformance_test_runner.cc:322] Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.JsonOutput: unexpected EOF from test program
[libprotobuf INFO conformance_test_runner.cc:163] Trying to reap child, pid=17412
[libprotobuf INFO conformance_test_runner.cc:176] child killed by signal 80

CONFORMANCE TEST BEGIN ====================================

ERROR, test=Required.Proto2.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\252\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 48"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\252\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 96"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.JsonOutput: Failed to parse input or produce output. request=protobuf_payload: "\252\004\000" requested_output_format: JSON message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 96"
ERROR, test=Required.Proto2.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\262\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: BINARY_TEST, response=runtime_error: "child exited, status=242"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\262\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 48"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.JsonOutput: Failed to parse input or produce output. request=protobuf_payload: "\262\004\000" requested_output_format: JSON message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child exited, status=249"
ERROR, test=Required.Proto2.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\312\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: BINARY_TEST, response=runtime_error: "child exited, status=12"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\312\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 48"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.JsonOutput: Failed to parse input or produce output. request=protobuf_payload: "\312\004\000" requested_output_format: JSON message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 48"
ERROR, test=Required.Proto2.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\272\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto2.TestAllTypesProto2" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 16"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput: Failed to parse input or produce output. request=protobuf_payload: "\272\004\000" requested_output_format: PROTOBUF message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 48"
ERROR, test=Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.JsonOutput: Failed to parse input or produce output. request=protobuf_payload: "\272\004\000" requested_output_format: JSON message_type: "protobuf_test_messages.proto3.TestAllTypesProto3" test_category: BINARY_TEST, response=runtime_error: "child killed by signal 80"

These tests failed.  If they can't be fixed right now, you can add them to the failure list so the overall suite can succeed.  Add them to the failure list by running:
  ./update_failure_list.py failure_list_csharp.txt --add failing_tests.txt

  Required.Proto2.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput
  Required.Proto2.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput
  Required.Proto2.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput
  Required.Proto2.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.JsonOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.BYTES.MissingDefault.ProtobufOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.JsonOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.ENUM.MissingDefault.ProtobufOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.JsonOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.MESSAGE.MissingDefault.ProtobufOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.JsonOutput
  Required.Proto3.ProtobufInput.ValidDataMap.STRING.STRING.MissingDefault.ProtobufOutput

CONFORMANCE SUITE FAILED: 1992 successes, 6 skipped, 3 expected failures, 12 unexpected failures.

Makefile:1455: recipe for target 'test_csharp' failed

@JamesNK
Copy link
Contributor Author

JamesNK commented Jan 21, 2021

Should be fixed now.

@jtattermusch
Copy link
Contributor

Test failures are unrelated.

Copy link
Contributor

@jtattermusch jtattermusch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jtattermusch jtattermusch merged commit f6da785 into protocolbuffers:master Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants