[clang] [clang][MBD] set up module build daemon infrastructure (PR #67562)

Steven Wu via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 5 14:00:43 PDT 2023


https://github.com/cachemeifyoucan commented:

I haven't read the PR in details but one thing we found difficult to do is how to write a test for daemon spawning logic, because if anything went wrong, you left an unbounded daemon process on CI node.

The strategy in this PR (try to kill it after the test finishes) definitely doesn't work because 1. if anything failed, you will not hit kill. 2. you are going to kill the daemon from a different test that runs in parallel.

Other things we tried and know didn't work:
* explicitly start/stop daemon with command: you might not hit stop due to failure
* have a timeout and let the daemon terminate after that: you can have some infinite loop that prevents daemon cleanup

What we ended up is to have a server process that spawns clang job that needs to talk to it. We eliminated the run off daemons but we don't really have coverage for how clang spawns a daemon when needed.

https://github.com/llvm/llvm-project/pull/67562


More information about the cfe-commits mailing list