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

x/playground: TempFile reseeds every time after the 10th #8873

Closed
gopherbot opened this issue Oct 6, 2014 · 3 comments
Closed

x/playground: TempFile reseeds every time after the 10th #8873

gopherbot opened this issue Oct 6, 2014 · 3 comments

Comments

@gopherbot
Copy link

by ben.lubar:

Before filing a bug, please check whether it has been fixed since the
latest release. Search the issue tracker and check that you're running the
latest version of Go:

Run "go version" and compare against
http://golang.org/doc/devel/release.html  If a newer version of Go exists,
install it and retry what you did to reproduce the problem.

Thanks.

What does 'go version' print?

go version go1.3.3 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

http://play.golang.org/p/rzrTSXGysT

1. Create 11 files with ioutil.TempFile
2. Without deleting the files, re-run the program with the same PID and system clock.
This is easiest to do by simply running it on the playground.

What happened?

TempFile loops 10000 times and then returns:

open test054003078: File exists

What should have happened instead?

A twelfth file should have been created.

Please provide any additional information below.
@ianlancetaylor
Copy link
Contributor

Comment 1:

I'm not sure this needs to be fixed anywhere except the playground.

Labels changed: added repo-main, release-none.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@ysmolski
Copy link
Member

I do not think that it should be fixed in playground as well. Right now user can create thousands of temp files without any problem: https://play.golang.org/p/eoPJcGjaeZt

/cc @andybons

@andybons andybons changed the title playground: TempFile reseeds every time after the 10th x/playground: TempFile reseeds every time after the 10th Mar 13, 2018
@andybons
Copy link
Member

Agreed. Since the sandbox cleans up any files created (so there's no risk of data leakage), this problem is extremely specific to the playground and can be easily worked around.

@golang golang locked and limited conversation to collaborators Mar 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants