Yan Xu created MESOS-1632:
-----------------------------
Summary: Seg fault due to infinite recursion "<<
RepeatedPtrField<Resource>"
Key: MESOS-1632
URL: https://issues.apache.org/jira/browse/MESOS-1632
Project: Mesos
Issue Type: Bug
Affects Versions: 0.20.0
Reporter: Yan Xu
{noformat:title=error}
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffe7daa940 (LWP 40525)]
0x00007ffff4fb3b78 in _int_malloc () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff4fb3b78 in _int_malloc () from /lib64/libc.so.6
#1 0x00007ffff4fb609e in malloc () from /lib64/libc.so.6
#2 0x00007ffff55db25d in operator new(unsigned long) () from
/usr/lib64/libstdc++.so.6
#3 0x00007ffff55db379 in operator new[](unsigned long) () from
/usr/lib64/libstdc++.so.6
#4 0x00007ffff6f83c97 in
google::protobuf::internal::RepeatedPtrFieldBase::Reserve (this=0xd401b10,
new_size=<optimized out>) at google/protobuf/repeated_field.cc:51
#5 0x00007ffff6d9d526 in
MergeFrom<google::protobuf::RepeatedPtrField<mesos::Value_Range>::TypeHandler>
(other=..., this=0xd401b10) at
../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/google/protobuf/repeated_field.h:864
#6 MergeFrom (other=..., this=0xd401b10) at
../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/google/protobuf/repeated_field.h:1091
#7 mesos::Value_Ranges::MergeFrom (this=0xd401b00, from=...) at
mesos.pb.cc:7440
#8 0x00007ffff6da1e3d in mesos::Resource::MergeFrom
(this=this@entry=0xd401a90, from=...) at mesos.pb.cc:9196
#9 0x00000000004c5acc in Merge (to=<optimized out>, from=...) at
../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/google/protobuf/repeated_field.h:339
#10
google::protobuf::internal::RepeatedPtrFieldBase::MergeFrom<google::protobuf::RepeatedPtrField<mesos::Resource>::TypeHandler>
(this=this@entry=0x7fffe75ab240, other=...)
at
../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/google/protobuf/repeated_field.h:866
#11 0x00000000004c5d56 in MergeFrom (other=..., this=0x7fffe75ab240) at
../3rdparty/libprocess/3rdparty/protobuf-2.5.0/src/google/protobuf/repeated_field.h:1091
#12 Resources (_resources=..., this=0x7fffe75ab240) at
../../include/mesos/resources.hpp:78
#13 mesos::operator<< (stream=..., resources=...) at
../../include/mesos/resources.hpp:251
#14 0x00000000004c5e7a in operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#15 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#16 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#17 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#18 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#19 mesos::operator<< (stream=..., resources=...) at
../../include/mesos/resources.hpp:251
#20 0x00000000004c5e7a in operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#21 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#22 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#23 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#24 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#25 mesos::operator<< (stream=..., resources=...) at
../../include/mesos/resources.hpp:251
#26 0x00000000004c5e7a in operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#27 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#28 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#29 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#30 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#31 mesos::operator<< (stream=..., resources=...) at
../../include/mesos/resources.hpp:251
#32 0x00000000004c5e7a in operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#33 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#34 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
#35 operator<< (resources=..., stream=...) at
../../include/mesos/resources.hpp:251
...
{noformat}
{code:title=relevant code}
/*implicit*/
Resources(const google::protobuf::RepeatedPtrField<Resource>& _resources)
{
resources.MergeFrom(_resources);
}
inline std::ostream& operator << (
std::ostream& stream,
const google::protobuf::RepeatedPtrField<Resource>& resources)
{
return stream << Resources(resources);
}
{code}
It's was fine before this commit:
https://github.com/apache/mesos/commit/c9d1c4cd1be097e3bcee63855847da272c43bc68
--
This message was sent by Atlassian JIRA
(v6.2#6252)