Bug 674194 - tmpfiles removes files it shouldn't, breaking X and other applications
Summary: tmpfiles removes files it shouldn't, breaking X and other applications
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 669079 (view as bug list)
Depends On:
Blocks: F15Blocker, F15FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2011-01-31 22:57 UTC by Miloslav Trmač
Modified: 2011-02-16 22:52 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-16 22:51:46 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miloslav Trmač 2011-01-31 22:57:57 UTC
Description of problem:
systemd introduces "systemd-tmpfiles", which implements automatic removal of temporary files.  This new implementations reintroduces various bugs that have been fixed in tmpwatch over the years:

* tmpfiles removes sockets if their [acm]time is not recent - but
  connect() on an AF_UNIX socket does not update any of these times.  Thus,
  tmpfiles will eventually remove e.g. /tmp/.X11-unix/X0, breaking X.  (#114969)

* Some files are accessed only through mmap(), which does not update their
  times either.  Thus, tmpfiles will break Java management tools. (#527425)

Version-Release number of selected component (if applicable):
Git as of Jan 31, by code inspection

Comment 1 Paolo Bonzini 2011-02-01 16:21:22 UTC
*** Bug 669079 has been marked as a duplicate of this bug. ***

Comment 2 Lennart Poettering 2011-02-16 22:34:12 UTC
systemd-tmpfiles in v18 now ensures that AF_UNIX sockets are actually dead before deleting them (By parsing /proc/net/unix. That's ugly but we do our best to make this efficient and sort everything we read from there into a hash table so that later on our checks for further unix sockets are cheap).

systemd-tmpfiles in v18 now also supports globs in exclusion lists for the automatic cleanup. This allows those Java tools to simply drop a file into /etc/tmpfiles.d/ which contains "x /tmp/hsperfdata_*" with the effect that these files will not be cleaned up regardless of their [amc]time. This is a much nicer solution than hardcoding package-specific paths in the system clean-up scripts.

I will now file a bug against Java to include a tmpfiles file like this.

Comment 3 Lennart Poettering 2011-02-16 22:51:46 UTC
File that bug now:

https://bugzilla.redhat.com/show_bug.cgi?id=678161

I guess this means this bug can be closed now.

Thanks a lot btw for pointing these issues out! Much appreciated.

Comment 4 Lennart Poettering 2011-02-16 22:52:01 UTC
s/File/Filed/


Note You need to log in before you can comment on or make changes to this bug.