`lake comparator` and bundled `nanoda_bin` on Windows: unspawnable `which` path, 1 MiB stack
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 42/100
Direzione di ricerca
Start with src/lake/Lake/CLI/Check.lean and trace how whichExe and bundledKernels select the nanoda executable for Windows. Then inspect how nanoda_bin.exe is built and compare its PE stack reserve with lean.exe and leanchecker.exe. Done means the comparator can start the bundled executable on Windows and large exports no longer overflow its main-thread stack.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Test your test case against the latest nightly release.
- When reporting a perceived soundness bug: Does it affect
lake check --paranoid? (not a soundness bug)
Description
With leanprover/lean4:v4.37.0-rc1 on Windows 11 (x86_64), lake comparator --inadvisably-no-sandbox on a project with "enable_nanoda": true cannot run nanoda, and the bundled nanoda_bin.exe overflows its stack on large exports when run by hand.
-
whichlookup.whichExeinsrc/lake/Lake/CLI/Check.leanrunswhich. On Windows that only exists when Git'susr\binis onPATH(Git\cmdalone is not enough), and what it prints is an MSYS path without the extension, for example/c/Users/<user>/.elan/toolchains/leanprover--lean4---v4.37.0-rc1/bin/nanoda_bin. Comparator then fails to start it:Running nanoda kernel on solution Error while interacting with nanoda kernel error: Error while interacting with nanoda kernel: no such file or directory (error code: 4058) file: /c/Users/<user>/.elan/toolchains/leanprover--lean4---v4.37.0-rc1/bin/nanoda_binWith
v4.35.0the same step failed withthe system cannot find the file specified. (error code: 2). Onmasterthis is still the case:enable_nanodainserts the bare namenanoda_bin, whilebundledKernelsbuilds the toolchain path withexeExtension; using that path, or not passing thewhichoutput to the spawn on Windows, would avoid it. -
Stack size of
nanoda_bin.exe. Its PE header reserves 1 MiB for the main thread (SizeOfStackReserve), whilelean.exeandleanchecker.exereserve 100 MiB. On a 5.2 GB export it overflowed after about 6 minutes; a copy with onlySizeOfStackReservechanged to 2 GiB checked the whole export (209,639 declarations, no errors). This is the main thread, separate from the worker-thread stacks discussed in #16290.
Steps to reproduce
- On Windows, with Git for Windows installed and its
cmdandusr\bindirectories onPATH, take a project whosecomparator.jsonhas"enable_nanoda": true. - Export the challenge and solution with
leanexport, then runlake comparator --inadvisably-no-sandbox --challenge-from-export=… --solution-from-export=….
Expected: comparator starts nanoda_bin.exe.
Actual: the error above, and comparator exits 1.
Versions
Lean (version 4.37.0-rc1, x86_64-w64-windows-gnu, commit 0b77e12952ad39077d80d8bd6b66d601f225c321, Release), Windows 11 Home 10.0.26200. Also seen with v4.35.0.
🤖 Generated with Claude Code
- Lingua principale
- Lean
- Stelle
- 10.3k
- Fork
- 1.1k
- Merge medio
- 16h 45m
- PR unite (30g)
- 361
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di leanprover/lean4
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
leanprover/lean4#16876 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
leanprover/lean4#16842 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
leanprover/lean4#16841 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
leanprover/lean4#16840 ·
I maintainer di solito rispondono entro 1 giorno
-
doc: stray "public" in Bool and HEq documentationForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
leanprover/lean4#16825 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di leanprover/lean4
Issue simili
-
Thai project names become 'project', 'project-2'… (slug keeps ASCII only)Forse già presa @mastel2 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
storytold/craft-anything#2538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
compiler-explorer/compiler-explorer#9738 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
openfoodfacts/openfoodfacts-python#573 ·
I maintainer di solito rispondono entro 2 giorni
-
Rasterio reads over HTTPS do not send the Earthdata token and return 500 "HTTP response code: 404"Apertacredentials rasterio
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
developmentseed/titiler-cmr#359 ·
I maintainer di solito rispondono entro 1 giorno