On 4/7/07, Josh Triplett <[EMAIL PROTECTED]> wrote:
Package: reportbug
Version: 3.34.2
Severity: important
File: /usr/bin/reportbug

On my system, after I report a bug with reportbug, I find an "apt-cache
dumpavail" process on my system burning 100% CPU (and thus pushing my CPU
frequency to maximum and making the fan come on).

That's odd.  I saw this during testing but since some code tweaks I
haven't seen it since.

Try this patch and see if it fixes the issue:

--- reportbug.py        2 Apr 2007 16:15:09 -0000       1.35.2.15
+++ reportbug.py        8 Apr 2007 00:39:53 -0000
@@ -363,6 +363,9 @@

    def next(self):
        if self.popenob.returncode:
+            self.fp.close()
+            self.popenob.wait()
+            self.popenob = self.fp = None
            raise StopIteration

        chunk = u''
@@ -375,8 +378,19 @@
        #    return chunk

        self.fp.close()
+        self.popenob.wait()
+        self.popenob = self.fp = None
        raise StopIteration

+    def __del__():
+        if self.fp:
+            self.fp.close()
+        if self.popenob:
+            try:
+                self.popenob.wait()
+            except:
+                pass
+
def get_dpkg_database():
    if os.path.exists(STATUSDB):
        fp = subprocess.Popen(('cat', STATUSDB), stdout=subprocess.PIPE)


Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to