You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With latest version v3.2.0, got a segfault on this line of the test python setup.py test --cpp_implementation about once every two to four tries. It doesn't always happen, but when it happens it is always on this line.
frame #0: 0x0000000104ec52c1 _message.so`google::protobuf::python::cmessage::GetFieldDescriptor(google::protobuf::python::CMessage*, _object*) [inlined] google::protobuf::Message::GetDescriptor(this=0x00007f9132e86ad0) const + 3 at message.h:322
319
320 // Get a Descriptor for this message's type. This describes what
321 // fields the message contains, the types of those fields, etc.
-> 322 const Descriptor* GetDescriptor() const { return GetMetadata().descriptor; }
323
324 // Get the Reflection interface for this Message, which can be used to
325 // read and modify the fields of the Message dynamically (in other words,
(lldb) up
frame #1: 0x0000000104ec52be _message.so`google::protobuf::python::cmessage::GetFieldDescriptor(self=<unavailable>, name=<unavailable>) + 14 at message.cc:986
983 // handling is not consistent.
984 static const FieldDescriptor* GetFieldDescriptor(
985 CMessage* self, PyObject* name) {
-> 986 const Descriptor *message_descriptor = self->message->GetDescriptor();
987 char* field_name;
988 Py_ssize_t size;
989 if (PyString_AsStringAndSize(name, &field_name, &size) < 0) {
(lldb) up
frame #2: 0x0000000104ec5381 _message.so`google::protobuf::python::cmessage::GetAttr(self=0x000000010548ac80, name=0x000000010291db48) + 65 at message.cc:2695
2692 return value;
2693 }
2694
-> 2695 const FieldDescriptor* field_descriptor = GetFieldDescriptor(self, name);
2696 if (field_descriptor == NULL) {
2697 return CMessage_Type.tp_base->tp_getattro(
2698 reinterpret_cast<PyObject*>(self), name);
The text was updated successfully, but these errors were encountered:
I am also getting this exact segfault when running tests on our custom objects. I'm running v3.0.2, and we run our python tests with nosetests. Any idea what is going on?
Can you give more trace information and which line of testMergeFrom() fail? I am unable to reproduce the segfault. Does all other tests always pass if comments out testMergeFrom()?
Followed instructions here for OSX:
https://github.com/google/protobuf/tree/master/python
With latest version v3.2.0, got a segfault on this line of the test
python setup.py test --cpp_implementation
about once every two to four tries. It doesn't always happen, but when it happens it is always on this line.testMergeFrom (google.protobuf.internal.message_test.Proto3Test) ... Segmentation fault: 11
trace from lldb:
The text was updated successfully, but these errors were encountered: