Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Crashed #2159

Closed
niemiecki216 opened this issue Aug 15, 2023 · 9 comments
Closed

Server Crashed #2159

niemiecki216 opened this issue Aug 15, 2023 · 9 comments

Comments

@niemiecki216
Copy link

My server has been experiencing random crashes so I decided to run procdump on the process and wait until a crash is triggered. I ran the dump file produced from procdump and got the following

Unhandled exception at 0xc0000005

Running FXServer 6624 on Windows Server 2022

Link to download .dmp: https://drive.google.com/file/d/1j2n2NmNeAL7uzL_xpwOh25z47qw85pTS/view

@AvarianKnight
Copy link
Contributor

This is a bit of a weird one, somehow dataLength is overflowing. Think figuring this one out is a bit over my head sadly.

size_t dataLength = (buffer.GetLength() * 8) - buffer.GetCurrentBit();
if (dataLength == 0)
{
return;
}

@niemiecki216
Copy link
Author

niemiecki216 commented Aug 16, 2023

Is it due to too much data contained in the statebag?
And when the server crashes it immediately closes the fivem process without any message.

@gottfriedleibniz
Copy link
Contributor

gottfriedleibniz commented Aug 16, 2023

How state-bags are serialized is a bit rough, e.g., #1854 (comment). Even the edgiest of cases, e.g., key length serialized as a uint16_t but not being sanitized is worrisome.

One potential reproduction (works on my machine, YMMV):

    local BufferLimit = 131072
    local Overflow = 13

    local key = string.rep("y", BufferLimit + Overflow)
    local value = string.rep("\0", Overflow - 1)

    SetStateBagValue("global", key, value, #value, true)

@yellowcalvinn
Copy link

Hi, we are having the same problem on Linux Server. Random people crashing our server. Can we change it on linux?

@moelrobi
Copy link

Question: Is there an ETA when a new linux build will be released?

@tigerza117
Copy link

tigerza117 commented Aug 22, 2023

This is a bit of a weird one, somehow dataLength is overflowing. Think figuring this one out is a bit over my head sadly.

size_t dataLength = (buffer.GetLength() * 8) - buffer.GetCurrentBit();
if (dataLength == 0)
{
return;
}

I have a question, how to debug like that, I run dump file in vs 2022 and got error

Screenshot 2566-08-22 at 12 51 16

@AvarianKnight
Copy link
Contributor

Add the symbol server https://runtime.fivem.net/client/symbols and have the repo setup on your machine

@tigerza117
Copy link

Thanks

@AvarianKnight
Copy link
Contributor

This was fixed in #2161 and cleaned up further in #2185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants