joeclark Posted May 5, 2004 Report Share Posted May 5, 2004 (edited) We are using Sun's JDK for Linux, version 1.4.2-b28, on Mandrake 10 Official. Our Java application runs basically all the time, and we interact with it frequently. It is a graphical application utilizing a simple mapping architecture. Our problem is that about once every day or two, the Java virtual machine crashes with a seg fault outside of the VM code. This is obviously bad, but I can't find a similar crash report by searching Google. Perhaps this should be on a Java forum, not a Mandrake forum, but I thought I'd start here. Also we run the same Java application with the same exact version of Java on a Mandrake 8.2 machine, and have never seen this error, so I'm thinking it might point to something in Mandrake. Would you suggest trying a newer version of Java? Or a Java code change? Or (sigh) a different version of Linux? In the stack trace (printed below), the call originates from a Graphics2D.draw(Elllipse2D), if that helps. Here is part of the error that the VM dumps out when this problem occurs: An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0x4DA9C1E4 Function=(null)+0x4DA9C1E4 Library=/usr/java/j2sdk1.4.2/jre/lib/i386/libdcpr.so NOTE: We are unable to locate the function name symbol for the error just occurred. Please refer to release documentation for possible reason and solutions. Current Java thread: at sun.dc.pr.PathStroker.endPath(Native Method) at sun.java2d.pipe.DuctusRenderer.feedConsumer(DuctusRenderer.java:232) at sun.java2d.pipe.LoopPipe.getStrokeSpans(LoopPipe.java:259) at sun.awt.X11Renderer.draw(X11Renderer.java:243) at sun.java2d.pipe.ValidatePipe.draw(ValidatePipe.java:114) at sun.java2d.SunGraphics2D.draw(SunGraphics2D.java:2128) *** Moved by Phunni Edited May 5, 2004 by phunni Quote Link to comment Share on other sites More sharing options...
phunni Posted May 5, 2004 Report Share Posted May 5, 2004 A segfault is usually caused by either a lack of memory or a missing/corrupted file It looks like the file may have been a library shipped with the VM I would try a different version of the VM - either the one before or (if there is one) the one after. Did you install the VM via an RPM or from the self-extracting bin on the Sun website? Quote Link to comment Share on other sites More sharing options...
joeclark Posted May 5, 2004 Author Report Share Posted May 5, 2004 It's from a self-extracting bin...probably the same bin file used to install on Mandrake 8.2 We've been dealing with some memory issues as well, but the Mandrake 10 machine should have plenty of free memory to spare.... In any case, it's the only machine we've seen this problem on, and it probably has the most memory of any machine we would try it on. Quote Link to comment Share on other sites More sharing options...
phunni Posted May 5, 2004 Report Share Posted May 5, 2004 When you say it's the same file as used on Mdk 8.2 - is it exactly the same download? It's worth making sure just to eliminate that possibility I would imagine that ifyou file download is fine then it's probably either a problem with your Mdk system or your Java app... Quote Link to comment Share on other sites More sharing options...
joeclark Posted May 6, 2004 Author Report Share Posted May 6, 2004 I installed the newest Java SDK available (1.4.2_04), and it has the same problem. What's left but to install a different OS? This is really going to annoy me that Mandrake 10 official has some Java bug...is there any way to even know what OS/library component the bug is in? Is it really a MDK bug, or a kernel bug, or an X bug, or ..... ? I guess maybe we'll go back to (old) 8.2, just because we know it works. About memory, again: When it crashed this time, Java VM was using about 94 MB of RAM. Yes, that's a lot, but not unreasonable in our situation. It may have something to do with memory, but the fact is it seems to work fine on machines with less memory as long as they're not running Mandrake 10. Grr. Another one of those "stupid linux" days. (Don't worry, I have plenty of "stupid Windows" days too.) Quote Link to comment Share on other sites More sharing options...
phunni Posted May 7, 2004 Report Share Posted May 7, 2004 The only other thing I can suggest it to try a different VM - you could try blackdown's (www.blackdown.org) or IBM's although apparentl the fonts in the IBM one are ugly... Quote Link to comment Share on other sites More sharing options...
joeclark Posted May 7, 2004 Author Report Share Posted May 7, 2004 Well, we're going to remove the calls that seemed to cause the problem (Graphics2D.draw(Ellipse2D)), and replace them with the older fillOval method (we had previously used fillOval and didn't see a problem). I am hopeful that this will "fix" the problem (or be a sufficient workaround). I would consider using another VM, but hopefully this fix will work. One other interesting thing related to MDK10: While this Java application is running, sometimes I see the X process using up to 90% of the system RAM. On a machine with 1 GB of RAM, this is surprising to me, esp when it seems the nominal usage of RAM for X is about 2-3% of the total. Any ideas on if this is some kind of X bug and if it might be related to Java somehow, or if it's another issue entirely? Thanks your your help on this topic. It's been good to "vent", even if there isn't a clear solution. Quote Link to comment Share on other sites More sharing options...
phunni Posted May 7, 2004 Report Share Posted May 7, 2004 I haven't tried Mdk 10 yet, but I've had loads of Java apps running quite happily on my machine. It seems to me likely to be some kind of library issue - possibly included in Mdk 10 It might still be worth looking at another VM if your workaround doesn't work though... Quote Link to comment Share on other sites More sharing options...
joeclark Posted May 10, 2004 Author Report Share Posted May 10, 2004 Thanks for your input...with the old calls in place, it seems much happier. No problems after running under normal operating conditions for 2-3 days. I'm going to put a new thread up here though about X & Java memory usage....at some times XWindows get into a funny state and sucks up just about all the system RAM...I'll describe in the other thread. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.