Bug 213622 - yum-updatesd fail to get update info
yum-updatesd fail to get update info
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: yum (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: James Antill
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-11-02 06:34 EST by Simon Goodall
Modified: 2014-01-21 17:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-13 13:49:52 EDT
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 Simon Goodall 2006-11-02 06:34:08 EST
Description of problem:
yum-updatesd fails to work with the following message when puplet runs;

yum-updatesd: error getting update info: [Errno 9] Bad file descriptor


Version-Release number of selected component (if applicable):
yum-updatesd-3.0-6
pirut-1.2.5-1

How reproducible:
The first time this ran I got a message saying that  I had no network
connectivity, since then it has failed with the above log message (even after a
reboot).

Steps to Reproduce:
1. Start yum-updatesd
2. Start puplet
3.
  
Actual results:
Above message

Expected results:
A status icon in notification area telling me whether updates are needed or not.

Additional info:
selinux is set to enforced. However I have tried setenfore 0 and restarting
dbus, yum-updatesd and puplet with no effect.

The error message occurs in /usr/share/yum-cli/yumupd.py around line 330 runing
the line;
 self.doSackSetup()
Comment 1 Jeremy Katz 2006-11-03 14:26:20 EST
Can you try strace'ing yum-updatesd (and run with --no-fork) to see where it's
failing?
Comment 2 Tim Clymo 2006-11-04 18:41:34 EST
Not certain if this is the same bug, but I get "yum-updatesd: error getting
update info: [Errno 9] Bad file descriptor" syslogged around $run_interval
seconds after yum-updatesd starts, and I don't get any updates or notification

part of strace of process running as a daemon:

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfe51fdc) = -1 ENOTTY (Inappropriate
ioctl for device)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f17000
futex(0x8bdce10, FUTEX_WAKE, 1)         = 0
write(1, "Excluding Packages in global exc"..., 42) = -1 EBADF (Bad file descriptor)
futex(0x8bdce10, FUTEX_WAKE, 1)         = 0
futex(0x8bdce10, FUTEX_WAKE, 1)         = 0
write(2, "Traceback (most recent call last"..., 35) = -1 EBADF (Bad file descriptor)
futex(0x8b106d8, FUTEX_WAKE, 1)         = 0
time(NULL)                              = 1162681359
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=1323, ...}) = 0
socket(PF_FILE, SOCK_DGRAM, 0)          = 12
fcntl64(12, F_SETFD, FD_CLOEXEC)        = 0
connect(12, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
send(12, "<28>Nov  4 23:02:39 yum-updatesd"..., 90, MSG_NOSIGNAL) = 90
writev(5, [{"l\4\1\1\"\0\0\0\3\0\0\0_\0\0\0\1\1o\0\r\0\0\0/Updates"..., 112},
{"\35\0\0\0[Errno 9] Bad file descripto"..., 34}], 2) = 146
futex(0x8bdce10, FUTEX_WAKE, 1)         = 0

...so I tried again after commenting out the global exclude that I've added to
yum.conf:

exclude=gaim gaim-meanwhile

...that was enough to make yum-updatesd work again. It also worked (even with
the exclude still active) if run with the --no-fork switch instead of in the
background
Comment 3 Paul Howarth 2006-11-06 10:39:27 EST
I'm getting the same error message; I don't have any global excludes but I do
have a repo-specific exclude (to protect a locally-built package). Removing that
exclude makes this error go away, but is not an option for me.
Comment 4 Jeremy Katz 2006-11-06 16:15:50 EST
Okay, I think I've got this pretty happy now.  Can you grab
http://people.redhat.com/~katzj/yum-updatesd.py and replace
/usr/share/yum-cli/yumupd.py, restart yum-updatesd and see if it works better?
Comment 5 Esteban Xandri 2006-11-06 17:13:32 EST
I can confirm the same behavior on my system.

yumupd.py from comment #4 has 
a) fixed Bad file descriptor error (leaving exclude lines in repo files)
b) made puplet work (ie I was notified of security updates) 

Comment 6 Tim Clymo 2006-11-06 17:46:26 EST
Thanks - that's much better :)

Consumed a disturbingly large amount of CPU, but did function correctly even
with the global exclude in /etc/yum.conf
Comment 7 Simon Goodall 2006-11-07 04:55:51 EST
works for me.
Comment 8 Paul Howarth 2006-11-07 07:06:36 EST
Works for me too, with my exclude= entries.
Comment 9 Fedora Update System 2006-11-10 13:17:48 EST
yum-3.0.1-2.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 10 Fedora Update System 2006-11-16 18:09:17 EST
yum-3.0.1-2.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.
Comment 11 Matt Wette 2007-01-09 23:00:33 EST
I am having different symptoms but the bug title applies to me.  I have chosen
not to open a new bug report.  

I am running FC6, yum-updatesd-3.0.1-2.fc6.  I find that often puplet works for
a bit and then quits.  When updates are ready they are not being reported.  When
this happens I run the following python script and get a crash w/ traceback (which
I neglected to save!).
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
obj = bus.get_object("edu.duke.linux.yum", "/Updatesd")
res = obj.GetUpdateInfo(dbus_interface="edu.duke.linux.yum")
print res

I checked /usr/share/yum-cli/yumupd.py, which includes the following code
near line 424
   def updatesCheck(self):
        try:
            if not self.refreshUpdates():
                return
Now this routine is registered as a glib timeout callback.  The routine
is supposed to return True or False, but with no arg return returns Null,
which is not the same as False.  In addition, if the routine returns False,
then the callback will no longer be called.  Is this the intended behavior?

Currently the script above is working.  If I get broken behavior again I 
will submit the traceback.
Comment 12 Matt Wette 2007-01-09 23:16:24 EST
Here is the traceback which I get after I update and then run the above script:

Traceback (most recent call last):
  File "./chk1.py", line 5, in ?
    res = obj.GetUpdateInfo(dbus_interface="edu.duke.linux.yum")
  File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 25, in __call__
    ret = self._proxy_method (*args, **keywords)
  File "/usr/lib/python2.4/site-packages/dbus/proxies.py", line 102, in __call__
    reply_message = self._connection.send_with_reply_and_block(message, timeout)
  File "dbus_bindings.pyx", line 455, in
dbus_bindings.Connection.send_with_reply_and_block
dbus_bindings.DBusException: Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/dbus/service.py", line 341, in _message_cb
    _method_reply_return(connection, message, method_name, signature, *retval)
  File "/usr/lib/python2.4/site-packages/dbus/service.py", line 162, in
_method_reply_return
    iter.append(value)
  File "dbus_bindings.pyx", line 1081, in dbus_bindings.MessageIter.append
  File "dbus_bindings.pyx", line 1305, in dbus_bindings.MessageIter.append_array
IndexError: list index out of range

Is this normal behavior?
Comment 13 Jeremy Katz 2007-09-13 13:49:52 EDT
yum-updatesd has been completely rewritten for Fedora 8 and I can't get this to
happen with the new code.

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