Bug 894875 - tmpwatch is removing PrivateTmp directories which are in use
Summary: tmpwatch is removing PrivateTmp directories which are in use
Keywords:
Status: CLOSED DUPLICATE of bug 866693
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 17
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-13 21:53 UTC by Ronny Buchmann
Modified: 2013-01-14 18:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-14 18:33:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ronny Buchmann 2013-01-13 21:53:26 UTC
Description of problem:
Services malfunction after some days of inactivity (for example mysql)

Version-Release number of selected component (if applicable):
systemd-44-23.fc17
tmpwatch-2.10.3-2.fc17

How reproducible:
always

Steps to Reproduce:
1. start mysqld (systemctl start mysqld.service)
2. wait 10 days - /tmp/systemd-namespace-xxxxx is deleted
3. try to run a mysql query which writes to /tmp:
"Can't create/write to file '/tmp/#sql_696_0.MYI' (Errcode: 2)"

strace -e trace=file:
[pid 15889] lstat("/tmp", {st_mode=S_IFDIR|S_ISVTX|0777, st_size=0, ...}) = 0
[pid 15889] lstat("/tmp/#sql_696_0.MYI", 0x7fb3579e07b0) = -1 ENOENT (No such file or directory)
[pid 15889] open("/tmp/#sql_696_0.MYI", O_RDWR|O_CREAT|O_EXCL|O_TRUNC|O_NOFOLLOW, 0660) = -1 ENOENT (No such file or directory)
[pid 15889] lstat("/tmp/#sql_696_0.MYI", 0x7fb3579e2e60) = -1 ENOENT (No such file or directory)
[pid 15889] unlink("/tmp/#sql_696_0.MYI") = -1 ENOENT (No such file or directory)

excerpt from /proc/<mysqld-pid>mountinfo:
121 86 253:1 /tmp/systemd-namespace-Ej9Z5G/private//deleted /tmp rw,relatime - ext4 /dev/mapper/ssdvg-rootlv rw,seclabel,data=ordered
122 86 253:1 /tmp/systemd-namespace-Ej9Z5G/private//deleted /var/tmp rw,relatime - ext4 /dev/mapper/ssdvg-rootlv rw,seclabel,data=ordered

So systemd and tmpwatch seem to not play well together.

A solution could be that systemd itself would touch all currently used namespace directories every day. That way tmpwatch could still remove old namespace directories.

Comment 1 Lennart Poettering 2013-01-14 18:33:45 UTC

*** This bug has been marked as a duplicate of bug 866693 ***


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