Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target is keeping an open handle to executable during test runs #24963

Open
llvmbot opened this issue Aug 26, 2015 · 0 comments
Open

Target is keeping an open handle to executable during test runs #24963

llvmbot opened this issue Aug 26, 2015 · 0 comments
Labels
bugzilla Issues migrated from bugzilla lldb

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented Aug 26, 2015

Bugzilla Link 24589
Version unspecified
OS Windows NT
Blocks #22140
Reporter LLVM Bugzilla Contributor

Extended Description

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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla lldb
Projects
None yet
Development

No branches or pull requests

1 participant