Bugzilla – Bug 4699
be more robust against failing to remove session directories
Last modified: 2015-09-25 14:01:32
You need to
before you can comment on or make changes to this bug.
We cannot be 100% certain that we will be able to remove an old session
directory (#.ended). If we fail to remove the old one, then tl-session will in
turn fail to rename the current session to #.ended.
We can avoid the breakage if we rename the #.ended directory before we start to
remove it. E.g. #.cleanup.XXXXXX. It is important that there are some random
characters in the name in case this happens multiple times.
Note that this still means that crud will be left on disk for the administrator
to deal with. That is the case today as well though, just that we generally get
more breakage in ThinLinc when we fail to move directories out of the way like
At the same time, we might want to have a look at the cleanup routine to make
it more robust against files that cannot be removed. E.g. it shouldn't abort on
the first file that fails, but continue and remove as many as possible.
We should also log failures better/more.
This won't work as the user cannot rename those directories (for security
Changing summary to something more generic.
(In reply to comment #0)
> At the same time, we might want to have a look at the cleanup routine to make
> it more robust against files that cannot be removed. E.g. it shouldn't abort on
> the first file that fails, but continue and remove as many as possible.
This is being done on bug 5110.
A different idea is to stop using the simple <display>.ended naming. We could
do <display>.<time>.ended. A slightly longer and more confusing name, but the
risk of conflicting names is basically zero.
Fixed in r30659.
Tester should put an unremovable file/dir in a session directory and make sure
the system gracefully works around that directory.
(In reply to comment #4)
> Fixed in r30659.
> Tester should put an unremovable file/dir in a session directory and make sure
> the system gracefully works around that directory.
Reproduced issue using ThinLinc 4.4.0, and verified that the problem is solved
using build 4857.