Skip to content

Add atomic write_env_usage test. Fix write_env_usage #2732

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

Closed

Conversation

IanButterworth
Copy link
Member

@IanButterworth IanButterworth commented Sep 19, 2021

#2661 intended to fix #2633 but introduced different failure modes and was evidently missing tests.

Update: This PR

@IanButterworth

This comment has been minimized.

@IanButterworth IanButterworth force-pushed the ib/atomic_usage_test branch 4 times, most recently from 6464728 to cb288d3 Compare September 19, 2021 16:43
@IanButterworth
Copy link
Member Author

Might not be ready for review yet. Just trying to get every platform failing first

@DilumAluthge
Copy link
Member

Ooof. Sorry, I jumped the gun!

@DilumAluthge DilumAluthge removed the request for review from KristofferC September 19, 2021 23:38
@IanButterworth
Copy link
Member Author

IanButterworth commented Sep 20, 2021

I think this is in good shape now. For some reason some ubuntu instances survive 1000 iterations, but the rest fail after 1 or 2

@IanButterworth IanButterworth force-pushed the ib/atomic_usage_test branch 2 times, most recently from 038d4ad to cb2ed67 Compare September 25, 2021 20:08
@IanButterworth
Copy link
Member Author

IanButterworth commented Sep 25, 2021

Ok, the test seems stable across all platforms and is now marked as @test_broken.

Should I merge this as-is, or keep this test on the shelf if someone comes up with a fix?

cc. @KristofferC @StefanKarpinski

Edit: Maybe it should stay on the shelf. Those windows hangs aren't good

@IanButterworth IanButterworth changed the title Add atomic usage file test Add atomic write_env_usage test. Fix write_env_usage Sep 29, 2021
@StefanKarpinski
Copy link
Member

I'm generally in favor of merging broken tests rather than leaving PRs around and then opening an issue to track fixing the broken tests. Of course, unless the tests are reliably broken and don't hang, that's a bad idea, but if the broken tests aren't flaky, then I'd merge them.

@IanButterworth
Copy link
Member Author

Ok. To be clear, this PR now adds the test and actually fixes write_env_usage, but uncovered a similar registry bug #2746

So that would be the test failure that would be merged with this.

@fredrikekre
Copy link
Member

Can we vendor https://github.com/vtjnash/Pidfile.jl instead?

@IanButterworth
Copy link
Member Author

Seems like a good idea to me and it's not much code. @vtjnash have you ever considered absorbing Pidfile into Base?

@vtjnash
Copy link
Member

vtjnash commented Oct 2, 2021

Sure, that seems great

@IanButterworth
Copy link
Member Author

Superseded by #2793

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.

Race condition in writing manifest_usage.toml?
5 participants