Open delgh1 opened 1 month ago
Thank you for stress-testing my program like this. I'll see how I can fix it
I don't actually know what's causing either the deadlock or the malloc header corruption, there isn't much for me to go off of. Do you have a coredump from when the malloc header corruption happened at least? Assuming that the program is stripped, i'd guess it would be pretty unlikely
I don't actually know what's causing either the deadlock or the malloc header corruption, there isn't much for me to go off of. Do you have a coredump from when the malloc header corruption happened at least? Assuming that the program is stripped, i'd guess it would be pretty unlikely
Hmmm. I don't have a coredump (don't know how to get one). It's been ~6 hours since I restarted the service, and it's stable for now. Let's wait for now. If it happens again I will run the unstripped binary and see if I can get a coredump.
@delgh1 can you run inv_sig_helper
with RUST_BACKTRACE=full
, so that we can hope to get a nice stack trace the next time it crashes?
RUST_BACKTRACE=full
didn't provide anything useful...
But here is the log and coredump
log1.gz log2.gz core.257225.tar.gz inv_sig_helper_rust_amd64.tar.gz
I encountered similar situation after hours/several thousands of decryption , the TCP server become non responsive, I had to restart the server.
recaps from matrix: statically linked binaries seem to work without this issue.
build-deps on debian: libssl-dev, pkgconf, libzstd-dev, cargo ( >= 1.77 ) | rustup
RUSTFLAGS='-C target-feature=+crt-static -lz -lzstd' cargo build --release --target x86_64-unknown-linux-gnu
recaps from matrix: statically linked binaries seem to work without this issue.
Nope, spoke too soon. Using the static build can only reduce the frequency sig helper crashed.
Also observed a segfault on both amd64 and arm64, but no rust backtrace output even though RUST_BACKTRACE=full
:
Aug 15 21:42:13 invidious1 inv_sig_helper[2684010]: Successfully fetched player
Aug 16 10:46:09 invidious1 systemd[1]: inv_sig_helper.service: Main process exited, code=killed, status=11/SEGV
Aug 16 10:46:09 invidious1 systemd[1]: inv_sig_helper.service: Failed with result 'signal'.
Aug 16 10:46:09 invidious1 systemd[1]: inv_sig_helper.service: Consumed 6min 10.884s CPU time.
Aug 16 10:46:11 invidious1 systemd[1]: inv_sig_helper.service: Scheduled restart job, restart counter is at 1.
Aug 16 10:46:11 invidious1 systemd[1]: Stopped inv_sig_helper.service - inv_sig_helper.
on arm64 it was killed twice by 11 SIGSEGV and once by 7 SIGBUS
new core dump:
x86_64: coredump1.tar.gz inv_sig_helper_x86_64_static_glibc.tar.gz
Note: when gdb detached the process, inv_sig_helper output these lines and the process died:
malloc_consolidate(): invalid chunk size
Aborted
aarch64: coredump2.tar.gz inv_sig_helper_aarch64_static_glibc.tar.gz
Note: errh, looking at the size of the binary, I think I built it with cargo --release
when gdb detached the process, inv_sig_helper output these lines and the process died:
corrupted double-linked list (not small)
Aborted
aarch64: SIGABRT after two minutes
Aug 27 19:44:51 invidious5 inv_sig_helper[8968]: Successfully fetched player
Aug 27 19:46:43 invidious5 inv_sig_helper[8968]: malloc_consolidate(): unaligned fastbin chunk detected
Aug 27 19:46:43 invidious5 systemd[1]: inv_sig_helper.service: Main process exited, code=killed, status=6/ABRT
Aug 27 19:46:43 invidious5 systemd[1]: inv_sig_helper.service: Failed with result 'signal'.
Aug 27 19:46:43 invidious5 systemd[1]: inv_sig_helper.service: Consumed 18.524s CPU time.
per our discussion on matrix:
core.inv_sig_helper.100108.641bc88e05c44dbdade085dd786b3abc.446859.1725370540000000.reallyzst.gz
Remember to change the file extension to .zst because this crappy site doesn't allow zst files
After running for a few hours, it stops printing out logs and cause invidious "502 gateway timeout" when loading the video page. Loading things like trending, popular, thumbnails seems to be fine.
If I grep "Started" in the log, there was also a restart before:
log1.gz log2.gz
It's built using rustc 1.80 and stripped:
systemd unit
/etc/systemd/system/inv_sig_helper.service
:The setup is all manual in a LXC container, running 5 invidious processes behind nginx. invidious config:
nginx error log, just one line for example: