shuaimu/rococo

Receive SIGSEGV at random places when calling malloc

Closed this issue · 8 comments

A possible place is
./rrr/rpc/marshal.hpp :34

        raw_bytes(size_t sz = min_size) {
            size = std::max(sz, min_size);
            ptr = new char[size]; 
        }

another possible place is
./rrr/rpc/server.cpp: 154

            Request* req = new Request;
            verify(req->m.read_from_marshal(in_, packet_size) == (size_t) packet_size);
            v64 v_xid;
            req->m >> v_xid;
            req->xid = v_xid.get();
            complete_requests.push_back(req); 

another possible place is
./deptran/rcc_rpc.h: 383

        std::vector* in_1 = new std::vector;

another possible place is
./deptran/rcc_rpc.h: 385

        rrr::i32* out_0 = new rrr::i32;

another possible place is
./deptran/rcc_rpc.h: 408

        rrr::DeferredReply* __defer__ = new rrr::DeferredReply(req, sconn, __marshal_reply__, __cleanup__);

./deptran/rcc_rpc.h: 364

        rrr::i32* out_0 = new rrr::i32;

seems caused by this:
2682d16

may be also caused by some wrongful use of scope locks. seems solved

Yes, I believe the segfault was fixed by this commit: 5b31d5f

The second error where transactions were being committed before all the pieces are done was fixed with this one:
737d3b4