SIGSEGV in IcedTea

Bug #613263 reported by Harrison Neal on 2010-08-04
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openjdk-6 (Ubuntu)

Bug Description

We have a (pure) Java program that was admittedly written somewhat sloppily (as a research project), except we started getting odd exceptions that we didn't know what to make of them. For example:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 1
 at javax.swing.plaf.basic.BasicTabbedPaneUI.paintTabArea(
 at javax.swing.plaf.basic.BasicTabbedPaneUI.paint(
 at javax.swing.plaf.metal.MetalTabbedPaneUI.paint(
 at javax.swing.plaf.metal.MetalTabbedPaneUI.update(
 at javax.swing.JComponent.paintComponent(
 at javax.swing.JComponent.paint(
 at javax.swing.JComponent.paintChildren(
 at javax.swing.JComponent.paint(
 at javax.swing.JComponent.paintChildren(
 at javax.swing.JComponent.paint(
 at javax.swing.JComponent.paintToOffscreen(
 at javax.swing.BufferStrategyPaintManager.paint(
 at javax.swing.RepaintManager.paint(
 at javax.swing.JComponent._paintImmediately(
 at javax.swing.JComponent.paintImmediately(
 at javax.swing.RepaintManager.paintDirtyRegions(
 at javax.swing.RepaintManager.paintDirtyRegions(
 at javax.swing.RepaintManager.prePaintDirtyRegions(
 at javax.swing.RepaintManager.access$700(
 at javax.swing.RepaintManager$
 at java.awt.event.InvocationEvent.dispatch(
 at java.awt.EventQueue.dispatchEvent(
 at java.awt.EventDispatchThread.pumpOneEventForFilters(
 at java.awt.EventDispatchThread.pumpEventsForFilter(
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(
 at java.awt.EventDispatchThread.pumpEvents(
 at java.awt.EventDispatchThread.pumpEvents(

We don't do anything particularly special in Swing that we thought should cause this (this is happening in the AWT thread, which we have no control over; maybe two threads of ours modified the same object simultaneously and caused an inconsistency that eventually resulted in this? I'm not sure.). But, being a "pure" Java program (and, by that, I mean we don't use JNI or anything to add native code to the JVM itself), I didn't think it was possible to get an outright crash of the JVM:

# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f7b35a846b8, pid=14639, tid=140165863499536
... rest of file attached for the sake of readability.

These began happening on multiple machines, and the outright crash of the entire JVM makes me wonder what exactly is going wrong. I'm attaching all the files related to the project; it's an Eclipse project.

Things you should know:
-Java is made to invoke tshark (a network traffic capturer and analyzer) as a process (outside the JVM), so if you plan on running this you'll need tshark installed, and since it wants to read the network interfaces on the system directly, this stuff needs to be run as root. Also, tshark will try to dump the contents of the network traffic to a file, and, being cautious, it'll only work if the folder it's writing to is owned by the user it's running as (root). You can either disable that (remove "-w", "output/tsharkData.pcap", "-S" from, line 25) or ensure this entire directory structure is root-owned, as that seems the only way to appease tshark. We've found our lives were easiest working out of either /tmp or /root.

-There are some executables within the project that Java is made to invoke in addition to tshark. I would provide the source code for the few actual C executables included in this project, but for some unearthly reason my higher-ups would rather have those executables (what amounts to 10-20 lines of code each) remain a black box to my team and I, rather than making both their and our lives simpler by just having the 10 lines of code be in Java and save us the 10 lines of code to execute the process. But enough about my problems.

-For both the above notes, I wouldn't blame you for running this in a virtual machine or on a machine of inconsequential nature if you were to touch it at all; that's what I'd do, anyway.

-This code uses the jcommon and jfreechart libraries, and Eclipse needs to be told where those are to run this properly.

-In a nutshell, what this tries to do is analyze SSH connections. Java invokes tshark, tshark spits out information about the connections going across the wire, Java takes that packet information, passes it onto one of the executables that takes the differences in times between the packets, then finally passes it onto a second executable that compares the timings against those in profile.txt. If you want the "full" version of what our higher ups are wanting to accomplish, I have a PDF attached with a description of their work.

-I don't know if this is or isn't a bug with IcedTea. If it's just horrible Java code that can cause the two exceptions/errors mentioned above, which there are some parts that are admittedly sketchy, don't be afraid to let me know and mark this as invalid. I'm submitting this just in case there is something going awry in the JVM, which I believe to be the case.

-Let me know if you have any questions.

Harrison Neal (hantwister) wrote :
Harrison Neal (hantwister) wrote :
Harrison Neal (hantwister) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers