nirvdrum has quit [Ping timeout: 264 seconds]
nirvdrum has joined #jruby
_whitelogger has joined #jruby
ur5us_ has quit [Ping timeout: 260 seconds]
ur5us_ has joined #jruby
nirvdrum has quit [Ping timeout: 246 seconds]
knu has quit [*.net *.split]
NightMonkey has quit [*.net *.split]
ChrisBr- has quit [*.net *.split]
NightMonkey has joined #jruby
ChrisBr- has joined #jruby
NightMonkey has quit [Max SendQ exceeded]
NightMonkey has joined #jruby
knu has joined #jruby
_whitelogger has joined #jruby
ur5us_ has quit [Ping timeout: 260 seconds]
_whitelogger has joined #jruby
NightMonkey has quit [Ping timeout: 256 seconds]
NightMonkey has joined #jruby
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 240 seconds]
nirvdrum has joined #jruby
nirvdrum has quit [Ping timeout: 256 seconds]
nirvdrum has joined #jruby
_whitelogger has joined #jruby
nirvdrum has quit [Remote host closed the connection]
nirvdrum has joined #jruby
<headius[m]> enebo: does loading a file keep the file open?
<headius[m]> I am getting specs green on Windows and most failures in :language are due to it being unable to delete temp files it loaded
<enebo[m]> hmm
<enebo[m]> I believe there is some reason it could happen for DATA perhaps but we do fully read source into memory generally
<headius[m]> it seems like ExternalScript.load tries to close the stream but when it tries to delete the file it fails
<headius[m]> when the spec tries to delete it I mean
<enebo[m]> I really don't recall anything other than DATA but we should be able to detect that
<headius[m]> that should only be for the main script though
<enebo[m]> The opening and the parsing are not all that close together either
<enebo[m]> yeah so nothing is popping out
<headius[m]> ok
<enebo[m]> windows is an excellent platform for noticing this behavior :)
<headius[m]> that's for sure
<enebo[m]> but fwiw if we did this on a large rails app and it was like this we would have thousands of open fds
<headius[m]> yeah I am trying to determine what files remain open
<headius[m]> this basically writes a file and then `load`s it and then tries to delete it in the teardown
<enebo[m]> I guess modern unixy systems probably do have higher resource limits so perhaps we are not hitting any ceilings
<headius[m]> I'll poke around
<enebo[m]> It does not on linux
<enebo[m]> jruby -e 'File.open(%q{pom.xml}); gets'
<headius[m]> that's essentially what these specs are doing
<enebo[m]> just run lsof -p {pid} and you can see the pom.xml and whatever else java has open file wise
<enebo[m]> So this appears to be windows only if it is an issue
<enebo[m]> I guess since those specs exist we knew that but I am doubly sure now :)
<headius[m]> yeah I need to figure out how to do lsof on Windows
<enebo[m]> windows io is not native so likely we are not closing within windows code path somewhere
<enebo[m]> That looks like a duck :)
<enebo[m]> It quacks like it too
<enebo[m]> sysinternals had a tool for open files
<enebo[m]> a million years ago
<enebo[m]> but it does look like you know it is not closing the file already
<headius[m]> it certainly seems that way
<headius[m]> but we do appear to try to load fully any external script
<headius[m]> so I'm looking at the load logic to see if somewhere here we accidentally leave the file open
<enebo[m]> I did just verify load specifically as well using lsof
<enebo[m]> linux is fine
<headius[m]> ok that's good to know
<headius[m]> I think I found it
<headius[m]> LibrarySearcher.ResourceLibrary
<headius[m]> its load impl calls "prepareInputStream" which fully buffers the file but does not close the real stream
<headius[m]> this is via FoundLibrary's delegate.load... different on Windows?
<headius[m]> it's not an ExternalScript at this point, it's a FoundLibrary wrapping a LibrarySearcher.ResourceLibrary
<headius[m]> works and passes now
<enebo[m]> nice
<headius[m]> the remaining language failures appear to be a default codepage issue... we do IBM-437 instead of UTF-8 for some reason
<headius[m]> but good news is that all other language stuff seems ok
<enebo[m]> headius: it seems ok to me but just for the sake of argument...if we thought original file resource should not go away (although how it is written is amazingly non-determinstic) why would we want that?
<headius[m]> only 39F and 48E on :core specs
<headius[m]> why would we want what?
<enebo[m]> It was so long ago that specs have run that is pretty amazing
<enebo[m]> original is to stay around until finalized
<headius[m]> yeah I can't think of any reason since we buffer the whole file before proceeding
<enebo[m]> I am mostly asking because you made it a draft pr
<headius[m]> I think it was just overlooked
<headius[m]> it's just draft because I will likely have other fixes for windows specs
<enebo[m]> ok...seems well contained as its own in case we discover something later (we won't though)
<headius[m]> yeah I did not check lineage of this code but I think someone may have thought the is would be closed by the wrapping stream, and it isn't
<headius[m]> the javadoc for LoadServiceResourceInputStream even says you need to handle closing it yourself
<enebo[m]> that is a perennial bug of stream I guess too
<enebo[m]> and this was a general issue and not windows specific
<enebo[m]> lsof maybe was run after finalization happened to close it
ruurd has joined #jruby
<headius[m]> well that is an open question I guess
<headius[m]> I would not have expected this to follow different logic on Windows
nirvdrum has quit [Ping timeout: 256 seconds]