Bug 963525 - abrtd modifies old directories
abrtd modifies old directories
Product: Fedora
Classification: Fedora
Component: abrt (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Jakub Filak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-05-16 00:15 EDT by John Reiser
Modified: 2016-11-30 19:46 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-19 06:12:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Reiser 2013-05-16 00:15:59 EDT
Description of problem: abrtd changes the modification timestamp of old /var/tmp/abrt/ccpp-* directories (and other dump directories).  Thus "ls -lt" need not list the newest one first, which is not-so-good usability.  I have to parse the date string in the name of the directory, or sort with the [partial] name as the key, in order to find the newest one.  This is doubly confusing because abrtd does not actually change anything in an old directory.

Version-Release number of selected component (if applicable):

How reproducible: every time

Steps to Reproduce:
1. Wait until there is more than one dump directory such as /var/tmp/abrt/ccpp-*.
2. cd /var/tmp/abrt; ls -lR
Actual results:
total 20
drwxrwx---. 2 jreiser abrt 4096 May 15 20:49 ccpp-2013-05-15-20:03:15-1352
drwxrwx---. 2 jreiser abrt 4096 May 15 20:49 ccpp-2013-05-15-20:49:11-1851
-rw-------. 1 root    root   20 May 15 20:49 last-ccpp
-rw-------. 1 root    root   22 May 15 20:19 last-via-server

-rw-rw----. 1 jreiser abrt         5 May 15 20:03 abrt_version

-rw-rw----. 1 jreiser abrt         5 May 15 20:49 abrt_version

Note the same time-last-modified "May 15 20:49" on both directories, yet all the files in the old directory have an old timestamp.  Also note that the newest dump directory is not on one end of the list when the entries in /var/tmo/abrt are sorted by filesystem timestamp.

Expected results:
abrtd does not modify the timestamp of an old directory.  Sorting a list of dump directories by filesystem timestamp puts the newest dump directory on one end of the list.

Additional info:
Comment 1 Jakub Filak 2013-05-16 03:36:38 EDT
abrtd changes the modification timestamp for several reasons and it is not possible to get rid of them. The first reason is that a dump directory is used as a communication channel. The principle is simple, one tool creates a file inside the directory and an another one processes the file. And the synchronization algorithm is based on creating ".lock" symbolic links inside a dump directory. A tool creates the ".lock" link inside a directory to prevent other tools from modification of the directory. If one tools finds the ".lock" link inside a directory, it waits until the link is removed and then continues in processing.

I would say 'abrt-cli list' could help you but I am afraid that 'abrt-cli list' misses some arguments you need. We can add more arguments there but we are not sure which.
Comment 2 John Reiser 2013-05-16 11:29:16 EDT
It seems to me that it ought to be possible to avoid changing the modification timestamp on an old dump directory.  Look first for a .lock file; if found, then skip to next directory, or wait as now.  If no .lock file, then look if any action is necessary, without setting a .lock file yet.  If no action is necessary, then skip to next directory, and changing the modification timestamp has been avoided.  If action appears to be necessary, or if not enough files are present to determine whether action is necessary, then establish the .lock file and proceed as now.  Overall, in one common case (a dump directory which was completely processed at least many minutes ago) setting the .lock can be avoided, thus not changing the modification timestamp.
Comment 3 Jakub Filak 2013-05-16 16:37:08 EDT
(In reply to comment #2)

Yes, your idea is correct. But all I can promise is that I will look into it but it won't be implemented soon.
Comment 4 Fedora End Of Life 2015-01-09 17:07:15 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 5 Jaroslav Reznik 2015-03-03 09:56:09 EST
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
Comment 6 Fedora End Of Life 2016-07-19 06:12:25 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 7 Jakub Filak 2016-07-19 06:14:02 EDT
Moved upstream: https://github.com/abrt/abrt/issues/1162

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