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

Jail cleanup issue. #9976

Open
mmeeks opened this issue Sep 4, 2024 · 2 comments
Open

Jail cleanup issue. #9976

mmeeks opened this issue Sep 4, 2024 · 2 comments
Assignees
Labels
bug Something isn't working unconfirmed

Comments

@mmeeks
Copy link
Contributor

mmeeks commented Sep 4, 2024

Share profile as of now:

image

6% of server time in that statting - which seems amazing; perhaps there is some explosion of crashing kits or something - is it possible that: if (time(nullptr) < modifiedTimeSec + 180)
continue;
doens't work - and we build a huge list of crashed kits - but the; kits should not crash on share much - a tad perplexed by that =)
ls /opt/cool/child-roots/873022-20fbac79/ | wc -l
742
interesting.
vs. 64 coolforkit processes

It looks like we are leaking jails.

@mmeeks mmeeks added bug Something isn't working unconfirmed labels Sep 4, 2024
@mmeeks
Copy link
Contributor Author

mmeeks commented Sep 4, 2024

[pid 873027] 1725454042.765797 stat("/opt/cool/child-roots/873022-20fbac79/KU7MORiIpumls3Mj/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.765960 stat("/opt/cool/child-roots/873022-20fbac79/KU7MORiIpumls3Mj", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid 873027] 1725454042.766126 stat("/opt/cool/child-roots/873022-20fbac79/BgfQpsFZYYNfGSyX/tmp/kit-crashed", 0x7ffccb26c4a8) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.766289 stat("/opt/cool/child-roots/873022-20fbac79/BgfQpsFZYYNfGSyX/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.766450 stat("/opt/cool/child-roots/873022-20fbac79/BgfQpsFZYYNfGSyX", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid 873027] 1725454042.766633 stat("/opt/cool/child-roots/873022-20fbac79/ORnuzrj6prc8Ei9P/tmp/kit-crashed", 0x7ffccb26c4a8) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.766821 stat("/opt/cool/child-roots/873022-20fbac79/ORnuzrj6prc8Ei9P/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.766996 stat("/opt/cool/child-roots/873022-20fbac79/ORnuzrj6prc8Ei9P", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid 873027] 1725454042.767188 stat("/opt/cool/child-roots/873022-20fbac79/gg9lFWFJbt8ZauWK/tmp/kit-crashed", 0x7ffccb26c4a8) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.767375 stat("/opt/cool/child-roots/873022-20fbac79/gg9lFWFJbt8ZauWK/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.767556 stat("/opt/cool/child-roots/873022-20fbac79/gg9lFWFJbt8ZauWK", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid 873027] 1725454042.767743 stat("/opt/cool/child-roots/873022-20fbac79/uVWT42GaSOTUuaEw/tmp/kit-crashed", 0x7ffccb26c4a8) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.767948 stat("/opt/cool/child-roots/873022-20fbac79/uVWT42GaSOTUuaEw/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.768145 stat("/opt/cool/child-roots/873022-20fbac79/uVWT42GaSOTUuaEw", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
[pid 873027] 1725454042.768334 stat("/opt/cool/child-roots/873022-20fbac79/nDj3qUW5r9sZ7awK/tmp/kit-crashed", 0x7ffccb26c4a8) = -1 ENOENT (No such file or directory)
[pid 873027] 1725454042.768514 stat("/opt/cool/child-roots/873022-20fbac79/nDj3qUW5r9sZ7awK/lo", 0x7ffccb26be68) = -1 ENOENT (No such file or directory)

To take an example:

ls -ld QJ*
drwx------ 2 cool cool 4096 Aug 30 08:18 QJ90EiwQaou8PdUX

So - that should be cleaned; it contains:

ls -alR QJ90EiwQaou8PdUX/
QJ90EiwQaou8PdUX/:
total 40
drwx------ 2 cool cool 4096 Aug 30 08:18 .
drwxr-xr-x 745 cool cool 32768 Sep 4 12:44 ..

Nothing =)

@mmeeks
Copy link
Contributor Author

mmeeks commented Sep 4, 2024

So the check happens every 5 seconds in the forkit loop - surprising to see it as significant on the profile; but I guess ... 12 million stats per day for the 700 files is something (if I count right).

Not a hyper-high-priority, but would be nice to get cleaned up.

caolanm added a commit that referenced this issue Sep 4, 2024
They used namespace mounts for / so that was both unmounted automatically
when the child exited, and not visible to the parent anyway, so these
should be empty, with no "lo" to check for, or any other content.

#9976

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: Ia98032abaae8a33abd57cef38bdc97f6ff4fb0c2
caolanm added a commit that referenced this issue Sep 4, 2024
which is where path/<jailid>/tmp is mounted (or linked) from.

This seems to have been the case before namespace support, but it is
just an empty dir without namespaces, but with namespaces (because the
path/<jailid>/tmp mount is hidden from parent processes) the jail tmp
contents were also left behind.

#9976

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: If4aed3ffa0eca73e915f6d48c50a7e70601e210d
mmeeks pushed a commit that referenced this issue Sep 5, 2024
They used namespace mounts for / so that was both unmounted automatically
when the child exited, and not visible to the parent anyway, so these
should be empty, with no "lo" to check for, or any other content.

#9976

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: Ia98032abaae8a33abd57cef38bdc97f6ff4fb0c2
mmeeks pushed a commit that referenced this issue Sep 5, 2024
which is where path/<jailid>/tmp is mounted (or linked) from.

This seems to have been the case before namespace support, but it is
just an empty dir without namespaces, but with namespaces (because the
path/<jailid>/tmp mount is hidden from parent processes) the jail tmp
contents were also left behind.

#9976

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: If4aed3ffa0eca73e915f6d48c50a7e70601e210d
andreasma pushed a commit to freeonlineoffice/online that referenced this issue Sep 27, 2024
They used namespace mounts for / so that was both unmounted automatically
when the child exited, and not visible to the parent anyway, so these
should be empty, with no "lo" to check for, or any other content.

CollaboraOnline/online#9976

Adapt patch to LibreOffice Online.

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: Ia98032abaae8a33abd57cef38bdc97f6ff4fb0c2
andreasma pushed a commit to freeonlineoffice/online that referenced this issue Sep 27, 2024
which is where path/<jailid>/tmp is mounted (or linked) from.

This seems to have been the case before namespace support, but it is
just an empty dir without namespaces, but with namespaces (because the
path/<jailid>/tmp mount is hidden from parent processes) the jail tmp
contents were also left behind.

CollaboraOnline/online#9976

Signed-off-by: Caolán McNamara <[email protected]>
Change-Id: If4aed3ffa0eca73e915f6d48c50a7e70601e210d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unconfirmed
Projects
Status: No status
Development

No branches or pull requests

2 participants