Bug 698440

Summary: times on all ccpp* directories are always updated by abrt-gui
Product: [Fedora] Fedora Reporter: Steve Tyler <stephent98>
Component: abrtAssignee: Jiri Moskovcak <jmoskovc>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: anton, dfediuck, dvlasenk, iprikryl, jmoskovc, kklic, mtoman, npajkovs, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-11-30 15:07:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Steve Tyler 2011-04-20 21:34:00 UTC
Description of problem:
abrt-gui always updates the times on all ccpp* directories, even if it is simply started and immediately closed.

Version-Release number of selected component (if applicable):
abrt-2.0.1-1.fc15.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. $ ls -alF --full-time .abrt/spool/
2. $ abrt-gui
3. Click "Close".
3. $ ls -alF --full-time .abrt/spool/
  
Actual results:
Times on all directories are updated.

Expected results:
Times on all directories are preserved.

Additional info:
[joeblow@fir ~]$ ls -alF --full-time .abrt/spool/
total 52
drwxr-xr-x. 13 joeblow joeblow 4096 2011-04-20 13:50:57.260716090 -0700 ./
drwxr-xr-x.  3 joeblow joeblow 4096 2011-03-31 11:44:43.675431989 -0700 ../
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 ccpp-2011-03-29-13:47:38-2362/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 ccpp-2011-03-29-15:55:36-1595/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.438716929 -0700 ccpp-2011-03-30-14:15:50-1559/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 ccpp-2011-03-31-11:43:58-1559/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.438716929 -0700 ccpp-2011-03-31-14:28:33-2901/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 ccpp-2011-04-04-11:08:00-1582/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.438716929 -0700 ccpp-2011-04-05-04:07:08-1789/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.438716929 -0700 ccpp-2011-04-07-04:03:45-1678/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.438716929 -0700 ccpp-2011-04-20-13:48:58-1728/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 pyhook-2011-04-06-15:23:33-3447/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:21:52.439716929 -0700 pyhook-2011-04-07-05:09:35-1914/
[joeblow@fir ~]$ abrt-gui
Can't access '/var/spool/abrt/ccpp-2011-04-20-13:56:19-1933': Permission denied
[joeblow@fir ~]$ ls -alF --full-time .abrt/spool/
total 52
drwxr-xr-x. 13 joeblow joeblow 4096 2011-04-20 13:50:57.260716090 -0700 ./
drwxr-xr-x.  3 joeblow joeblow 4096 2011-03-31 11:44:43.675431989 -0700 ../
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-03-29-13:47:38-2362/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-03-29-15:55:36-1595/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-03-30-14:15:50-1559/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-03-31-11:43:58-1559/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-03-31-14:28:33-2901/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-04-04-11:08:00-1582/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-04-05-04:07:08-1789/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-04-07-04:03:45-1678/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 ccpp-2011-04-20-13:48:58-1728/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 pyhook-2011-04-06-15:23:33-3447/
drwxr-x---.  2 joeblow joeblow 4096 2011-04-20 14:22:35.847716949 -0700 pyhook-2011-04-07-05:09:35-1914/

Comment 1 Steve Tyler 2011-04-24 11:11:06 UTC
When a new crash occurs, abrtd updates all times in /var/spool/abrt/.

[joeblow@fir abrt]$ ls -alF --full-time
total 20
drwxr-xr-x.  4 abrt abrt 4096 2011-04-24 03:58:47.535645645 -0700 ./
drwxr-xr-x. 13 root root 4096 2011-04-21 15:51:39.833912109 -0700 ../
-rw-------.  1 root root   10 2011-04-24 03:58:18.105247058 -0700 last-ccpp
drwxr-x---.  2 abrt abrt 4096 2011-04-24 00:01:50.970114118 -0700 pyhook-2011-04-22-12:05:41-2052/
drwxr-x---.  2 abrt abrt 4096 2011-04-24 00:01:50.979114453 -0700 pyhook-2011-04-22-12:07:43-2119/
[joeblow@fir abrt]$ sleep 1000 &
[1] 1763
[joeblow@fir abrt]$ kill -6 1763
[joeblow@fir abrt]$ ls -alF --full-time
total 24
drwxr-xr-x.  5 abrt abrt    4096 2011-04-24 03:59:53.457647986 -0700 ./
drwxr-xr-x. 13 root root    4096 2011-04-21 15:51:39.833912109 -0700 ../
drwxr-x---.  2 abrt joeblow 4096 2011-04-24 03:59:54.122677468 -0700 ccpp-2011-04-24-03:59:53-1763/
-rw-------.  1 root root      10 2011-04-24 03:59:53.391645060 -0700 last-ccpp
drwxr-x---.  2 abrt abrt    4096 2011-04-24 03:59:53.510650336 -0700 pyhook-2011-04-22-12:05:41-2052/
drwxr-x---.  2 abrt abrt    4096 2011-04-24 03:59:53.517650646 -0700 pyhook-2011-04-22-12:07:43-2119/
[1]+  Aborted                 (core dumped) sleep 1000

Comment 2 Steve Tyler 2011-04-24 11:22:57 UTC
This produces a write denied selinux alert:

[joeblow@fir abrt]$ sudo mkdir /tmp/foo
[joeblow@fir abrt]$ sudo mv /tmp/foo .

type=AVC msg=audit(1303644040.115:110): avc:  denied  { write } for  pid=850 comm="abrtd" name="foo" dev=sdb6 ino=132801 scontext=system_u:system_r:abrt_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_tmp_t:s0 tclass=dir

Comment 3 Jiri Moskovcak 2011-11-30 15:07:22 UTC
This is not a bug, abrt create a lock file when it access the directory and thus the time change.