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

seg exception on the m_receiveBuffer->insert() line #7

Open
yalov opened this issue Sep 23, 2024 · 0 comments
Open

seg exception on the m_receiveBuffer->insert() line #7

yalov opened this issue Sep 23, 2024 · 0 comments

Comments

@yalov
Copy link

yalov commented Sep 23, 2024

Hello, I have the segmentation fault exception, and gdb stackstace leads to the scs (# 3)

#0  std::vector<unsigned char, Scs::Allocator<unsigned char> >::_M_range_insert<unsigned char const*> (this=0x7fff3771f7f0, 
    __position=non-dereferenceable iterator for std::vector, 
    __first=0x7fff9c033001 "", __last=__last@entry=0x7fff9c03300d "")
    at /usr/include/c++/9/bits/vector.tcc:778
        __len = <optimized out>
        __new_start = 0x7fff3771f810 ""
        __new_finish = <optimized out>
        __n = 12
#1  0x0000555555679d19 in std::vector<unsigned char, Scs::Allocator<unsigned char> >::_M_insert_dispatch<unsigned char const*> (__last=0x7fff9c03300d "", 
    __first=<optimized out>, __pos=..., this=<optimized out>)
    at /usr/include/c++/9/bits/stl_vector.h:1659
No locals.
#2  std::vector<unsigned char, Scs::Allocator<unsigned char> >::insert<unsigned char const*, void> (__last=0x7fff9c03300d "", __first=<optimized out>, 
    __position=..., this=<optimized out>)
    at /usr/include/c++/9/bits/stl_vector.h:1380
        __offset = <optimized out>
#3  Scs::ReceiveQueue::Push (this=0x7fffc8000eb8, data=0x7fff98000b90, 
    bytes=18446744073642236835)
    at /home/user/myproject/scs/src/ScsReceiveQueue.cpp:72
        bytesToWrite = 12
        maxBytes = <optimized out>
        lock = {_M_device = @0x7fffc8000f08}
        dataBytes = <optimized out>
#4  0x000055555567c239 in Scs::Server::RunConnection (this=0x7fffe0001b00, connection=std::shared_ptr<Scs::Server::ClientConnection> (use count 3, weak count 0) = {...}) at /usr/include/c++/9/bits/shared_ptr_base.h:1020
        receivedData = std::shared_ptr<std::vector<unsigned char, Scs::Allocator<unsigned char> >> (empty) = {get() = 0x0}
        bytesReceived = <optimized out>
        timeoutTime = {__d = {__r = 1727394494716978591}}
        receiveBuffer = std::shared_ptr<std::vector<unsigned char, Scs::Allocator<unsigned char> >> (use count 1, weak count 0) = {get() = 0x7fff98000b70}
#5  0x000055555567ca3e in Scs::Server::<lambda()>::operator() (__closure=<optimized out>) at /usr/include/c++/9/ext/atomicity.h:96
        connection = <optimized out>
        this = <optimized out>
        connection = <optimized out>
        this = <optimized out>
#6  std::__invoke_impl<void, Scs::Server::RunListener()::<lambda()> > (__f=...) at /usr/include/c++/9/bits/invoke.h:60
No locals.
#7  std::__invoke<Scs::Server::RunListener()::<lambda()> > (__fn=...) at /usr/include/c++/9/bits/invoke.h:95
No locals.
#8  std::thread::_Invoker<std::tuple<Scs::Server::RunListener()::<lambda()> > >::_M_invoke<0> (this=<optimized out>) at /usr/include/c++/9/thread:244
No locals.
#9  std::thread::_Invoker<std::tuple<Scs::Server::RunListener()::<lambda()> > >::operator() (this=<optimized out>) at /usr/include/c++/9/thread:251
No locals.
#10 std::thread::_State_impl<std::thread::_Invoker<std::tuple<Scs::Server::RunListener()::<lambda()> > > >::_M_run(void) (this=<optimized out>) at /usr/include/c++/9/thread:195
No locals.
#11 0x00007ffff723fdf4 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
No symbol table info available.
#12 0x00007ffff7359609 in start_thread (arg=<optimized out>) at pthread_create.c:477
        ret = <optimized out>
        pd = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140736104212224, -4388621802091818142, 140736903362510, 140736903362511, 140736903362512, 140736104204928, 4388512946482336610, 4388641092072526690}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = 0
#13 0x00007ffff6f2a353 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
No locals.

The only thing that I have understood there is # 3 has a garbage amount of bytes as function argument.
but maybe you will unstand more from the # 4, and where is the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant