ppc.koji.fedoraproject.org back online

Josh Boyer jwboyer at gmail.com
Mon Jan 10 14:48:51 EST 2011


On Sat, Jan 8, 2011 at 7:59 AM, Josh Boyer <jwboyer at gmail.com> wrote:
> On Jan 7, 2011 5:42 PM, "Adrian Reber" <adrian at lisas.de> wrote:
>>
>> On Sat, Jan 01, 2011 at 10:18:07AM -0500, Josh Boyer wrote:
>> > >> >> Found another problem:
>> > >> >>
>> > >> >> Traceback (most recent call last):
>> > >> >>   File "/usr/sbin/kojid", line 1437, in runTask
>> > >> >>     response = (handler.run(),)
>> > >> >>   File "/usr/sbin/kojid", line 1513, in run
>> > >> >>     return self.handler(*self.params,**self.opts)
>> > >> >>   File "/usr/sbin/kojid", line 1934, in handler
>> > >> >>     h = self.readSRPMHeader(srpm)
>> > >> >>   File "/usr/sbin/kojid", line 2007, in readSRPMHeader
>> > >> >>     h = koji.get_rpm_header(fo)
>> > >> >>   File "/usr/lib/python2.6/site-packages/koji/__init__.py", line
>> > >> >> 787, in get_rpm_header
>> > >> >>     hdr = ts.hdrFromFdno(fo.fileno())
>> > >> >>   File "/usr/lib64/python2.6/site-packages/rpm/transaction.py",
>> > >> >> line 154, in hdrFromFdno
>> > >> >>     raise rpm.error("error reading package header")
>> > >> >> error: error reading package header
>> > >> >>
>> > >> >> http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=114707
>> > >> >>
>> > >> >> Sounds like:
>> > >> >> http://lists.fedoraproject.org/pipermail/buildsys/2010-August/003224.html
>> > >>
>> > >> Yes, it does sound like that.  I would have thought it to be fixed in
>> > >> koji 1.6.0 already though.  Maybe not.  Dan, do you know if the
>> > >> workaround is still needed in 1.6?
>> > >
>> > > Seems it's still needed, but I didn't try to push it to upstream as
>> > > the
>> > > workaround is rather a dirty hack. I'm surprised it should be needed
>> > > in
>> > > the ppc koji where the builder and hub are on the same local network
>> > > AFAIK.
>> >
>> > OK.  I'll try to patch them soon.  I've seen it on machines elsewhere
>> > that are sitting on the same switch even, so apparently it's not that
>> > uncommon?
>>
>> Did you have time to apply that patch? I have seen this now with glibc
>> and gdb and I think, if this patch actually solves the problem, I need
>> it to continue with the f15 rebuilds.
>>
>
> I am out of town this weekend.  I will get to it Monday first thing.  Dennis
> or one of the other admins might be able to do it as well.

OK, I've patched ppc-comm02 and ppc-comm01.  For the record, I had to
tweak the original patch slightly to apply to 1.6.0.  It's below.

josh

---

Index: koji/builder/kojid
===================================================================
--- koji.orig/builder/kojid
+++ koji/builder/kojid
@@ -48,6 +48,7 @@ import time
 import traceback
 import xmlrpclib
 import zipfile
+import tempfile
 import Cheetah.Template
 from ConfigParser import ConfigParser
 from fnmatch import fnmatch
@@ -800,7 +801,16 @@ class BuildTask(BaseTaskHandler):
         relpath = "work/%s" % srpm
         opts = dict([(k, getattr(self.options, k)) for k in 'topurl','topdir'])
         fo = koji.openRemoteFile(relpath, **opts)
-        h = koji.get_rpm_header(fo)
+
+        # use a temporary file to workaround an issue where urllib2 is not able
+        # to send enough data in time to the rpm header decode function.
+        tmp = tempfile.TemporaryFile()
+        tmp.write(fo.read(1000 * 1000))
+        tmp.seek(0)
+
+        h = koji.get_rpm_header(tmp)
+        tmp.close()
+
         fo.close()
         if h[rpm.RPMTAG_SOURCEPACKAGE] != 1:
             raise koji.BuildError, "%s is not a source package" % srpm



More information about the Fedora-ppc mailing list