LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-12-2007, 09:22 AM   #1
uber-mood
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Rep: Reputation: 0
Unhappy RPM hangs on install/erase/update when scripts are included


Hi!

I have suddenly got problems updating, erasing and instaling RPM-packages on my Fedora 8.
It just hangs there and the only way to release it, is by killing the process from another console or Ctrl-Z.

This problem only seems to occur on RPM-packages that has builtin post-, preinstall/uninstall scripts.

Like this:

Code:
bash# rpm -U -vvvv at-3.1.10-19.fc8.i386.rpm
.
.
.
D:   install: %post(at-3.1.10-19.fc8.i386) synchronous scriptlet start
D:   install: %post(at-3.1.10-19.fc8.i386)      execv(/bin/sh) pid 3257
+ touch /var/spool/at/.SEQ
+ chmod 600 /var/spool/at/.SEQ
+ chown daemon:daemon /var/spool/at/.SEQ
+ /sbin/chkconfig --add atd

[hang]
This seems to happen on all RPMs that have scripts included. It just sits there, doing nothing..

I have tried to
Code:
rm -f /var/lib/rpm/__db*; rpm --rebuilddb
a couple of times, without success.

Running strace on the pid of my hanging rpm process, shows this:

Code:
bash# strace -p 3353
Process 3353 attached - interrupt to quit
--- SIG_0 (Unknown signal 0) @ 0 (0) ---
futex(0x9307134, FUTEX_WAIT_PRIVATE, 2,NULL

I've been googling around a lot, but can't find any solution..
Please, help!
 
Old 12-12-2007, 04:21 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,470
Blog Entries: 54

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Quote:
Originally Posted by uber-mood View Post
Hi!
Hello and welcome to LQ. Hope you like it here.


Quote:
Originally Posted by uber-mood View Post
I have suddenly got problems updating, erasing and instaling RPM-packages on my Fedora 8.
So this started at some point? Can you trace back around what time it started? And check the logs for what changed? Any updates? BTW 0: can you install or upgrade rpm's if you use "--noscripts"? BTW 1: you're using Fedora 8 so it would be good to check and add a ticket to their bug tracker if the problem is not mentioned there already.
 
Old 12-12-2007, 04:35 PM   #3
uber-mood
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Yup. When running with the --no-scripts option, it doesn't hang..

Hmm, and when checking my yum.log to see when it last worked, it looks like my RPM problems started after 5:th Dec, when done with these updates/installs:

Code:
Dec 05 20:27:40 Updated: yum - 3.2.7-2.fc8.noarch
Dec 05 20:27:41 Installed: nss-tools - 3.11.7-10.fc8.i386
Dec 05 20:27:42 Updated: sendmail - 8.14.2-1.fc8.i386
Dec 05 20:27:43 Installed: gamin-python - 0.1.9-4.fc8.i386
Dec 05 20:27:44 Installed: fuse - 2.7.0-8.fc8.i386
Dec 05 20:27:48 Installed: pcsc-lite-libs - 1.3.3-1.fc8.i386
Dec 05 20:27:49 Installed: fuse-libs - 2.7.0-8.fc8.i386
Dec 05 20:27:50 Installed: ntfs-3g - 2:1.1120-1.fc8.i386
Dec 05 20:27:50 Installed: irqbalance - 2:0.55-7.fc8.i386
Dec 05 20:27:52 Installed: ntfsprogs - 1.13.1-8.fc8.i386
Dec 05 20:27:52 Installed: smartmontools - 1:5.37-7.1.fc8.i386
Dec 05 20:27:53 Installed: device-mapper-multipath - 0.4.7-11.fc7.i386
Dec 05 20:27:53 Installed: microcode_ctl - 1:1.17-1.38.fc8.i386
Dec 05 20:27:53 Installed: tree - 1.5.0-8.fc8.i386
Dec 05 20:27:54 Installed: usbutils - 0.71-2.1.i386
Dec 05 20:27:54 Installed: pam_pkcs11 - 0.5.3-25.i386
Dec 05 20:27:55 Installed: rng-utils - 1:2.0-1.14.1.fc6.i386
Dec 05 20:27:55 Installed: yum-updatesd - 1:0.7-1.fc8.noarch
Dec 05 20:27:56 Updated: sendmail-cf - 8.14.2-1.fc8.i386
Dec 05 20:27:57 Updated: NetworkManager-glib - 1:0.7.0-0.6.6.svn3109.fc8.i386
Dec 05 20:27:58 Updated: NetworkManager - 1:0.7.0-0.6.6.svn3109.fc8.i386
Dec 05 20:27:59 Installed: pcsc-lite - 1.3.3-1.fc8.i386
Dec 05 20:27:59 Installed: ccid - 1.2.1-3.fc8.i386
Dec 05 20:28:00 Installed: ifd-egate - 0.05-19.i386
Dec 05 20:28:00 Installed: coolkey - 1.1.0-5.fc8.i386
Dec 05 20:29:37 Installed: fakeroot - 1.6.4-15.fc7.i386
Dec 05 20:29:38 Installed: sparse - 0.4.1-1.fc8.i386
Dec 05 20:29:38 Installed: rpmdevtools - 6.4-1.fc8.noarch
Dec 05 20:29:38 Installed: unifdef - 1.171-6.fc8.i386
Can somebody here identify any of these packages that could cause this problem?
 
Old 12-12-2007, 05:15 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,470
Blog Entries: 54

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
It's clear some yum and RPM stuff got upgraded. I'd definately get on the F8 user mailing list /bug tracker with this.


Now I don't know how mad your CLI skills are (so below may be horror to you) but until you fix it there's a way to extract scriptlets and run them. Here's an example how, maybe somebody is willing to make it a nice script. Say you got a rpm called "my.rpm". You can query it for what scripts it runs with 'rpm -qp --scripts my.rpm'. Since there's only a few possibilities you can find out which one you'll need with 'rpm -qp --scripts my.rpm|grep -n '^p.*scriptlet.*:$'' and it'll return something like this:
Code:
1:postinstall scriptlet (using /bin/sh):
21:preuninstall scriptlet (using /bin/sh):
26:postuninstall scriptlet (using /bin/sh):
so this shows the postinstall script runs from line 2 to 21 and the preuninstall from line 22 to line 26. Now you can extract the postinstall script with 'rpm -qp --scripts my.rpm|sed -n '21q;2,21p'>/tmp/my.sh' and then 'sh /tmp/my.sh'. Dunno if that was helpful.

Last edited by unSpawn; 12-12-2007 at 05:17 PM.
 
Old 12-12-2007, 07:41 PM   #5
uber-mood
LQ Newbie
 
Registered: Dec 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for your kind help!

I think I managed to solve the problem now, by simply uninstalling package "yum-updatesd". Directly after uninstall, RPM-command started to work again.

Strangely enough, RPM still works flawlessly after reinstalling "yum-updatesd" back to the system. Not sure what happened here.. but it's working!
 
Old 12-13-2007, 01:55 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,470
Blog Entries: 54

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Well done fixing things yourself!
 
  


Reply

Tags
hang, rpm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What set of scripts is included in a debian packet? chickenjoy Debian 2 05-14-2007 08:17 PM
rpm erase problem cch2cch Linux - Newbie 1 04-13-2005 10:57 AM
Fedora first update hangs on "Fetching rpm header: glibc-2.3.2-101.4" Darthomir Fedora 24 04-10-2004 11:53 AM
Fedora first update (with RH NetW) hangs on "Fetching rpm header: glibc-2.3.2-101.4" Darthomir Red Hat 5 03-15-2004 05:04 PM
RPM install hangs? martinman Linux - General 1 04-27-2003 04:05 AM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration