Bug 368271 - selinux-policy-targeted update hangs
Summary: selinux-policy-targeted update hangs
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: yum   
(Show other bugs)
Version: 7
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
: 376071 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-06 14:50 UTC by Rex Dieter
Modified: 2014-01-21 23:00 UTC (History)
7 users (show)

Fixed In Version: 3.2.7-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-03 05:35:31 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
source for a package which triggers the error on my test system (1.79 KB, application/octet-stream)
2007-11-06 20:16 UTC, Nalin Dahyabhai
no flags Details

Description Rex Dieter 2007-11-06 14:50:02 UTC
Thought it was a fluke once, but now it's happened on 2 boxes of ours.  Trying
to update to
selinux-policy-targeted-2.6.4-49.fc7
simply hangs (ok, takes longer than 12 hours, which is how long I waited).

The first hang I saw was on a i386 box, this last on x86_64.

All I can see is a related processes that doesn't finish:
root     16658  0.0  0.0  72464  1224 pts/4    T    Nov05   0:00 /bin/sh
/sbin/fixfiles -C /etc/selinux/targeted/contexts/files/file_contexts.pre restore
root     16685  0.0  0.0  72464   664 pts/4    T    Nov05   0:00 /bin/sh
/sbin/fixfiles -C /etc/selinux/targeted/contexts/files/file_contexts.pre restore

Comment 1 Rex Dieter 2007-11-06 15:09:51 UTC
Just had a 3rd machine trying to update and hang.  Bad.

Comment 2 Chris Shoemaker 2007-11-06 15:35:05 UTC
This is *really* bad. :(

Confirmed hangs on i386 and x86_64 when running "yum update" on F7 machines.

root     31923 31914  0 09:13 pts/3    00:00:00 /bin/sh /sbin/fixfiles -C
/etc/selinux/targeted/contexts/files/file_contexts.pre restore
root     31950 31923  0 09:13 pts/3    00:00:00 /bin/sh /sbin/fixfiles -C
/etc/selinux/targeted/contexts/files/file_contexts.pre restore
root     31951 31923  1 09:13 pts/3    00:01:19 /sbin/restorecon -v -f -

I will leave my processes in their hung state for a while if anyone needs info
to help debug this, (e.g.  I could attach gdb to restorecon, if someone thought
that would help) just contact me.

Otherwise, does anyone have advice on how to gracefully recover from the hung
update?

Comment 3 Daniel Walsh 2007-11-06 16:06:26 UTC
Yes Is the process continuing to execute?  This procedure it to attempt to check
the previous version of file context versus the new and then run
restorecon/fixfiles on the difference.  This could take some time but not 12 hours.

Do you see disk activity and does top show restorecon running?

Comment 4 Rex Dieter 2007-11-06 16:23:52 UTC
I saw no activity (nothing on top, hd disk light off)

Comment 5 Daniel Walsh 2007-11-06 16:36:23 UTC
This is strange we just tried it here and it went fine.  selinux-policy-2.6.4-48
- selinux-policy-2.6.4-49


Comment 6 Daniel Walsh 2007-11-06 16:36:44 UTC
Which policycoreutils do you have installed?



Comment 7 Rex Dieter 2007-11-06 16:46:15 UTC
rpm -q policycoreutils
policycoreutils-2.0.16-11.fc7


Comment 8 Chris Shoemaker 2007-11-06 16:53:09 UTC
same here, policycoreutils-2.0.16-11.fc7, and no disk or cpu load.

Daniel, feel free to ping me (shoe) in #fedora, for more info, too.

Comment 9 Daniel Walsh 2007-11-06 20:14:24 UTC
This turns out to be a yum/rpm python binding problem.

If a package that you are updating spews lots of data, yum gets into a dead lock
situation.

Comment 10 Nalin Dahyabhai 2007-11-06 20:16:52 UTC
Created attachment 249561 [details]
source for a package which triggers the error on my test system

This triggers the behavior when SELinux doesn't prevent the %post script's
output from being handed to yum (permissive mode, though I imagine SELinux
disabled would show identical behavior).

Comment 11 Daniel Walsh 2007-11-06 20:22:42 UTC
I am removing -v from fixfiles in policycoreutils to stop selinux from
triggering this error.  But if this screwed you environment.

http://skvidal.wordpress.com/2006/12/04/re-wow/

Might help.

Comment 12 Rex Dieter 2007-11-06 21:06:23 UTC
Confirmed, guilty, my boxes in question are running in permissive mode.

Comment 13 Rex Dieter 2007-11-06 21:07:32 UTC
fwiw, it's not a good idea for pkg scriptlets to be spewing much, if any, output
anyway.

Comment 14 Jeremy Katz 2007-11-12 22:17:25 UTC
Fixed in upstream yum, we'll be pushing an updated package in the near-ish
future (have another bug we're trying to track down first).  Dan has also made
the policy package spew less to make this less likely.

Comment 15 Jeremy Katz 2007-11-12 22:17:36 UTC
*** Bug 376071 has been marked as a duplicate of this bug. ***

Comment 16 Fedora Update System 2007-12-03 05:35:29 UTC
yum-3.2.7-2.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2007-12-03 11:46:25 UTC
yum-3.2.7-2.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.


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