Bug 213622 - yum-updatesd fail to get update info
Summary: yum-updatesd fail to get update info
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: yum
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: James Antill
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-11-02 11:34 UTC by simon
Modified: 2014-01-21 22:55 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-13 17:49:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description simon 2006-11-02 11:34:08 UTC
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 19:26:20 UTC
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 23:41:34 UTC
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 15:39:27 UTC
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 21:15:50 UTC
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 22:13:32 UTC
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 22:46:26 UTC
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 2006-11-07 09:55:51 UTC
works for me.

Comment 8 Paul Howarth 2006-11-07 12:06:36 UTC
Works for me too, with my exclude= entries.

Comment 9 Fedora Update System 2006-11-10 18:17:48 UTC
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 23:09:17 UTC
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-10 04:00:33 UTC
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-10 04:16:24 UTC
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 17:49:52 UTC
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.