carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.09k stars 3.57k forks source link

The headless server cannot run carla normally using turbovnc+virtualgl #6811

Open wheltz opened 11 months ago

wheltz commented 11 months ago

Hello, thank you for your contribution to Carla. I'm currently using carla0.9.10.1 through turbovnc3.0 and virtualgl3.1 on a headless linux server (ubuntu20.04, Nvidia-470), and I use opengl mesa programs such as glxgears and it behaves normally. But when I use vglrun -d :1.0 ./CarlaUE4.sh -carla-rpc-port=2000 -opengl3 -quality-level=Low, I get a black window and then after about 1 minute, he crashes and outputs

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
LowLevelFatalError [File:Unknown] [Line: 1155]
GameThread timed out waiting for RenderThread after 60.00 secs
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=161312 LargeMemoryPoolOffset=292448
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

sometimes it will output "CarlaUE4-Linux-Shipping" is not responding, followed by the same crash. My OpenGL version is OpenGL version string: 4.5 (Compatibility Profile) Mesa 23.2.1 - kisak-mesa PPA, I also tried -opengl4 and -opengl, the results are the same. Other off-screen commands such as SDL_VIDEODRIVER=offscreen SDL_HINT_CUDA_DEVICE=0 ./CarlaUE4.sh will output

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=128368 LargeMemoryPoolOffset=259504
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Malloc Size=65535 LargeMemoryPoolOffset=131119
Malloc Size=115872 LargeMemoryPoolOffset=247008
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

The command DISPLAY= CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES=0 ./CarlaUE4.sh -opengl also crashes and the output is

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps

My carla is installed through InterFuser's script (when I use xserver to access the remote server, the carla window can be displayed normally, but the screen will be broken and the delay is too high, so the carla installation method does not seem to be the main problem):

#!/usr/bin/env bash

# Download and install CARLA
mkdir carla
cd carla
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/CARLA_0.9.10.1.tar.gz
wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/AdditionalMaps_0.9.10.1.tar.gz
tar -xf CARLA_0.9.10.1.tar.gz
tar -xf AdditionalMaps_0.9.10.1.tar.gz
rm CARLA_0.9.10.1.tar.gz
rm AdditionalMaps_0.9.10.1.tar.gz
cd..

Anyone willing to share insights would be greatly appreciated.

min99830 commented 6 months ago

In my case, updating nvidia driver is work.