You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2022. It is now read-only.
It crashes in main() while trying to call ld_critical("Unable to instantiate ServerParameters. Exiting."). It appears that the stats subsystem is not yet initialized at that point. It's no big deal for production installations, but will surely look lame to people who are new to LD. Not sure if already fixed on trunk.
Stack trace:
Reading symbols from bin/logdeviced...done.
(gdb) r
Starting program: /home/march/LogDevice/_build/Debug/bin/logdeviced
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
I1024 14:15:11.435629 16116 [logdeviced-main] main.cpp:403] main() Command line arguments:
I1024 14:15:11.435717 16116 [logdeviced-main] main.cpp:407] main() Plugins loaded: {"PrincipalParser factory":"built-in","ZookeeperClient factory":"built-in","ConfigSource factory":["built-in"],"PermissionChecker factory":"built-in","Build Info":"built-in","Plugin provider":["Built-in plugin provider","Dynamic plugin loader","Static plug-in loader"]}
I1024 14:15:11.435722 16116 [logdeviced-main] main.cpp:409] main() server starting
I1024 14:15:11.435726 16116 [logdeviced-main] main.cpp:414] main() version 2.46.5
I1024 14:15:11.435731 16116 [logdeviced-main] main.cpp:424] main() asserts on (NDEBUG not set)
I1024 14:15:11.437147 16116 [logdeviced-main] TextConfigUpdater.cpp:59] fetchFromSource() Requesting main config "" (source: file)
E1024 14:15:11.437158 16116 [logdeviced-main] FileConfigSource.cpp:129] stat_mtime() stat() on config file "" failed. errno=2 (No such file or directory)
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff372d801 in __GI_abort () at abort.c:79 #2 0x00007ffff4120957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #3 0x00007ffff4126ab6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #4 0x00007ffff4126af1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #5 0x00007ffff4126d24 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #6 0x00007ffff414f3f2 in std::__throw_bad_function_call() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 #7 0x000055555984f935 in std::function<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer* ()>::operator()() const (this=0x7ffff0599018) at /usr/include/c++/8/bits/std_function.h:686 #8 0x000055555984d6ce in folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::makeTlp (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:99 #9 0x0000555559849772 in folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::get (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:69 #10 folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::operator* (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:77 #11 0x0000555559848bae in facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::get (
this=0x7ffff0599010) at /home/march/LogDevice/logdevice/../logdevice/common/UpdateableSharedPtr.h:111 #12 0x000055555a7ea5aa in facebook::logdevice::Stats::Stats (this=0x7ffff0599000, params=0x7ffff0599010)
at /home/march/LogDevice/logdevice/common/stats/Stats.cpp:255 #13 0x00005555590a12d1 in facebook::logdevice::StatsHolder::StatsWrapper::StatsWrapper (this=0x7ffff0599000,
owner=0x7ffff0599010) at /home/march/LogDevice/logdevice/../logdevice/common/stats/Stats.h:923 #14 0x00005555590a1376 in facebook::logdevice::StatsHolder::get (this=0x7ffff0599010)
at /home/march/LogDevice/logdevice/../logdevice/common/stats/Stats.h:935 #15 0x000055555908b7fe in facebook::logdevice::bumpErrorCounter (level=facebook::logdevice::dbg::Level::CRITICAL)
at /home/march/LogDevice/logdevice/server/Server.cpp:86 #16 0x000055555903b5d7 in facebook::logdevice::dbg::noteError (level=facebook::logdevice::dbg::Level::CRITICAL)
at /home/march/LogDevice/logdevice/../logdevice/common/debug.h:127 #17 0x00005555590392f5 in main (argc=1, argv=0x7fffffffe018)
at /home/march/LogDevice/logdevice/server/main.cpp:440
(gdb)
The text was updated successfully, but these errors were encountered:
…bookarchive#133
Summary: If an exception happens during the initialization of ServerParmeters, we do an ld_critical which invokes bumpErrorCounter that uses the StatsHolder of the server, but the Server is not there anymore so we crash. This case is mostly handled in the destructor of ServerParameters but it doesn't get called because of the exception. This diff does the init logic in an init() function instead of the constructor.
Differential Revision: D18138159
fbshipit-source-id: 042173089295be4ae566f821d784c2d0c4cff187
It crashes in main() while trying to call ld_critical("Unable to instantiate ServerParameters. Exiting."). It appears that the stats subsystem is not yet initialized at that point. It's no big deal for production installations, but will surely look lame to people who are new to LD. Not sure if already fixed on trunk.
Stack trace:
Reading symbols from bin/logdeviced...done.
(gdb) r
Starting program: /home/march/LogDevice/_build/Debug/bin/logdeviced
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
I1024 14:15:11.435629 16116 [logdeviced-main] main.cpp:403] main() Command line arguments:
I1024 14:15:11.435717 16116 [logdeviced-main] main.cpp:407] main() Plugins loaded: {"PrincipalParser factory":"built-in","ZookeeperClient factory":"built-in","ConfigSource factory":["built-in"],"PermissionChecker factory":"built-in","Build Info":"built-in","Plugin provider":["Built-in plugin provider","Dynamic plugin loader","Static plug-in loader"]}
I1024 14:15:11.435722 16116 [logdeviced-main] main.cpp:409] main() server starting
I1024 14:15:11.435726 16116 [logdeviced-main] main.cpp:414] main() version 2.46.5
I1024 14:15:11.435731 16116 [logdeviced-main] main.cpp:424] main() asserts on (NDEBUG not set)
I1024 14:15:11.437147 16116 [logdeviced-main] TextConfigUpdater.cpp:59] fetchFromSource() Requesting main config "" (source: file)
E1024 14:15:11.437158 16116 [logdeviced-main] FileConfigSource.cpp:129] stat_mtime() stat() on config file "" failed. errno=2 (No such file or directory)
terminate called after throwing an instance of 'std::bad_function_call'
what(): bad_function_call
Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1 0x00007ffff372d801 in __GI_abort () at abort.c:79
#2 0x00007ffff4120957 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff4126ab6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff4126af1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff4126d24 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff414f3f2 in std::__throw_bad_function_call() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x000055555984f935 in std::function<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer* ()>::operator()() const (this=0x7ffff0599018) at /usr/include/c++/8/bits/std_function.h:686
#8 0x000055555984d6ce in folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::makeTlp (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:99
#9 0x0000555559849772 in folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::get (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:69
#10 folly::ThreadLocal<facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::VersionedPointer, void, void>::operator* (this=0x7ffff0599010)
at /home/march/LogDevice/_build/Debug/staging/usr/local/include/folly/ThreadLocal.h:77
#11 0x0000555559848bae in facebook::logdevice::FastUpdateableSharedPtrfacebook::logdevice::StatsParams::get (
this=0x7ffff0599010) at /home/march/LogDevice/logdevice/../logdevice/common/UpdateableSharedPtr.h:111
#12 0x000055555a7ea5aa in facebook::logdevice::Stats::Stats (this=0x7ffff0599000, params=0x7ffff0599010)
at /home/march/LogDevice/logdevice/common/stats/Stats.cpp:255
#13 0x00005555590a12d1 in facebook::logdevice::StatsHolder::StatsWrapper::StatsWrapper (this=0x7ffff0599000,
owner=0x7ffff0599010) at /home/march/LogDevice/logdevice/../logdevice/common/stats/Stats.h:923
#14 0x00005555590a1376 in facebook::logdevice::StatsHolder::get (this=0x7ffff0599010)
at /home/march/LogDevice/logdevice/../logdevice/common/stats/Stats.h:935
#15 0x000055555908b7fe in facebook::logdevice::bumpErrorCounter (level=facebook::logdevice::dbg::Level::CRITICAL)
at /home/march/LogDevice/logdevice/server/Server.cpp:86
#16 0x000055555903b5d7 in facebook::logdevice::dbg::noteError (level=facebook::logdevice::dbg::Level::CRITICAL)
at /home/march/LogDevice/logdevice/../logdevice/common/debug.h:127
#17 0x00005555590392f5 in main (argc=1, argv=0x7fffffffe018)
at /home/march/LogDevice/logdevice/server/main.cpp:440
(gdb)
The text was updated successfully, but these errors were encountered: