Skip to content

Add test for "Infinite recursion" in Job prim ordering#1708

Open
Sam May (ag-eitilt) wants to merge 1 commit intomasterfrom
prim-job-launch-test
Open

Add test for "Infinite recursion" in Job prim ordering#1708
Sam May (ag-eitilt) wants to merge 1 commit intomasterfrom
prim-job-launch-test

Conversation

@ag-eitilt
Copy link
Copy Markdown
Collaborator

@ag-eitilt Sam May (ag-eitilt) commented Sep 5, 2025

Reproducer for #1670. Specifically, I haven't been able to get a MVP which shows the full "Infinite recursion..." error, but by comparing testPassLaunch and testAbruptLaunch, we can see the conditions for that recursion in the latter returning an unresolved <future> without any wrapping Pass or Fail1 -- my guess is that it's a future which escapes the scheduler by being returned unresolved from another future, and so on infinitely, and specific cases are able to unwrap enough of them to trigger the loop detection.

Remote Cache requested, but unavailable. Continuing anyways. Why: 'job terminated with non-zero exit code'
Pass "Good launch test passed."
$ ../wake/bin/wake testAbruptLaunch
Remote Cache requested, but unavailable. Continuing anyways. Why: 'job terminated with non-zero exit code'
<future>

I don't think this is something we want to merge until it's fixed, but this test case is going to be helpful if we ever try to address this, so we either leave this PR somewhere we'll be able to find it later, or maybe we do merge it in the mean time after switching to a fail.sh script, and document that we eventually want the test to pass instead but that it's a known backburnered failure until then.

This whole saga is connected to #160, and as we found last year that detection does definitely work, so I don't know why it's able to escape through this logic; it's not the Wake version since I was running into the same result on the 44.0.4 tag where the previous known problem was happening. Also, I've strangely suddenly started hitting the job.cpp:1236 assert during the should-fail test just before pushing the branch, when everything I did up until the final preparations had it returning the expected Pass "{msg}".

$ wake testFailLaunch
[error] : Requirement job->state == 0 failed at src/runtime/job.cpp:1236
[error] : 

Footnotes

  1. The lack of a wrapper is a visible sign that the execution of the test case never completed; with a bit more indirection I can get the output to print Pass <future>, for example, where it's clearly reaching the end of execution but just not finalizing the block's return value.

@ag-eitilt
Copy link
Copy Markdown
Collaborator Author

Note to self: This test should live alongside the similar ones in tests/standard-library/runner*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant