uniba-swt / swtbahn-cli

A client-server command line interface for the SWTbahn.
GNU General Public License v3.0
7 stars 3 forks source link

Interlocking Container sometimes not released #46

Closed BLuedtke closed 2 years ago

BLuedtke commented 2 years ago

When shutting down via the admin endpoint, the interlocking container is not released in some cases, potentially causing a segmentation fault on the next startup. Missing in the log:

server: interlockerInstance0: Released container

BLuedtke commented 2 years ago

When server: interlockerInstance0: Released container is missing from the shutdown log, we noticed that server: Request: stop is not being logged either.

Edit: Disregard.

eyip002 commented 2 years ago

Interlocker instance may already have been unset before a shutdown is issued.

Or, on line 946 in dyn_containers.forec: while (!interlockerInstanceData[instance].terminated) might not be terminating

BLuedtke commented 2 years ago

As it occured when running tests with fMBT - I noticed that I didn't always release the train in the test-exit adapter. This is only occuring in test cases where the train had to be driven back to the start position, i.e. usually the last test case that is executed.

If I recall correctly, the segmentation fault came up after earlier test cases too. And shutdown() was always called when needed, which should (forcefully) free the open train grab. So I don't think that's the cause, but I'll add the release() call; if the issue is gone after that, it might have been relevant.