eclipse-iceoryx / eclipse-iceoryx/iceoryx2

stale resource cannot be cleaned up

Open
#862 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.5k
Forks
185
Avg merge
2d 13h
Merged PRs (30d)
32

Description

The client is started as user ic-service, and the server is started as the user storage-service.
When the client starts, it will create a file under /dev/shm like:

`-rwxrwxrwx 1 ic-service ic-service 4115754 Jul 7 05:50 iox2_b9fc73e5c1f646968758453273c6c65cb372831b_79799050936982295911816235492_238042133190438879802928668923.connection
`
when it restarts, it will create another connection file. And from the server log, we can see the following:
`Jul 07 05:52:51 auto8678p164sos storage_service[2532]: 85 [E] SharedMemory { name: FileName { value: FixedSizeByteString<255> { len: 117, data: "iox2_b9fc73e5c1f646968758453273c6c65cb372831b_247057671590986298025039640638_79799050936982295911816235492.connection" } }, size: 13090, base_address: 0x7f9db33000, has_ownership: true, file_descriptor: FileDescriptor { value: 66, is_owned: true }, memory_lock: None }
Jul 07 05:52:51 auto8678p164sos storage_service[2532]: | Failed to cleanup shared memory since the permissions could not be adjusted (InsufficientPermissions).
`
the server do not have permission to remove the stale resource, because the shm folder has the sticky bit and only root and the file owner can remove it.
`drwxrwxrwt 2 root root 8080 Jul 7 05:56 shm`

the result is that there are more and more files under /dev/shm/:

Image

we cannot use root or the same user for all processes because it is insecure. do you have any suggestion?
thanks a lot!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.