Skip to content

--threads=0 leads to an assertion violation #4927

Description

@eric-wieser

Prerequisites

Please put an X between the brackets as you perform the following steps:

Description

As of Lean 4.9.0, --threads=0 gives an assertion violation.

Steps to Reproduce

  1. Run lean --threads=0 <(echo "example : True := by simp")

Expected behavior: Either silent, or complains that threads=0 is illegal

Actual behavior:

LEAN ASSERTION VIOLATION
File: /home/runner/work/lean4/lean4/src/runtime/object.cpp
Line: 1053
g_task_manager
'unreachable' code was reached

from

lean4/src/runtime/object.cpp

Lines 1052 to 1053 in daa2218

extern "C" LEAN_EXPORT obj_res lean_io_promise_new(obj_arg) {
lean_always_assert(g_task_manager);

Versions

v4.9.0 onwards

Additional Information

[Additional information, configuration or data that might be necessary to reproduce the issue]

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-lowWe are not planning to work on this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions