Bug 963525

Summary: abrtd modifies old directories
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: abrtAssignee: Jakub Filak <jfilak>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: abrt-devel-list, dvlasenk, iprikryl, jberan, jfilak, maurizio.antillon, mmilata, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
URL: https://github.com/abrt/abrt/issues/1162
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-19 10:12:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Reiser 2013-05-16 04:15:59 UTC
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):
abrt-2.1.4-3.fc19

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
3.
  
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
  <<snip>>

./ccpp-2013-05-15-20:03:15-1352:
-rw-rw----. 1 jreiser abrt         5 May 15 20:03 abrt_version
  <<snip>>

./ccpp-2013-05-15-20:49:11-1851:
-rw-rw----. 1 jreiser abrt         5 May 15 20:49 abrt_version
  <<snip>>

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 07:36:38 UTC
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 15:29:16 UTC
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 20:37:08 UTC
(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 22:07:15 UTC
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 14:56:09 UTC
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:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 6 Fedora End Of Life 2016-07-19 10:12:25 UTC
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
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Jakub Filak 2016-07-19 10:14:02 UTC
Moved upstream: https://github.com/abrt/abrt/issues/1162