Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#7606: process daemon's stdout to avoid lockup #7721

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

sdedic
Copy link
Member

@sdedic sdedic commented Sep 2, 2024

Accidentally (try-and-error) I discovered that when the daemon's output stream is not processed, the daemon hangs on reading the stdin even though stdin is empty. So I've attached the piped output stream + reading daemon unconditionally, so that gradle daemon correctly processes the empty stdin.

Closes #7606.

After testing, this can be eventually cherrypicked to delivery if @ebarboni agrees.

@sdedic sdedic added the Gradle [ci] enable "build tools" tests label Sep 2, 2024
@sdedic sdedic added this to the NB24 milestone Sep 2, 2024
@sdedic sdedic self-assigned this Sep 2, 2024
@mbien
Copy link
Member

mbien commented Sep 2, 2024

After testing, this can be eventually cherrypicked to delivery if @ebarboni agrees.

this would need to target delivery right away. We can't cherry pick from master since this would cause it to show up in the release notes of two releases.

also if we test / review, we should test it on the delivery branch, not the master branch which diverged already and then switch last minute.

@ebarboni
Copy link
Contributor

ebarboni commented Sep 3, 2024

@sdedic would be perfect based on delivery

@mbien mbien added the ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) label Sep 3, 2024
@mbien
Copy link
Member

mbien commented Sep 3, 2024

@sdedic can you a) rebase this to delivery and change target and milestone, or b) confirm that this is meant for NB 24

there is some confusion since the issue has still NB 23 milestone.

@sdedic
Copy link
Member Author

sdedic commented Sep 3, 2024

yes, I can rebase it if the issue is seen as "want fix" in NB23.

@ebarboni
Copy link
Contributor

ebarboni commented Sep 3, 2024

If it's ok for you lets do this.

@mbien mbien removed their request for review September 3, 2024 17:11
@sdedic sdedic force-pushed the gradle/tooling-blocked-stdin branch from 71d7936 to 220f197 Compare September 4, 2024 06:52
@sdedic sdedic changed the base branch from master to delivery September 4, 2024 06:52
@sdedic sdedic modified the milestones: NB24, NB23 Sep 4, 2024
@sdedic
Copy link
Member Author

sdedic commented Sep 4, 2024

Rebased onto delivery, milestone changed.

@ebarboni
Copy link
Contributor

ebarboni commented Sep 4, 2024

LGTM, not the best gradle user but no issue for me

@mbien
Copy link
Member

mbien commented Sep 5, 2024

just as general comment since this PR is linked to close the issue: the infinite loop during priming would have to be addressed separately. A loop is not a good failure mode, it should be caught somewhere / propagated and stop with an error.

@sdedic
Copy link
Member Author

sdedic commented Sep 5, 2024

just as general comment since this PR is linked to close the issue: the infinite loop during priming would have to be addressed separately. A loop is not a good failure mode, it should be caught somewhere / propagated and stop with an error.

The user reported an infinite loop. Are you sure that there's an infinite loop in fact ? What I saw during debugging / investigation was not a infinitely repeated attempt to load a project, but rather a stuck project load, that blocks all other loads (all gradle project loads are serialized to a RP).

@mbien
Copy link
Member

mbien commented Sep 5, 2024

@sdedic the user mentioned several times that the symptom was an "infinite loop" e.g. #7606 (comment)

I haven't tried to reproduce the original issue so I don't know.

@sdedic
Copy link
Member Author

sdedic commented Sep 5, 2024

@sdedic the user mentioned several times that the symptom was an "infinite loop" e.g. #7606 (comment)

I haven't tried to reproduce the original issue so I don't know.

OK, I'll perhaps leave this open for someone to investigate more. I could not reproduce anything that actually is a loop. The user might be mistaken and mislead by the fact that a message "loading..." was stuck in the status line indefinitely, or the report might be incaccurately worded, but I cannot prove it and will not bother to prove the otherwise.

Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run a minimal test with this one. Gradle Daemons tends to get stuck after exiting the IDE. It seem this one has helped on that as well.

@ebarboni
Copy link
Contributor

ebarboni commented Sep 6, 2024

merging this. waiting for sync pr and baking rc3

@ebarboni ebarboni merged commit fceae80 into apache:delivery Sep 6, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Gradle [ci] enable "build tools" tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Netbeans 22 does not load a 8.9 gradle wrapper in project. Infinite loop.
4 participants