-
-
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
jffi*.tmp files remain in %TMP% folder #1237
Comments
I came across this issue, and checked my own windows machine. I can verify that this is occuring on Windows underneath 1.7.5. While my machine gets rebooted weekly and %TMP% cleaned out, it could be an issue... seems I have invoked JRuby 250 times in the last 2 days... |
So this only happens on Windows, and it is still happening today, yes? |
I can confirm this is happening and I looked at my old windows box and I On Fri, Feb 21, 2014 at 1:30 PM, Charles Oliver Nutter <
blog: http://blog.enebo.com twitter: tom_enebo |
I ran all the sample code included in JRuby 1.7.12 windows release on Windows 7 x64 and do not see any jffi files left in my %TMP% directory. I think this bug has been fixed and can be closed now. |
I am running Logstash 1.4.0 on Windows 7 /Windows 2003 and have the same problem. how did you resolve the issue? |
@enigma69 It's worth noting that Logstash 1.4.0 is bundled with JRuby 1.7.11; if you go into the |
Yes, I tried this already, but had not joy. |
I confirm it still occurs with 1.7.12 complete jar, simply running the following create the ffi tmp file:
|
This is not actually an issue that is isolated to Windows. It turns out we're seeing it fill up disks in production on Linux! Though I'm sure our use-case is fairly different than the original reporter. The case that I've discovered this is within redstorm within a running Storm cluster. I've got a Lookout proprietary reproduction (regrettably) using some internal code on JRuby 1.7.15 with the redstorm library which I can share with @mkristian and hope he can derive a better test case out of it. The gist seems to be that when using some of our code, which I suppose loads I have a sneaking suspicion that unclean shutdowns of a JRuby ScriptingContainer will cause the issue and that behavior appears to happen rather otten inside of a Storm cluster. |
hmm - I can reproduce it with this redstorm but still trying to get a nice tiny test-case |
jffi does copy the native library file from the classloader to a tmp file. and then loads this file. finally this file will be declared as my tests showed: String lib = "some.native.library";
System.load( lib );
new File(lib).delete(); does work wuite well and matches my experience with linux. no idea about this approach on windows. on the 1.2.7 tag of patch for https://github.com/jnr/jffi would be diff --git a/src/main/java/com/kenai/jffi/internal/StubLoader.java b/src/main/java/com/kenai/jffi/internal/StubLoader.java
index 084b98d..b1bc09b 100644
--- a/src/main/java/com/kenai/jffi/internal/StubLoader.java
+++ b/src/main/java/com/kenai/jffi/internal/StubLoader.java
@@ -326,6 +326,7 @@ public class StubLoader {
}
System.load(dstFile.getAbsolutePath());
+ dstFile.delete();
}
/** that version I ran wuth testsuite on jruby-1_7 the current master of jffi does produce lots of errors. |
Hi Guys, Can you please let me know in which version of jruby the issue is fixed? I am using Logstash, i wan't to replace jruby-complete-1.7.11.jar with the right jar but i could not fine an information giving the right jar version. I downloaded 1.7.19 but not sure if it is fixed as i still have the jffi file created and not removed. Thanks, |
Thanks @rtyler Greatly appreciated |
Guess what... This bug is back now, in JRuby 9k. Will debug a bit more and then submit an issue (or hopefully, PR). |
Since the 1.7.5 release, every time jruby is instanciated, a new 115kb tempfile prefixed by 'JFFI' is created in the current user's %TMP%-folder and never cleaned up.
This happens on multiple machines, all running windows 7 and oracle's java7 b43 or b10.
Tested with jruby 1.7.5, 6, and 8. Doesn't occur in 1.7.3 and 1.7.4.
It occurs independently of how jruby is invoked on any launch and can lead to large disk pollution in machines that invoke jruby quite often.
The text was updated successfully, but these errors were encountered: