ddnet icon indicating copy to clipboard operation
ddnet copied to clipboard

Clang-san CI randomly fails with segmentation fault when using ubuntu-latest

Open Robyt3 opened this issue 1 year ago • 5 comments

Has happened independently and randomly with server, client and tests only in the clang-san CI over the last few days.

[*] Setup
[*] Launch server
./integration_test.sh: line 194:  6318 Segmentation fault      (core dumped) $tool ../DDNet-Server "sv_input_fifo server.fifo;
	sv_rcon_password rcon;
	sv_map coverage;
	sv_sqlite_file ddnet-server.sqlite;
	logfile server.log;
	sv_register 0;
	sv_port $port" > stdout_server.txt 2> stderr_server.txt
tail: cannot open 'server.log' for reading: No such file or directory
[-] server exited with code 139
[-] Error: server possibly crashed on launch
[*] Shutting down client1
[*] Shutting down client2

Robyt3 avatar Mar 15 '24 17:03 Robyt3

Seems to happen very consistently now.

Robyt3 avatar Mar 15 '24 17:03 Robyt3

It seems like the server fails before creating the server.log file

archimede67 avatar Mar 15 '24 18:03 archimede67

I can't reproduce the issue locally on Arch. Maybe related to CI running with older libs?

def- avatar Mar 16 '24 07:03 def-

I tried getting a backtrace by running server and client with gdb in the clang-san CI but that seems to prevent the issue from happening. Or disabling leak sanitizer had some effect on this, which I needed to do to because it's incompatible with gdb.

In this run server and client ran successfully 10 times in gdb and then the testrunner immediately failed. I had that happen multiple times already, but whether server, client or testrunner crashes is random.

My changes for testing: https://github.com/Robyt3/ddnet/tree/CI-Integration-Test-Segfault

Robyt3 avatar Mar 16 '24 10:03 Robyt3

Thanks for trying. I have two attempts too to make CI green again at least: https://github.com/ddnet/ddnet/pull/8108 & https://github.com/ddnet/ddnet/pull/8109

def- avatar Mar 16 '24 11:03 def-