lake sometimes hangs on NetBSD
Nobody has claimed this yet.
- Dominant language
- Lean
- Stars
- 9.2k
- Forks
- 990
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 175
Description
Prerequisites
- Check that your issue is not already filed:
https://github.com/leanprover/lean4/issues - Reduce the issue to a minimal, self-contained, reproducible test case.
Avoid dependencies to Mathlib or Batteries. - Test your test case against the latest nightly release, for example on
https://live.lean-lang.org/#project=lean-nightly
(You can also use the settings there to switch to “Lean nightly”)
Description
After packaging lean 4.32.1, I've been building it repeatedly in a clean environment. Sometimes (1 out of 3? 5? times) during a build, lake will hang.
I've attached a debugger once, reading the backtrace there is a process hanging in pthread_join, one in fread, the others are idle in pthread_cond_timedwait.
I can only see one fread() in the code, in src/runtime/io.cpp - perhaps this code should have a timeout (i.e. use select or poll and non-blocking reads.
Context
n/a
Steps to Reproduce
- Build lean4 4.32.1 repeatedly.
- be unlucky
Expected behavior: [Clear and concise description of what you expect to happen]
lake should not hang.
Actual behavior: [Clear and concise description of what actually happens]
lake sometimes does hang.
Versions
4.32.1
NetBSD 11.99.7/x86_64
Additional Information
n/a
Impact
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/runtime/io.cpp and the reported backtraces involving fread, pthread_join, and pthread_cond_timedwait. Repeatedly build Lean 4.32.1 on NetBSD 11.99.7 to investigate the intermittent hang; done means lake completes without hanging during repeated clean builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100