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

Race condition in meta_request? #38

Closed
lesliev opened this issue Feb 8, 2013 · 2 comments
Closed

Race condition in meta_request? #38

lesliev opened this issue Feb 8, 2013 · 2 comments
Assignees
Labels

Comments

@lesliev
Copy link

lesliev commented Feb 8, 2013

We are occasionally seeing this error in production mode:
Errno::ENOENT: No such file or directory - /...(rails_root).../tmp/data/meta_request/f543060fed4687f802dc62fbd61ca89f.json

the error is on this line:
https://github.com/dejan/rails_panel/blob/master/meta_request/lib/meta_request/storage.rb#L23

I don't know how the files are disappearing between the process seeing them and deleting them but I suppose its safe to assume that files in /tmp can go away at any time. Perhaps you could add a "rescue nil" to that line?

@lesliev
Copy link
Author

lesliev commented Feb 8, 2013

Pardon, the "Dir" sees the file, the File.stat no longer sees it. So the fix is a bit harder than a rescue nil. But suffice to say that both File.stat and FileUtils.rm could possibly throw an ENOENT.

@ghost ghost assigned dejan Feb 24, 2013
dejan added a commit that referenced this issue Mar 25, 2013
@dejan
Copy link
Owner

dejan commented Mar 25, 2013

@lesliev thanks for the issue report and your comment. Fixed in the new release due today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants