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

Application and RouDi lock files are not removed after termination #1216

Closed
elfenpiff opened this issue Mar 3, 2022 · 0 comments · Fixed by #1217
Closed

Application and RouDi lock files are not removed after termination #1216

elfenpiff opened this issue Mar 3, 2022 · 0 comments · Fixed by #1217
Assignees
Labels
bug Something isn't working
Milestone

Comments

@elfenpiff
Copy link
Contributor

elfenpiff commented Mar 3, 2022

Required information

When an application or roudi is starting a lock file is created, e.g. /tmp/iox-unique-roudi.lock. When running applications/roudi as different users or in a docker environment and the lock file remains there the applications are unable to acquire the file lock.

This ends up in the error message:

iceoryx/iceoryx_hoofs/source/posix_wrapper/file_lock.cpp:51 { iox::cxx::expected<iox::posix::FileLockError> iox::posix::FileLock::initializeFileLock() -> iox_open }  :::  [ 13 ]  Permission denied
permission to access file denied "roudi"
2022-03-03 11:49:21.858 [ Fatal ]: Error occurred while acquiring file lock named roudi
2022-03-03 11:49:21.858 [ Error ]: ICEORYX error! IPC_INTERFACE__COULD_NOT_ACQUIRE_FILE_LOCK

To solve this the FileLock posix wrapper, which creates the file in the first place in the constructor, has to also remove the file in the destructor.

Currently the file lock only closes the file descriptor but never unlocks it!

@elfenpiff elfenpiff added this to the High prio milestone Mar 3, 2022
@elfenpiff elfenpiff added the bug Something isn't working label Mar 3, 2022
@elfenpiff elfenpiff self-assigned this Mar 3, 2022
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
…platform

Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
…oves file

Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit that referenced this issue Mar 3, 2022
…emoves-file

iox-#1216 enable unlock file functionality in windows platform
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
elfenpiff added a commit to ApexAI/iceoryx that referenced this issue Mar 3, 2022
Signed-off-by: Christian Eltzschig <me@elchris.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant