leanprover / leanprover/lean4

`lake exe` doesn't print anything if executable segfaults

Open
#9,327 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Lake P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

[Edit: initially I thought that the executable wasn't being executed, but that isn't the case, so some of the comments to this issue may seem confusing.]

I'm using the released v4.22.0-rc3 toolchain with Mathlib https://github.com/leanprover-community/mathlib4/commit/47f3e6393d35a7c9579fda04fa07bc81aa18a4b9. If I use the small diff

diff --git a/Mathlib.lean b/Mathlib.lean
index 250d4f05c9..ee436868ae 100644
--- a/Mathlib.lean
+++ b/Mathlib.lean
@@ -2826,7 +2826,6 @@ import Mathlib.Computability.Reduce
 import Mathlib.Computability.RegularExpressions
 import Mathlib.Computability.TMComputable
 import Mathlib.Computability.TMConfig
-import Mathlib.Computability.TMToPartrec
 import Mathlib.Computability.Tape
 import Mathlib.Computability.TuringDegree
 import Mathlib.Computability.TuringMachine

to unbreak the build and run lake exe mathlib_test_executable, the executable segfaults but lake prints nothing to indicate this, even with --verbose.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The reported entry point is lake exe, using lake exe mathlib_test_executable; reproduce that command with the v4.22.0-rc3 toolchain and the supplied Mathlib import removal. Trace the executable-failure path, including --verbose, and consider the work complete when a segfault produces an informative diagnostic.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.