Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-1632

Seg fault due to infinite recursion "<< RepeatedPtrField<Resource>"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.20.0
    • 0.20.0
    • None
    • None

    Description

      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
      ...
      
      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);
      }
      

      It was fine before this commit: https://github.com/apache/mesos/commit/c9d1c4cd1be097e3bcee63855847da272c43bc68

      Attachments

        Activity

          People

            ijimenez Isabel Jimenez
            xujyan Yan Xu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: