fivem icon indicating copy to clipboard operation
fivem copied to clipboard

CRASH SIGSEGV on latest 27938

Open luxu-gg opened this issue 7 months ago • 19 comments

What happened?

This seems to a be a recent bug introduced on newer artifacts. No crash was observed on 25770

This happening server side.

  • javascript code listens to the console output via RegisterConsoleListener(function () {});
  • A lua code triggers a client event to the server id 0 which causes the server to hang on linux and to produce a sigsegv crash on windows.

Event names are totally arbitrary.

server.lua

RegisterCommand("crash", function(source, args)
    TriggerClientEvent("random",0)
end)

server.js Commenting out RegisterConsoleListener stops the server from crashing completely.

RegisterConsoleListener(function () {});

fxmanifest.lua

lua54 'yes'
game 'gta5'
fx_version 'cerulean'

server_scripts {
    "server.js", "server.lua"
}

Expected result

Just produce a console error but not crash the server

Reproduction steps

crash.zip

  • Run a fivem server on 27938
  • Run the attached resource
  • Type crash on your txadmin console.

Importancy

Crash

Area(s)

ScRT: JS, ScRT: Lua, Natives, FiveM, FXServer

Specific version(s)

27938, 27818

Additional information

Using RegisterConsoleListener on lua logic, doesn't produce a crash.

luxu-gg avatar Apr 09 '26 19:04 luxu-gg

I am experiencing crashes right now, tried to downgrade to 27926, so far no crash, but it is early to say. Let me verify your findings on our side too.

bartusek27 avatar Apr 09 '26 19:04 bartusek27

@luxu-gg try build 27055, I suspect that it might be due to 27092's change that introduced UvLoopTimer. It seems there might not be a proper context for TickFast(). But it is just guessing, haven't tested it out yet.

bartusek27 avatar Apr 09 '26 19:04 bartusek27

We also have this crash. its a random crash.

cjosephdc avatar Apr 09 '26 21:04 cjosephdc

Sup! In Artifacts versions 27783–27938, the server crashes when a Native error occurs. I tested it, and the issue persists.

ayazwai avatar Apr 09 '26 23:04 ayazwai

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

normal88 avatar Apr 10 '26 10:04 normal88

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

prikolium-cfx avatar Apr 10 '26 10:04 prikolium-cfx

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

I will try this. im also having this random crash. thanks!

cjosephdc avatar Apr 10 '26 10:04 cjosephdc

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

I tried it, and it seems like there's no problem right now. The issue has been resolved.

ayazwai avatar Apr 10 '26 10:04 ayazwai

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

My example doesn't produce a crash on this build. I would like to test a linux build too

luxu-gg avatar Apr 10 '26 10:04 luxu-gg

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

I tested the version, and the problem has been fixed, thanks!

normal88 avatar Apr 10 '26 10:04 normal88

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

My example doesn't produce a crash on this build. I would like to test a linux build too

https://runtime.fivem.net/artifacts/fivem/build_proot_linux/feature/lua-boundary-fix/

prikolium-cfx avatar Apr 10 '26 10:04 prikolium-cfx

Yeah, I’m having the same problem here. In Artifacts versions 27783–27938, the server gets an FXCrash when a native error occurs.

Could you give it a try on this branch? https://runtime.fivem.net/artifacts/fivem/build_server_windows/feature/lua-boundary-fix

My example doesn't produce a crash on this build. I would like to test a linux build too

https://runtime.fivem.net/artifacts/fivem/build_proot_linux/feature/lua-boundary-fix/

The original example no longer produces crash but now I have another one. I haven't found the cause yet, but it seems to crash on a specific resource restart. It closes with this ║ STDERR║ Assertion failed: 0 (../deps/uv/src/unix/core.c: uv_close: 234)

luxu-gg avatar Apr 10 '26 10:04 luxu-gg

The original example no longer produces crash but now I have another one. I haven't found the cause yet, but it seems to crash on a specific resource restart. It closes with this ║ STDERR║ Assertion failed: 0 (../deps/uv/src/unix/core.c: uv_close: 234)

Did it happen before fix or do you think it's a regression?

prikolium-cfx avatar Apr 10 '26 10:04 prikolium-cfx

The original example no longer produces crash but now I have another one. I haven't found the cause yet, but it seems to crash on a specific resource restart. It closes with this ║ STDERR║ Assertion failed: 0 (../deps/uv/src/unix/core.c: uv_close: 234)

Did it happen before fix or do you think it's a regression?

Regression, I didn't experience this on other builds.

luxu-gg avatar Apr 10 '26 10:04 luxu-gg

The original example no longer produces crash but now I have another one. I haven't found the cause yet, but it seems to crash on a specific resource restart. It closes with this ║ STDERR║ Assertion failed: 0 (../deps/uv/src/unix/core.c: uv_close: 234)

Did it happen before fix or do you think it's a regression?

Regression, I didn't experience this on other builds.

Ah, no worries, we fixed this issue already, just this branch was forked before uv issue fix

prikolium-cfx avatar Apr 10 '26 11:04 prikolium-cfx

Im stilling getting random crash. Can i send you my crash dmp?

cjosephdc avatar Apr 10 '26 12:04 cjosephdc

Im stilling getting random crash. Can i send you my crash dmp?

You can send it to me in Discord.

prikolium-cfx avatar Apr 10 '26 12:04 prikolium-cfx

Im stilling getting random crash. Can i send you my crash dmp?

You can send it to me in Discord.

What is your discord? thanks! im really frustrated with this crash.

cjosephdc avatar Apr 10 '26 12:04 cjosephdc

Mentioned issue seems to fixed as of artifact 28009

luxu-gg avatar Apr 11 '26 16:04 luxu-gg