<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>30869</bug_id>
          
          <creation_ts>2009-10-28 09:55:08 -0700</creation_ts>
          <short_desc>commit-queue keeps crashing</short_desc>
          <delta_ts>2009-10-30 15:43:24 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>30084</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Seidel (no email)">eric</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>evan</cc>
    
    <cc>levin</cc>
    
    <cc>steveblock</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>158610</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-28 09:55:08 -0700</bug_when>
    <thetext>commit-queue keeps crashing

Exception while checking queue and bots: unknown encoding: idna. Sleeping until 2009-10-27 23:07:56 (5 mins).
&apos;import site&apos; failed; use -v for traceback
Traceback (most recent call last):
  File &quot;/Users/eseidel/Projects/WebKit/WebKitTools/Scripts/bugzilla-tool&quot;, line 33, in &lt;module&gt;
    import os
  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/os.py&quot;, line 49, in &lt;module&gt;
    import posixpath as path
  File &quot;/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/posixpath.py&quot;, line 14, in &lt;module&gt;
    import stat
ImportError: No module named stat

I think that&apos;s happening on re-exec.  I think it may only happen when I have the patch from bug 30098 applied locally.  Either way, it&apos;s disturbing.  It&apos;s happened 3 times at seeming random.  The commit-queue used to be rock-solid!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>158995</commentid>
    <comment_count>1</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-29 11:48:50 -0700</bug_when>
    <thetext>This appears to be a python bug.  I&apos;ve made a reduced test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>158996</commentid>
    <comment_count>2</comment_count>
      <attachid>42122</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-29 11:50:21 -0700</bug_when>
    <thetext>Created attachment 42122
Script demonstrating python 2.5.1 (or mac os x?) bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>158999</commentid>
    <comment_count>3</comment_count>
    <who name="Evan Martin">evan</who>
    <bug_when>2009-10-29 12:00:20 -0700</bug_when>
    <thetext>On Linux (the &quot;import site&quot; bits are when I&apos;m repeatedly hitting ctl-C).
Python 2.5.2


% ./t
...............................................................................&apos;import site&apos; failed; use -v for traceback
.........&apos;import site&apos; failed; use -v for traceback
............&apos;import site&apos; failed; use -v for traceback
...........&apos;import site&apos; failed; use -v for traceback
....................&apos;import site&apos; failed; use -v for traceback
..........</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159000</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-29 12:02:36 -0700</bug_when>
    <thetext>Bah.  I just don&apos;t know how exec works.  I didn&apos;t realize it carried file handles through.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159002</commentid>
    <comment_count>5</comment_count>
      <attachid>42123</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-29 12:04:02 -0700</bug_when>
    <thetext>Created attachment 42123
Patch v1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159005</commentid>
    <comment_count>6</comment_count>
      <attachid>42123</attachid>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-10-29 12:10:07 -0700</bug_when>
    <thetext>Comment on attachment 42123
Patch v1

File handle leaks = bad.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159015</commentid>
    <comment_count>7</comment_count>
      <attachid>42123</attachid>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-29 12:51:32 -0700</bug_when>
    <thetext>Comment on attachment 42123
Patch v1

Going to make a better patch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159384</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 11:42:03 -0700</bug_when>
    <thetext>It would appear that even with my fix, Python itself is still leaking 3 file descriptors on every exec():

Python    57958 eseidel   58r     REG       14,2    144580    466329 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HITo
olbox.rsrc
Python    57958 eseidel   59r     REG       14,2    490410   9627854 /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Engl
ish.lproj/Localized.rsrc
Python    57958 eseidel   60r     REG       14,2     86770    481232 /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat-mac/errors.rsrc.df.rsrc

I expect this may be a mac-only problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159448</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 14:33:15 -0700</bug_when>
    <thetext>I wrote a function:

