-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
File locks do not release while JRuby process open in 9k-pre2 #2958
Comments
That is surprising...I don't think that we lock required files at all. |
I remember looking at this for Truffle - I think that MRI at least locks files that have DATA in them. There is a spec for that https://github.com/jruby/jruby/blob/master/spec/ruby/language/predefined/data_spec.rb#L26-L42. |
I just confirmed, from ExternalScript on down, that we don't actively lock any files on load. We do, however, keep the file open for as long as we're in the process of executing it. If the file never reaches its end (i.e. if it starts up a long-running app and blocks)
|
@florf This is not currently a high priority, since we do not actively lock these files and we should be closing them after they're done loading. If you can confirm we're holding an actual filesystem-level lock, or keeping files open longer than we should, it would help us have a goal to work toward. |
It could be that the required files being held open were causing the permission issues. That does make more sense now that I think about it. I'll have to do more testing to be sure. Insofar, IRB seems to be the one causing issues. |
I think @enebo is looking at this for RC2. |
I am nearly positive this is a dupe of #3055. Closing as duplicate only because I already close the other as fixed. |
While using both JRuby and JIRB to test and develop code, I have found that the process holds file locks on all source files currently loaded via a
require
statement. The file locks are not released until the process is terminated; both Windows itself and gEdit 2.30.1 report that the file cannot be written to until the process terminates.For reference, the output from
jruby -v
produces (formatted for readability):The text was updated successfully, but these errors were encountered: