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

Avoids clearing stale weak entries from critical code segments. #2780

Merged
merged 1 commit into from Nov 11, 2022

Conversation

raphw
Copy link
Member

@raphw raphw commented Oct 30, 2022

This reduces the probability of checking for mocked from from the mock-checking code what can lead to infinitive loops. Fixes #2767.

…reduces the propability of checking for mocked from from the mock-checking code what can lead to infinitive loops.
@raphw raphw requested a review from TimvdLippe October 30, 2022 16:31
@TimvdLippe
Copy link
Contributor

Is it possible to write a test for this or is that infeasible?

@raphw
Copy link
Member Author

raphw commented Oct 31, 2022

I would assume that it already fails when building on Java 19 without this fix.

@ascopes
Copy link
Contributor

ascopes commented Nov 5, 2022

@TimvdLippe can confirm this fixes the deadlocking issues when I build this PR locally, versus 4.8.1 which immediately deadlocks for me.

TimvdLippe added a commit that referenced this pull request Nov 11, 2022
To verify that #2780 will resolve running on Java 19
@TimvdLippe
Copy link
Contributor

I wanted to verify that master on Java 19 is broken (#2788) but discovered we need Gradle 7.6 for that. Not sure if we should wait for that, or release this without a regression test?

@raphw
Copy link
Member Author

raphw commented Nov 11, 2022

I think we can just release this. @ascopes - could you confirm that this branch fixes your issue?

@ascopes
Copy link
Contributor

ascopes commented Nov 11, 2022

@raphw I ran the tests 20 times over with it on Java 19 and saw no problems... Without the fix it was hanging within the first or second repeat.

Looks fixed to me!

@TimvdLippe TimvdLippe merged commit 0052e2f into main Nov 11, 2022
@ascopes
Copy link
Contributor

ascopes commented Nov 13, 2022

Thanks for fixing this! Is there a potential date for when this will be released, out of curiosity?

@ascopes ascopes mentioned this pull request Nov 14, 2022
@TimvdLippe TimvdLippe deleted the avoid-expunction-in-critical-segments branch November 14, 2022 18:48
@TimvdLippe
Copy link
Contributor

@ascopes 4.9.0 will be published today: https://github.com/mockito/mockito/releases/tag/v4.9.0

@ascopes
Copy link
Contributor

ascopes commented Nov 14, 2022

@TimvdLippe thats great, thank you!

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.

[BUG] Inline bytecode transformer randomly deadlocking on Java 19
3 participants