Bug 174215 - update process hangs at a stage
update process hangs at a stage
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: denyhosts (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Tibbitts
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-25 18:10 EST by Thomas Antony
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: 1.1.4-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-22 17:56:52 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)

  None (edit)
Description Thomas Antony 2005-11-25 18:10:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de-DE; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
When i run yum update, the latest update for denyhosts fails because the service wont shut down.

[thomas@ws01 ~]$ sudo yum update
Setting up Update Process
...
...
Downloading Packages:
(1/4): bittorrent-gui-4.2 100% |=========================|  83 kB    00:00
(2/4): denyhosts-1.1.3-1. 100% |=========================|  68 kB    00:00
(3/4): bittorrent-4.2.0-1 100% |=========================| 910 kB    00:02
(4/4): xmms-flac-1.1.2-25 100% |=========================|  57 kB    00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating  : bittorrent                   ######################### [1/8]
  Updating  : bittorrent-gui               ######################### [2/8]
  Updating  : denyhosts                    ######################### [3/8]

At this stage yum won't do anything forever till i open a new terminal and stop denyhosts by myself.

root      3811  1.1  4.3 166604 45008 pts/1    S+   00:11   0:03 /usr/bin/python /usr/bin/yum update
root      3831  0.0  0.1  53916  1048 pts/1    S+   00:12   0:00 /bin/sh /var/tmp/rpm-tmp.42530 2
root      3849  0.0  0.5  90544  5996 pts/1    S+   00:12   0:00 /usr/bin/python /usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099

[thomas@ws01 ~]$ cat /var/tmp/rpm-tmp.42530
/sbin/chkconfig --add denyhosts

RUNNING=`/sbin/service denyhosts status | grep "is running"`
/sbin/service denyhosts stop > /dev/null 2>&1 || :
/usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099 > /dev/null 2>&1 || :
if [ -n "$RUNNING" ]; then
  /sbin/service denyhosts start > /dev/null 2>&1
fi
exit 0

[thomas@ws01 ~]$ sudo service denyhosts stop
sent DenyHosts SIGTERM

/var/tmp/rpm-tmp.42530: line 5:  3849 Beendet                 /usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099 >/dev/null 2>&1
  Updating  : xmms-flac                    ######################### [4/8]
  Cleanup   : bittorrent-gui               ######################### [5/8]
  Cleanup   : denyhosts                    ######################### [6/8]
  Cleanup   : bittorrent                   ######################### [7/8]
  Cleanup   : xmms-flac                    ######################### [8/8]

Version-Release number of selected component (if applicable):
denyhosts-1.1.3-1.fc4

How reproducible:
Didn't try

Steps to Reproduce:
x)update denyhosts as normal user with sudo

Additional info:
Comment 1 Jason Tibbitts 2005-11-25 19:08:16 EST
Could you tell me which version you were updating from?

Does /var/log/denyhosts show anything other than 

INFO     DenyHosts daemon is shutting down
INFO     DenyHosts launched with the following args:
INFO        /usr/bin/denyhosts.py --daemon --config=/etc/denyhosts.conf

At the time of the upgrade?

If you run

/usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099 --debug --verbose

manually, does it still hang?  Do you get any useful debug output in that case?

The purpose of --upgrade099 is to rewrite /etc/hosts.deny entries written by
versions of denyhosts earlier than 0.9.9 to include time/date information so
that entries can be purged.  I suppose it would be possible for some particular
hosts.deny formatting to confuse the parser.  If you can make it hang
repeatably, would you be willing to send a copy of your hosts.deny to me
personally (or attach it to this bug if you don't mind the world seeing it)?

Comment 2 Thomas Antony 2005-11-27 16:58:52 EST
I updated from denyhosts-1.0.2-1.fc4.
I only have denyhosts installed and did not ever started it, so there is no log.
At the time the update process hangs, i looked in the temp file and saw the line
"/sbin/service denyhosts stop > /dev/null 2>&1".
My thought was the service could not get stopped, so i did a "sudo /sbin/service
denyhosts stop" and "yum update" completed successfully.
I did not noticed that denyhosts does not start in any runlevel and wasn't ever
started. I have added all information i could get to my previous post.

What does the colon at the end of "/sbin/service denyhosts stop > /dev/null 2>&1
|| :" do?

I uninstalled denyhosts-1.1.3-1.fc4, downloaded and installed version
denyhosts-1.0.2-1.fc4 and updated it again with yum update denyhosts.
This time the update did complete successfully. I can not reproduce it again
anymore.
Comment 3 Thomas Antony 2005-11-27 18:16:43 EST
I could reproduce this behaviour again. I uninstalled the new version twice,
removed the log file, installed the previous version, run yum update denyhosts
and now the update process will no go further.

When i run
"sudo /usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099 --debug --verbose",
while the update process hangs at [1/2] and denyhosts never started, i get
following output:

DenyHosts could not obtain lock (pid: 24709)
[Errno 17] File exists: '/var/lock/subsys/denyhosts'
Comment 4 Thomas Antony 2005-11-27 18:19:00 EST
sudo service denyhosts status
DenyHosts is running with pid = 24709

root     24686  0.1  4.2 165408 43948 pts/1    S+   00:25   0:02 /usr/bin/python
/usr/bin/yum update
root     24691  0.0  0.1  53912  1044 pts/1    S+   00:26   0:00 /bin/sh
/var/tmp/rpm-tmp.44109 2
root     24709  0.0  0.5  90420  5948 pts/1    S+   00:26   0:00 /usr/bin/python
/usr/bin/denyhosts.py -c /etc/denyhosts.conf --upgrade099
Comment 5 Jason Tibbitts 2006-01-17 10:02:05 EST
I've not found anyone who could reproduce this and upstream had no idea what
could be causing it.  For the latest version (1.1.4-2, already built and pushed
to the repositories) I eliminated the "--upgrade099" step and greatly simplified
the %post script.

If you still see the problem, please let me know.
Comment 6 Thomas Antony 2006-01-22 17:56:52 EST
i didn't have any troubles with the latest update.
maybe the --upgrade099 did not work sometimes.

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