Bug 704415

Summary: abrt-dump-oops breaks live media creation
Product: [Fedora] Fedora Reporter: Kevin Fenzi <kevin>
Component: abrtAssignee: Karel Klíč <kklic>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 15CC: anton, awilliam, dvlasenk, iprikryl, jlaska, jmoskovc, kklic, mclasen, mtoman, notting, npajkovs, rdieter, robatino, rvokal, satellitgo
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: AcceptedBlocker
Fixed In Version: abrt-2.0.2-5.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-16 19:00:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 617261    
Attachments:
Description Flags
updated scriptlets none

Description Kevin Fenzi 2011-05-13 04:32:17 UTC
Something is causing abrt-dump-oops to start up in live media creation chroots. 
This causes the mount to stay busy, which in turn causes livecd-creator to lazy unmount it, which leads to a corrupt image. ;( 

I'm not sure what starts this, but it should not start in chroots. ;( 

Livecd-creator outputs: 

Unmounting directory /var/tmp/imgcreate-L7sNK5/install_root
umount: /var/tmp/imgcreate-L7sNK5/install_root: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

# fuser -m /var/tmp/imgcreate-L7sNK5/install_root
/var/tmp/imgcreate-L7sNK5/install_root: 13892rce
# ps -axuww | grep 13892
root     13892  0.0  0.0   3488   612 ?        Ss   22:11   0:00 abrt-dump-oops -d /var/spool/abrt -rwx /var/log/messages
# ls -l /proc/13892/cwd
lrwxrwxrwx.   1 root root 0 May 12 22:22 cwd -> /var/tmp/imgcreate-L7sNK5/install_root
# pstree | grep dump-oops
systemd-+-abrt-dump-oops

Note that removing this package on the host you are composing doesn't help. 
it happens if the package is installed on the live media in the chroot you are composing. 

Happy to provide more info or debugging.

Comment 1 Adam Williamson 2011-05-13 06:23:14 UTC

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 2 Kevin Fenzi 2011-05-13 13:37:48 UTC
Scriptlets from this subpackage are likely the issue: 

postinstall scriptlet (using /bin/sh):
if [ $1 -eq 1 ]; then
    /sbin/chkconfig --add abrt-oops
fi
preuninstall scriptlet (using /bin/sh):
if [ "$1" -eq "0" ] ; then
    service abrt-oops stop >/dev/null 2>&1
    /sbin/chkconfig --del abrt-oops
fi
#systemd (not tested):
if [ "$1" -eq "0" ] ; then
    /bin/systemctl stop abrt-oops.service >/dev/null 2>&1 || :
    /bin/systemctl disable abrt-oops.service >/dev/null 2>&1 || :
fi
posttrans scriptlet (using /bin/sh):
if [ "$1" -eq "0" ]; then
    # this is a tmp hack to set-up the ccpp hook when updating
    # from 1.x to 2.x without restarting
    service abrt-oops restart >/dev/null 2>&1 || :
fi
#systemd
if [ "$1" -eq "0" ]; then
    /bin/systemctl try-restart abrt-oops.service >/dev/null 2>&1 || :
fi

Comment 3 Bill Nottingham 2011-05-13 14:19:42 UTC
The posttrans script is wrong.

Comment 4 James Laska 2011-05-13 14:22:15 UTC
(In reply to comment #3)
> The posttrans script is wrong.

From notting ... "fairly sure that %posttrans  should be %postun, and the refcounting is wrong"

Comment 5 Bill Nottingham 2011-05-13 15:49:10 UTC
Created attachment 498796 [details]
updated scriptlets

Fixes here:

1) if [ "$1" -eq "0" ] is a no-op for %posttrans - the first argument is always 0.

(http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Syntax)

2) We need to call condrestart, not restart - restart *will start* the service, which we don't want unilaterally.

3) Eliminate the systemctl calls; service <foo> condrestart will automatically redirect when necessary. As written, the scriptlets restart the service twice.

Comment 6 James Laska 2011-05-13 16:12:25 UTC
Basically any live-based release criteria we have would be blocked by the lack of live media.  Clearly +1 Blocker from me.

Comment 7 Adam Williamson 2011-05-13 16:35:16 UTC
+1 from me (actually I proposed it). other votes? kklic is working on an update for this.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 8 Fedora Update System 2011-05-13 17:13:50 UTC
abrt-2.0.2-5.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/abrt-2.0.2-5.fc15

Comment 9 Fedora Update System 2011-05-14 03:08:34 UTC
Package abrt-2.0.2-5.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing abrt-2.0.2-5.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/abrt-2.0.2-5.fc15
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2011-05-16 19:00:15 UTC
abrt-2.0.2-5.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Miroslav Lichvar 2011-10-11 13:11:23 UTC
*** Bug 681293 has been marked as a duplicate of this bug. ***