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

Relax timestamp check in precompiled images? #20837

Closed
tanmaykm opened this issue Feb 28, 2017 · 4 comments · Fixed by #20840
Closed

Relax timestamp check in precompiled images? #20837

tanmaykm opened this issue Feb 28, 2017 · 4 comments · Fixed by #20840
Labels
compiler:precompilation Precompilation of modules

Comments

@tanmaykm
Copy link
Member

I am running into an issue when I transfer precompiled Julia packages to a GlusterFS volume.
The loader always finds the precompiled files stale. I see this:

INFO: JL_DEBUG_LOADING: Rejecting stale cache file /mnt/pkgdefault/.julia/lib/v0.5/JSON.ji (mtime 1.4881987029958088e9) because fil
e /mnt/pkgdefault/.julia/v0.5/JSON/src/JSON.jl (mtime 1.488198702995808e9) has changed.                                            
INFO: Recompiling stale cache file /mnt/pkgdefault/.julia/lib/v0.5/JSON.ji for module JSON. 

It seems to be due to timestamp precision on GlusterFS being different.

I think timestamp precision can be different for different filesystems, 1 sec being the lowest among the recent systems. Would it be better to relax the timestamp checking condition to 1 sec? (that is, checking floor(ftime) != floor(ftime_req) here instead).

Ref. #13606: similar issue with docker

@tkelman
Copy link
Contributor

tkelman commented Feb 28, 2017

Changes that happen in less than a second should still trigger recompilation, so no I don't think relaxing the check in that way is an appropriate fix.

@tanmaykm
Copy link
Member Author

I wonder if there is a way to get the precision supported by the underlying filesystem. The check could then use that information. No?

@tkelman
Copy link
Contributor

tkelman commented Feb 28, 2017

Dunno. Only one of the values gets truncated, right? Extending the way the docker check was done to a different allowed level of truncation should be fine and wouldn't be that likely to have false positives. Just don't take the floor of both sides.

@tanmaykm
Copy link
Member Author

Yeah, sounds good. Will send a PR.

@kshyatt kshyatt added the compiler:precompilation Precompilation of modules label Feb 28, 2017
tanmaykm added a commit to tanmaykm/julia that referenced this issue Feb 28, 2017
While comparing timestamps of precompiled images, check for possibility of truncation at microsecond level.

fixes JuliaLang#20837
tanmaykm added a commit to tanmaykm/julia that referenced this issue Feb 28, 2017
While comparing timestamps of precompiled images, check for possibility of truncation at microsecond level.

fixes JuliaLang#20837
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:precompilation Precompilation of modules
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants