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

Crashes when running exported game in the MicroK8s Kubernetes environment #102385

Open
nongvantinh opened this issue Feb 4, 2025 · 1 comment

Comments

@nongvantinh
Copy link
Contributor

Tested versions

  • Reproducible in Godot Engine v4.3.stable.mono.official (77dcf97)
  • Reproducible in Godot Engine v4.4.beta2.mono.official (a013481)

System information

Ubuntu 24.04 docker image

Issue description

When exporting my server to run in a Kubernetes environment, it crashes for various reasons depending on the version of Godot I am using.

For Godot 4.3 Mono, I get this error when importing project using my Ubuntu 24.04 development machine:

ubuntu@ubuntu:~/GodotProjects/azheir$ /home/ubuntu/GodotProjects/azheir/misc/dependencies/godot_executable/Godot_v4.3-stable_mono_linux_x86_64/Godot_v4.3-stable_mono_linux.x86_64 . --headless -e --import
Godot Engine v4.3.stable.mono.official.77dcf97d8 - https://godotengine.org


================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.mono.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.12/libcoreclr.so(+0x6068bc) [0x7318f20068bc] (??:0)
[2] /usr/lib/dotnet/shared/Microsoft.NETCore.App/8.0.12/libcoreclr.so(+0x605ef5) [0x7318f2005ef5] (??:0)
[3] /lib/x86_64-linux-gnu/libc.so.6(+0x45320) [0x731900a45320] (??:0)
[4] /home/ubuntu/GodotProjects/azheir/misc/dependencies/godot_executable/Godot_v4.3-stable_mono_linux_x86_64/Godot_v4.3-stable_mono_linux.x86_64() [0x5330f1] (??:0)
[5] /home/ubuntu/GodotProjects/azheir/misc/dependencies/godot_executable/Godot_v4.3-stable_mono_linux_x86_64/Godot_v4.3-stable_mono_linux.x86_64() [0x4207bd] (??:0)
[6] /lib/x86_64-linux-gnu/libc.so.6(+0x2a1ca) [0x731900a2a1ca] (??:0)
[7] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x8b) [0x731900a2a28b] (??:0)
[8] /home/ubuntu/GodotProjects/azheir/misc/dependencies/godot_executable/Godot_v4.3-stable_mono_linux_x86_64/Godot_v4.3-stable_mono_linux.x86_64() [0x43e4da] (??:0)
-- END OF BACKTRACE --
================================================================
Aborted (core dumped)

I had to compile the engine from dev-7. However, when running the app I got this error:

ubuntu@ubuntu:~/GodotProjects/azheir$ kubectl logs azheir-game-server-2b66g-zrf8b azheir-game-server -f
Godot Engine v4.4.dev-7.mono.custom_build.fb23c96d6 - https://godotengine.org

WARNING: A Thread object is being destroyed without its completion having been realized.
Please call wait_to_finish() on it to ensure correct cleanup.
     at: ~Thread (core/os/thread.cpp:105)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.dev-7.mono.custom_build (fb23c96d6ea39d0b75d619620d0d4aa7bcbc392e)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
ERROR: FATAL: Index p_index = 1 is out of bounds (size() = 0).
   at: get (./core/templates/cowdata.h:219)

For Godot 4.4 beta 2 Mono, I get this error when running the app:

ubuntu@ubuntu:~/GodotProjects/azheir$ kubectl logs azheir-game-server-hqhcx-xgh9v azheir-game-server -f
Godot Engine v4.4.beta2.mono.official.a013481b0 - https://godotengine.org

ERROR: BUG: Unreferenced static string to 0: servers
   at: unref (core/string/string_name.cpp:142)
WARNING: A Thread object is being destroyed without its completion having been realized.
Please call wait_to_finish() on it to ensure correct cleanup.
     at: ~Thread (core/os/thread.cpp:105)
ERROR: 7 RID allocations of type '23NavMeshGeometryParser2D' were leaked at exit.
ERROR: 6 RID allocations of type '23NavMeshGeometryParser3D' were leaked at exit.
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: current_animation_changed
   at: unref (core/string/string_name.cpp:142)
ERROR: BUG: Unreferenced static string to 0: autoshrink_changed
   at: unref (core/string/string_name.cpp:142)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:144)
ERROR: BUG: Unreferenced static string to 0: size_changed
   at: unref (core/string/string_name.cpp:144)
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (scene/main/node.cpp:2523)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.beta2.mono.official (a013481b0911e59cc3f3dea7ebb732450c3e1460)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
ERROR: FATAL: Index p_index = 1 is out of bounds (size() = 0).
   at: get (./core/templates/cowdata.h:219)

I’m not sure why there is this discrepancy, but when I run the Docker image directly, no crash occurs.

ubuntu@ubuntu:~/GodotProjects/azheir$ docker run -d --name azheir-runtime-container azheir-runtime:latest
904665f698394550ced5b4712981b09e9e40d89896f6727b9040256b20965527

ubuntu@ubuntu:~/GodotProjects/azheir$ docker logs azheir-runtime-container -f
Godot Engine v4.4.beta2.mono.official.a013481b0 - https://godotengine.org

^Ccontext canceled
ubuntu@ubuntu:~/GodotProjects/azheir$ 

If you need any information, please leave a comment or any suggestion to debug it. Please let me know!

Steps to reproduce

I simply export my app and run it in the MicroK8s environment. The game server must be created using the Fleet resource from Agones.

Here is the full agones-game-server.yaml file:

apiVersion: agones.dev/v1
kind: Fleet
metadata:
  name: azheir-game-server
spec:
  replicas: 2
  template:
    spec:
      ports:
        - name: default
          portPolicy: Dynamic
          containerPort: 7654
      template:
        spec:
          containers:
            - name: azheir-game-server
              image: "{{ .Values.gameserver.image }}"
              resources:
                requests:
                  memory: 64Mi
                  cpu: 20m
                limits:
                  memory: 64Mi
                  cpu: 20m
---

### Minimal reproduction project (MRP)

An empty Godot project will produce this error in the MicroK8s Kubernetes environment.
@nongvantinh
Copy link
Contributor Author

nongvantinh commented Feb 4, 2025

I have created an empty project and export, then deploy it to Kubernetes and the same error happen.

ubuntu@ubuntu:~/GodotProjects/azheir$ docker run -d --name azheir-runtime-container localhost:32000/azheir-runtime:latest
d4f398219c27082cd09c3550fa6ad318d094f853529ff98f52a07607d0c36bba
ubuntu@ubuntu:~/GodotProjects/azheir$ docker logs azheir-runtime-container -f
Godot Engine v4.4.beta2.mono.official.a013481b0 - https://godotengine.org

Hello world
^Ccontext canceled
ubuntu@ubuntu:~/GodotProjects/azheir$ docker rm -f azheir-runtime-container 
azheir-runtime-container
ubuntu@ubuntu:~/GodotProjects/azheir$ python3 misc/deploy.py --install
NAME: azheir
LAST DEPLOYED: Tue Feb  4 18:43:32 2025
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
ubuntu@ubuntu:~/GodotProjects/azheir$ kubectl get pods
NAME                                               READY   STATUS              RESTARTS   AGE
azheir-cassandra-0                                 1/1     Running             0          7s
azheir-elasticsearch-0                             1/1     Running             0          7s
azheir-game-server-x27sq-8t4bp                     0/2     ContainerCreating   0          6s
azheir-game-server-x27sq-h6v5p                     0/2     ContainerCreating   0          6s
azheir-janusgraph-7f84d455cd-dvjjm                 1/1     Running             0          7s
azheir-matchmaker-director-8d5fbb467-72dld         1/1     Running             0          7s
azheir-matchmaker-evaluator-766567d57f-cfjtp       1/1     Running             0          7s
azheir-matchmaker-gamefrontend-66d9995b89-l2vjw    1/1     Running             0          7s
azheir-matchmaker-matchfunction-68fb8b5cd9-8x7fg   1/1     Running             0          7s
signalr-redis-sentinel-node-0                      2/2     Running             0          13m
signalr-redis-sentinel-node-1                      2/2     Running             0          13m
signalr-redis-sentinel-node-2                      2/2     Running             0          13m
ubuntu@ubuntu:~/GodotProjects/azheir$ kubectl logs -f azheir-game-server-x27sq-8t4bp azheir-game-server
Godot Engine v4.4.beta2.mono.official.a013481b0 - https://godotengine.org

Hello world
ERROR: BUG: Unreferenced static string to 0: servers
   at: unref (core/string/string_name.cpp:142)
ERROR: BUG: Unreferenced static string to 0: _enter_world
   at: unref (core/string/string_name.cpp:142)
WARNING: A Thread object is being destroyed without its completion having been realized.
Please call wait_to_finish() on it to ensure correct cleanup.
     at: ~Thread (core/os/thread.cpp:105)
ERROR: 7 RID allocations of type '23NavMeshGeometryParser2D' were leaked at exit.
ERROR: 6 RID allocations of type '23NavMeshGeometryParser3D' were leaked at exit.
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketLargeE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools12BucketMediumE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: Pages in use exist at exit in PagedAllocator: N7Variant5Pools11BucketSmallE
   at: ~PagedAllocator (./core/templates/paged_allocator.h:170)
ERROR: BUG: Unreferenced static string to 0: current_animation_changed
   at: unref (core/string/string_name.cpp:142)
ERROR: Caller thread can't call this function in this node (/root). Use call_deferred() or call_thread_group() instead.
   at: propagate_notification (scene/main/node.cpp:2523)

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.4.beta2.mono.official (a013481b0911e59cc3f3dea7ebb732450c3e1460)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
ERROR: BUG: Unreferenced static string to 0: autoshrink_changed
   at: unref (core/string/string_name.cpp:142)
ERROR: BUG: Unreferenced static string to 0: interface_added
   at: unref (core/string/string_name.cpp:144)
ERROR: BUG: Unreferenced static string to 0: size_changed
   at: unref (core/string/string_name.cpp:144)
ERROR: BUG: Unreferenced static string to 0: SceneReplicationInterface
   at: unref (core/string/string_name.cpp:144)
ERROR: FATAL: Index p_index = 1 is out of bounds (size() = 0).
   at: get (./core/templates/cowdata.h:219)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: For team assessment
Development

No branches or pull requests

2 participants