hoytech / strfry

a nostr relay
GNU General Public License v3.0
496 stars 98 forks source link

SIGTERM #108

Open v0l opened 6 months ago

v0l commented 6 months ago
2024-05-08 13:38:38.465 ( 279.210s) [Ingester 2      ]INFO| sending error to [605]: bad req: std::get: wrong index for variant

Loguru caught a signal: SIGTERM
Stack trace:
10      0x559d2cc8f5f1 /app/strfry(+0x2e5f1) [0x559d2cc8f5f1]
9       0x7fcb744e1305 __libc_start_main + 133
8       0x7fcb744e124a /lib/x86_64-linux-gnu/libc.so.6(+0x2724a) [0x7fcb744e124a]
7       0x559d2cc8f06b /app/strfry(+0x2e06b) [0x559d2cc8f06b]
6       0x559d2ccadb91 /app/strfry(+0x4cb91) [0x559d2ccadb91]
5       0x559d2cf4f0e2 /app/strfry(+0x2ee0e2) [0x559d2cf4f0e2]
4       0x559d2cf4eb4c /app/strfry(+0x2edb4c) [0x559d2cf4eb4c]
3       0x7fcb7486e517 std::thread::join() + 23
2       0x7fcb74544c23 /lib/x86_64-linux-gnu/libc.so.6(+0x8ac23) [0x7fcb74544c23]
1       0x7fcb7453fe96 /lib/x86_64-linux-gnu/libc.so.6(+0x85e96) [0x7fcb7453fe96]
0       0x7fcb744f6050 /lib/x86_64-linux-gnu/libc.so.6(+0x3c050) [0x7fcb744f6050]
2024-05-08 13:38:38.529 ( 279.274s) [main thread     ]FATL| Signal: SIGTERM
hoytech commented 3 months ago

Definitely looks like some kind of a bug. What version of strfry were you running? Is it reproducible?

I know a lot of time has passed, but if you still have that strfry executable around, can you put that stacktrace in a file STACKTRACE and run the following command?

addr2line -Cf -e ./strfry `cat STACKTRACE | perl -ne 'm{/strfry\(\+(\w+)\)} && print "$1 "'`
v0l commented 3 months ago

Yes it still seems to be an issue: image

Running: https://github.com/v0l/strfry/tree/nextneg

_start
??:?
main
/build/strfry/build/main.cpp:215
run(int, char**)
/build/strfry/build/main.cpp:182
cmd_relay(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)
/build/strfry/src/apps/relay/cmd_relay.cpp:27
ThreadPool<MsgWebsocket>::join()
/build/strfry/src/ThreadPool.h:57
hoytech commented 3 months ago

I'm not really sure what's happening here. It should only be getting a SIGTERM from external source, like systemd trying to shut it down.

Are all the backtraces the same? Are they always preceded by that bad req: std::get: wrong index for variant message? That error should be harmless: Somebody sent a malformed REQ.

Are there any other configurations that make it different from non-crashing instances?

Thanks!