Bug 368271 - selinux-policy-targeted update hangs
selinux-policy-targeted update hangs
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
7
All Linux
low Severity high
: ---
: ---
Assigned To: Jeremy Katz
Fedora Extras Quality Assurance
:
: 376071 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-06 09:50 EST by Rex Dieter
Modified: 2014-01-21 18:00 EST (History)
7 users (show)

See Also:
Fixed In Version: 3.2.7-2.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-03 00:35:31 EST
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 15:16 EST, Nalin Dahyabhai
no flags Details

  None (edit)
Description Rex Dieter 2007-11-06 09:50:02 EST
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 10:09:51 EST
Just had a 3rd machine trying to update and hang.  Bad.
Comment 2 Chris Shoemaker 2007-11-06 10:35:05 EST
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 11:06:26 EST
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 11:23:52 EST
I saw no activity (nothing on top, hd disk light off)
Comment 5 Daniel Walsh 2007-11-06 11:36:23 EST
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 11:36:44 EST
Which policycoreutils do you have installed?

Comment 7 Rex Dieter 2007-11-06 11:46:15 EST
rpm -q policycoreutils
policycoreutils-2.0.16-11.fc7
Comment 8 Chris Shoemaker 2007-11-06 11:53:09 EST
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 15:14:24 EST
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 15:16:52 EST
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 15:22:42 EST
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 16:06:23 EST
Confirmed, guilty, my boxes in question are running in permissive mode.
Comment 13 Rex Dieter 2007-11-06 16:07:32 EST
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 17:17:25 EST
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 17:17:36 EST
*** Bug 376071 has been marked as a duplicate of this bug. ***
Comment 16 Fedora Update System 2007-12-03 00:35:29 EST
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 06:46:25 EST
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.