def check_for_file_leak(message):
    log(&quot;before %s&quot; % message)
    lsof_output = SCM.run_command([&apos;lsof&apos;, &apos;-p&apos;, str(os.getpid())])
    if lsof_output.count(&apos;HIToolbox&apos;):
        log(message)
        error(lsof_output)
    log(&quot;after %s&quot; % message)

and sprinkled it throughout the code.

It seems these 3 leaking files are opened by mechanize during:

self.browser = Browser()

in Bugzilla.__init__()

I&apos;ve not tried to trace through the mechanize code to see where the leaks come from.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159449</commentid>
    <comment_count>10</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2009-10-30 14:38:05 -0700</bug_when>
    <thetext>Why don&apos;t we fork and exec and then throw away the old version of ourselves?  If that doesn&apos;t work, can we use a trampoline executable?  Tracking down every leak seems fragile.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159456</commentid>
    <comment_count>11</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 14:41:12 -0700</bug_when>
    <thetext>Here is a stand-alone version of the same function:

def check_for_file_leak(message):
    import os
    import sys
    import subprocess
    print &gt;&gt; sys.stderr, &quot;before %s&quot; % message
    process = subprocess.Popen([&apos;lsof&apos;, &apos;-p&apos;, str(os.getpid())], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    lsof_output = process.communicate()[0].rstrip()
    if lsof_output.count(&apos;HIToolbox&apos;):
        print &gt;&gt; sys.stderr, message
        print &gt;&gt; sys.stderr, lsof_output
        exit(1)
    print &gt;&gt; sys.stderr, &quot;after %s&quot; % message</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159457</commentid>
    <comment_count>12</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 14:41:47 -0700</bug_when>
    <thetext>We could definitely use a trampoline executable.  That may be the simplest solution.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159460</commentid>
    <comment_count>13</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 14:43:21 -0700</bug_when>
    <thetext>bugzilla-tool commit-queue
is already a trampoline executable of sorts.  It&apos;s just no longer a shell script, instead it&apos;s implemented in bugzilla-tool itself.

I think I might just get rid of the &quot;don&apos;t need to restart bugzilla-tool to notice committers.py changes&quot; feature for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>159492</commentid>
    <comment_count>14</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-10-30 15:43:24 -0700</bug_when>
    <thetext>Rolled out the change and re-opened bug 30084.

*** This bug has been marked as a duplicate of bug 30084 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>42122</attachid>
            <date>2009-10-29 11:50:21 -0700</date>
            <delta_ts>2009-10-29 11:50:21 -0700</delta_ts>
            <desc>Script demonstrating python 2.5.1 (or mac os x?) bug</desc>
            <filename>reexec_test.py</filename>
            <type>text/x-python-script</type>
            <size>235</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">IyEvdXNyL2Jpbi9lbnYgcHl0aG9uCgppbXBvcnQgb3MKaW1wb3J0IHN5cwoKIyBMZWFrIGEgZmls
ZSBoYW5kbGUKbG9nX2ZpbGUgPSBvcGVuKCdkdW1teV9sb2cudHh0JywgJ2ErJykKIyBsb2dfZmls
ZS5jbG9zZSgpICMgSWYgd2UgY2xvc2UgdGhlIGhhbmRsZSwgaXQgbmV2ZXIgY3Jhc2hlcy4KCnBy
aW50ICIuIiwKc3lzLnN0ZG91dC5mbHVzaCgpCm9zLmV4ZWN2cChzeXMuYXJndlswXSwgc3lzLmFy
Z3ZbOl0pCg==
</data>

          </attachment>
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>42123</attachid>
            <date>2009-10-29 12:04:02 -0700</date>
            <delta_ts>2009-10-29 12:51:31 -0700</delta_ts>
            <desc>Patch v1</desc>
            <filename>bug-30869-20091029120401.patch</filename>
            <type>text/plain</type>
            <size>1470</size>
            <attacher name="Eric Seidel (no email)">eric</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdFRvb2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