Globbing crashing server on Linux

Server artifact 3306
Windows version? Ubuntu 20.04 with Docker 19.03.13
Did you try to delete caches.xml and try again? Yes (recreated the docker container)
System specifications Ryzen 3800 PRO on Ubuntu 20.04, server running in Docker
What did you do to get this issue?

  1. Apply globbing (current and subdir so double star)
  2. Make sure the cache is cleared before hand.
  3. Sometimes it crashes sometimes it doesn’t, but as long as the cache is cleared there’s a 1/2 chance it crashes.

What server did you get this issue on? My own (Local dev server and dev server, couldn’t replicate it on Windows)
CitizenFX crash zip file 5e505ee1-02d7-4ff6-068ecd85-b357d38e.zip (94.8 KB)
CitizenFX.log file
Last few lines of log file (gcphone is the resource I added globbing to):


Creating script environments for afkkick
Started resource afkkick
Creating script environments for gcphone
terminate called after throwing an instance of 'std::length_error'
  what():  vector::_M_default_append
sync thread hitch warning: timer interval of 123 milliseconds


=================================================================
FXServer crashed.
A dump can be found at /opt/cfx-server/crashes/1f5581b5-d869-44cb-b71ef991-806acba5.dmp.
Crash report ID: 75e80d42-209d-4160-833f-6500f0894e2d
=================================================================
Aborted (core dumped)

.dmp files/report IDs 75e80d42-209d-4160-833f-6500f0894e2d

The crash only happens on Linux, haven’t been able to replicate it on Windows whatsoever.

I use the following file to start the docker container: startupdocker.sh (1.5 KB)

I use the image from hellslicer and manually copy in the most recent proot files (since the builds stopped a while ago)

Do you have a sample resource/patch that breaks?

Sure do: gcphone.zip (2.1 MB)

Also how would I go about debugging the Linux dump files?

Visual Studio appears to somewhat load the dump files but refuses to load the binaries and WinDBG just straight out refuses to load the files, same goes for gdb.

Sorry it took so long to get back to this issue - do you recall what entries you changed to use globbing? The example does not seem to use any. :confused:

Oh I’m sorry about that, must’ve uploaded the wrong file.
I just checked it and using the following in the files entry crashes the server:

files {
    'html/**'
}

It starts and instantly crashes again, it sporadically does start up but when it does the resource doesn’t work (the client_scripts do but the ui files are missing)

Looks like the same issue I’ve reported here (there’s a reproduction resource in the topic)

Manifestation of issue there looks different, a duplicate entry being added.

However, in both cases it appears directories are being treated as having been files. Likely incorrect opendir/readdir/stat usage in PlatformDevice.Posix.cpp.

… or worse, incorrect struct stat definition being used?