<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Target is keeping an open handle to executable during test runs"
   href="https://llvm.org/bugs/show_bug.cgi?id=24589">24589</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Target is keeping an open handle to executable during test runs
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lldb
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>lldb-dev@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zturner@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>21766
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When running many test cases in the test suite, all operations happen within a
single process.  Most test suites simply clean and rebuild the entire
executable with each test case which is currently necessary because a small
number of tests (the exact set of which nobody is quite sure of) require this,
and it is also necessary when switching between dsym and dwarf tests.

<a href="http://lists.llvm.org/pipermail/lldb-dev/2015-August/008073.html">http://lists.llvm.org/pipermail/lldb-dev/2015-August/008073.html</a>

On Windows, you can't delete the executable of a process that someone is
holding a handle to, and due to some kind of bug in Target, a handle is
sometimes behind held onto for reasons unknown.

This prevents all test cases after the first one to fail on the make clean
step.

For now, a very hackish workaround has been implemented which will cause -- on
Windows only -- Makefile.rules to use the builtin 'del' command instead of the
'rm' command that comes with GnuWin32.  'del' uses some kind of unknown
technique to delete the file anyway, and this seems to have no other side
effects.

Ultimately we need to fix

a) The test runner, so that it doesn't rebuild executables many times
unnecessarily

and

b) LLDB, so that it properly frees process handles when it's done with them.

But this is an ok workaround for now, as long as we have this bug filed
tracking the issue.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>