[llvm-bugs] [Bug 24589] New: Target is keeping an open handle to executable during test runs

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 26 11:17:52 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24589

            Bug ID: 24589
           Summary: Target is keeping an open handle to executable during
                    test runs
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: zturner at google.com
                CC: llvm-bugs at lists.llvm.org
            Blocks: 21766
    Classification: Unclassified

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.

http://lists.llvm.org/pipermail/lldb-dev/2015-August/008073.html

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150826/210edc6d/attachment.html>


More information about the llvm-bugs mailing list