Skip to content

Crash on stopping #10

@madf

Description

@madf

Valgrind:

==25308== Invalid free() / delete / delete[] / realloc()
==25308==    at 0x484CE0D: operator delete(void*, unsigned long) (vg_replace_malloc.c:1181)
==25308==    by 0x486A6EE: ETHER_CAP::~ETHER_CAP() (ether_cap.h:50)
==25308==    by 0x1660E8: STG::PluginRunner::~PluginRunner() (plugin_runner.cpp:54)
==25308==    by 0x1677BB: STG::PluginManager::~PluginManager() (plugin_mgr.cpp:104)
==25308==    by 0x112EFF: main (main.cpp:432)
==25308==  Address 0x4875240 is 0 bytes inside data symbol "_ZZ9GetPluginE6plugin"
==25308== 
==25308== Invalid read of size 8
==25308==    at 0x4869A22: fetch_sub (atomic_base.h:641)
==25308==    by 0x4869A22: std::__stop_state::__remove_source_reference() (stop_token.hpp:67)
==25308==    by 0x486A182: std::stop_source::~stop_source() (stop_token.hpp:416)
==25308==    by 0x486A4D1: std::jthread::~jthread() (jthread.hpp:139)
==25308==    by 0x486A6A1: ETHER_CAP::~ETHER_CAP() (ether_cap.h:50)
==25308==    by 0x4C52E2A: __cxa_finalize (cxa_finalize.c:97)
==25308==    by 0x4868166: ??? (in /tmp/stg/build/projects/stargazer/plugins/mod_cap_ether.so)
==25308==    by 0x40010F1: _dl_call_fini (dl-call_fini.c:43)
==25308==    by 0x4001575: _dl_catch_exception (dl-catch.c:215)
==25308==    by 0x4001D8A: _dl_close_worker (dl-close.c:264)
==25308==    by 0x40026B9: _dl_close (dl-close.c:793)
==25308==    by 0x40014E0: _dl_catch_exception (dl-catch.c:241)
==25308==    by 0x4001612: _dl_catch_error (dl-catch.c:260)
==25308==  Address 0x4fe31a0 is 0 bytes inside a block of size 24 free'd
==25308==    at 0x484CE0D: operator delete(void*, unsigned long) (vg_replace_malloc.c:1181)
==25308==    by 0x4869A51: std::__stop_state::__remove_source_reference() (stop_token.hpp:69)
==25308==    by 0x486A182: std::stop_source::~stop_source() (stop_token.hpp:416)
==25308==    by 0x486A4D1: std::jthread::~jthread() (jthread.hpp:139)
==25308==    by 0x486A6A1: ETHER_CAP::~ETHER_CAP() (ether_cap.h:50)
==25308==    by 0x486A6DD: ETHER_CAP::~ETHER_CAP() (ether_cap.h:50)
==25308==    by 0x1660E8: STG::PluginRunner::~PluginRunner() (plugin_runner.cpp:54)
==25308==    by 0x1677BB: STG::PluginManager::~PluginManager() (plugin_mgr.cpp:104)
==25308==    by 0x112EFF: main (main.cpp:432)
==25308==  Block was alloc'd at
==25308==    at 0x48492A3: operator new(unsigned long) (vg_replace_malloc.c:487)
==25308==    by 0x486A10C: std::stop_source::stop_source() (stop_token.hpp:410)
==25308==    by 0x48689B9: std::jthread::jthread<ETHER_CAP::Start()::{lambda(auto:1)#1}, , void>(ETHER_CAP::Start()::{lambda(auto:1)#1}&&) (jthread.hpp:99)
==25308==    by 0x48684F5: ETHER_CAP::Start() (ether_cap.cpp:87)
==25308==    by 0x16624E: STG::PluginRunner::Start() (plugin_runner.cpp:64)
==25308==    by 0x16734A: STG::PluginManager::PluginManager(STG::SettingsImpl const&, STG::Store&, STG::AdminsImpl&, STG::TariffsImpl&, STG::ServicesImpl&, STG::CorporationsImpl&, STG::UsersImpl&, STG::TraffCounterImpl&) (plugin_mgr.cpp:85)
==25308==    by 0x112A8E: main (main.cpp:350)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions