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 error when creating multiple worlds. “Failed to find symbol file, expected location”. Potential memory leak? #6122

Open
MoritzNekolla opened this issue Jan 17, 2023 · 1 comment
Labels
stale Issue has not had recent activity

Comments

@MoritzNekolla
Copy link

MoritzNekolla commented Jan 17, 2023

CARLA version: 0.9.13
Platform/OS: Linux

Error is on server-side
Error-Message:

Signal 11 caught.
Malloc Size=65538 LargeMemoryPoolOffset=65554
CommonUnixCrashHandler: Signal=11
Failed to find symbol file, expected location:
"/opt/carla-simulator/CarlaUE4/Binaries/Linux/CarlaUE4-Linux-Shipping.sym"
Engine crash handling finished; re-raising signal 11 for the default handler. Good bye.
Segmentation fault (core dumped)

I run carla server side by:

./CarlaUE4.sh -RenderOffScreen -opengl --carla-world-port=2200

Minimal code:

import glob
import os
import sys
import numpy as np
import time

# ==============================================================================
# -- Find CARLA module ---------------------------------------------------------
# ==============================================================================
try:
    sys.path.append(glob.glob('../carla/dist/carla-*%d.%d-%s.egg' % (
        sys.version_info.major,
        sys.version_info.minor,
        'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0])
except IndexError:
    pass

# ==============================================================================
# -- Add PythonAPI for release mode --------------------------------------------
# ==============================================================================
try:
    sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + '/carla')
except IndexError:
    pass

import carla

class Environment:

    def __init__(self, world='Town01_Opt', host='localhost', port=2200):
        self.client = carla.Client(host, port)            #Connect to server
        self.client.set_timeout(30.0)
        self.world = self.client.load_world(world)

    def __del__(self):
        if self.client:
            del self.client
        if self.world:
            del self.world
        print("__del__ called")

if __name__ == "__main__":
    for x in range(0,20000):
        env = Environment(world="Town01_Opt", port=2200, host="localhost")
        time.sleep(1)  # let the env render for a second 
        print(f"world {x}")

The code creates and destroys a world multiple times.
After around ~120 worlds, the server crashes with the error above, although each world is destroyed before creating a new one.

This is a condensed version of this.
Might also be relevant for this.

Update:
Found similar (unsolved) problem here

@stale
Copy link

stale bot commented Jun 1, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue has not had recent activity label Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue has not had recent activity
Projects
None yet
Development

No branches or pull requests

1 participant