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

Temporary directories not being cleaned up #979

Closed
mgrabovsky opened this issue Jun 22, 2021 · 1 comment · Fixed by #988
Closed

Temporary directories not being cleaned up #979

mgrabovsky opened this issue Jun 22, 2021 · 1 comment · Fixed by #988
Assignees
Labels

Comments

@mgrabovsky
Copy link
Contributor

ABRT Analytics seems to create tons of temporary directories in /tmp and forgets to clean them up after they have been used. The following directories were present in /tmp at retrace.fp.org before I cleaned them up manually:

mesa-dri-drivers-20.2.0-2.fc33.x86_64sa70e7w0/
python3-qt5-base-5.15.0-4.fc33.x86_64i9dmti6h/
neovim-0.4.4-3.fc33.x86_64r730xtb9/
python3-gnuradio-3.8.2.0-2.fc33.x86_64m36y0rai/
glibc-2.32-4.fc33.x86_64o50c74rq/
gcc-c++-10.2.1-9.fc33.x86_64yo93oxfr/
uhd-3.15.0.0-0.8.rc2.fc33.x86_64uyuwtytg/
python3.6-3.6.12-2.fc33.x86_64_fmgwcp4/
python3.7-3.7.10-1.fc33.x86_646s0jr7ss/
mesa-dri-drivers-20.3.4-2.fc33.x86_64aikt02n6/
python3-libs-3.9.2-1.fc33.x86_64a61jzclk/
fish-3.1.2-6.fc34.x86_64ldxcvi3i/
...

They managed to guzzle about 270 GiB over the period of a week. These seem to be extracted RPMs, though I don't know where exactly they come from from the top of my head.

@mgrabovsky mgrabovsky added the bug label Jun 22, 2021
@mgrabovsky
Copy link
Contributor Author

The function that creates these is faf_rpm.unpack_rpm_to_tmp(). It's being called from RetracePool._unpack_task_pkg(). The class itself is used by faf retrace which runs periodically every day.

@mgrabovsky mgrabovsky self-assigned this Jun 29, 2021
mgrabovsky added a commit that referenced this issue Jul 16, 2021
Individual components should use the `pyfaf.common.get_temp_dir()`
function to obtain the path to the configure temp directory.

This commit also makes use of the optional `subdir` argument to
segregate the directory for extracted RPMs from the rest.

Related: #979
mgrabovsky added a commit that referenced this issue Jul 16, 2021
Add a configuration file for systemd-tmpfiles to create and clean up the
`/tmp/faf` temporary directory. More specifically, clean up files older
than a day in `/tmp/faf/rpm` and files older than 28 days in the
remainder of `/tmp/faf`.

Fixes #979
mgrabovsky added a commit that referenced this issue Jul 16, 2021
Individual components should use the `pyfaf.common.get_temp_dir()`
function to obtain the path to the configure temp directory.

This commit also makes use of the optional `subdir` argument to
segregate the directory for extracted RPMs from the rest.

Related: #979
mgrabovsky added a commit that referenced this issue Jul 16, 2021
Add a configuration file for systemd-tmpfiles to create and clean up the
`/tmp/faf` temporary directory. More specifically, clean up files older
than a day in `/tmp/faf/rpm` and files older than 28 days in the
remainder of `/tmp/faf`.

Fixes #979
mgrabovsky added a commit that referenced this issue Jul 27, 2021
Individual components should use the `pyfaf.common.get_temp_dir()`
function to obtain the path to the configure temp directory.

This commit also makes use of the optional `subdir` argument to
segregate the directory for extracted RPMs from the rest.

Related: #979
mgrabovsky added a commit that referenced this issue Jul 27, 2021
Add a configuration file for systemd-tmpfiles to create and clean up the
`/tmp/faf` temporary directory. More specifically, clean up files older
than a day in `/tmp/faf/rpm` and files older than 28 days in the
remainder of `/tmp/faf`.

Fixes #979
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant