Dir.chdir conflicting warning and error#8251
Conversation
28b4e65 to
59269d8
Compare
|
@enebo could you please help me understand/check if these failing tests are really related with this PR changes? since sometimes it pass, sometimes not. Thanks |
enebo
left a comment
There was a problem hiding this comment.
You can probably put this as a field on Ruby (with a more specific name than currentThread) and otherwise I think this looks good.
The lone failure in sequel is unrelated to this PR.
|
@edipofederle @headius Actually I have other concerns with this now that I think about it. If you have an n-thread server which all was calling out to a process with the same directory this would lock the entire server to becoming synchronous. If we allowed all threads which called processes in the same directory to run it would alleviate some of this concern but I now question if this is a good idea or not. |
|
Just some scenarios I thought about from the above comment:
I am not sure what the right thing to do here is but the second problem seems like it will generate a different issue. I half wonder if there is some solution where every thread externally tracks chdir and if anything using chdir (like process launch) it somehow gets used instead. This I can already see would not fix call outs to external Java libraries doing processes but I feel like that problem is not solvable. |
|
@edipofederle This is the issue to follow for this https://bugs.ruby-lang.org/issues/15661 So I think you must have read this issue based on how the PR was written. I think just moving currentThread to Ruby so it is not a staticfield and I think the lock should be removed. In particular https://bugs.ruby-lang.org/issues/15661#note-16 should work (or at least the comments make me think it should work). With the PR as it is I think it will warn then dead lock. |
59269d8 to
21686ca
Compare
|
@edipofederle thanks for bearing with me on that. We got there in the end. Thanks for the contribution! |
No description provided.