Project

General

Profile

Actions

Bug #421

closed

Random crash on openSUSE 13.2 / OpenJDK 1.8.0_72

Added by Tobias Triffterer about 8 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
03/18/2016
Due date:
% Done:

0%

Estimated time:
Reviewer:
Build Version:

Description

Hi there,

I just got my new electronic ID card and tested the Open eCard App under Linux.
It's really nice that I can use the ID card without having to boot Windows in a VM, but I noticed a
strange behaviour of the eCard App:

I have a card reader with display and PIN pad and sometimes the app crashes with a segfault one or two
seconds after entering the PIN on the card reader, but not always...

Here is the terminal log from a crash:

Main class defined in config file.
mainclass=org.openecard.richclient.RichClient
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: javax.swing.JPanel[,0,0,0x0,invalid,layout=java.awt.BorderLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=] is not attached to a vertical group
        at javax.swing.GroupLayout.checkComponents(GroupLayout.java:1090)
        at javax.swing.GroupLayout.prepare(GroupLayout.java:1040)
        at javax.swing.GroupLayout.layoutContainer(GroupLayout.java:910)
        at java.awt.Container.layout(Container.java:1510)
        at java.awt.Container.doLayout(Container.java:1499)
        at java.awt.Container.validateTree(Container.java:1695)
        at java.awt.Container.validateTree(Container.java:1704)
        at java.awt.Container.validateTree(Container.java:1704)
        at java.awt.Container.validate(Container.java:1630)
        at javax.swing.RepaintManager$3.run(RepaintManager.java:711)
        at javax.swing.RepaintManager$3.run(RepaintManager.java:709)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:708)
        at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1731)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f615c96d4c3, pid=11354, tid=140054146557696
#
# JRE version: OpenJDK Runtime Environment (8.0_72-b15) (build 1.8.0_72-b15)
# Java VM: OpenJDK 64-Bit Server VM (25.72-b15 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libpthread.so.0+0xb4c3]  __pthread_mutex_unlock_usercnt+0x3
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /tmp/hs_err_pid11354.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
Abgebrochen

I have attached the logfile generated by Java to this bug report.

During my tests, I always managed to authenicate using the nPA in the end, but sometimes I had to restart
the Open eCard App one or two times.

Do you have any idea about what causes this problems?


Files

hs_err_pid11354.log (80.9 KB) hs_err_pid11354.log Tobias Triffterer, 03/18/2016 03:21 PM

Related issues

Has duplicate Bug #414: Crash after PIN-Change (Ubunto 14.04, OpenJDK 1.7.0_91)Rejected01/21/2016

Actions
Actions #1

Updated by Detlef Hühnlein about 8 years ago

As the problem has appeared in the native code and in connection with a pin entry, the
PC/SC driver of the card terminal might have a problem. Which card terminal are you using?

Actions #2

Updated by Tobias Triffterer about 8 years ago

I'm using a ReinerSCT cyberJack RFID Standard and the default drivers included in openSUSE 13.2.

The card reader is also used for online banking via HBCI/FinTS and has worked flawlessly during
the last years. For online banking, the PIN is also entered on the card reader, but the banking
application is AFAIK not based on Java.

Actions #3

Updated by Tobias Wich about 8 years ago

We had similar crashes in the past which disappeared with a Java update iirc. It is no secret, that the Java Smartcard IO is a piece of crap very badly maintained software. Changes in the PCSC stack or even differences to the implementations on other platforms might kill it like that.
Unfortunately this is nothing we can change as the problem is either in Java or PCSC. We already have a workaround which reduces threading on the PCSC stack (also a killer on pcsclite). Your best bet is to try a different Java version. OpenJDK 7 if it is available or download the Oracle VM.
Don't forget to notify us if any of the other VMs fixed the problem.

In the Future we might replace the Java Smartcard IO with a JNA based implementation, but this will not be available in the short term.

There you see the problematic call.

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  sun.security.smartcardio.PCSC.SCardBeginTransaction(J)V+0
j  sun.security.smartcardio.CardImpl.beginExclusive()V+54
j  org.openecard.scio.PCSCCard.beginExclusive()V+4
j  org.openecard.ifd.scio.wrapper.SingleThreadChannel$4.call()Ljava/lang/Void;+21
j  org.openecard.ifd.scio.wrapper.SingleThreadChannel$4.call()Ljava/lang/Object;+1
j  java.util.concurrent.FutureTask.run()V+42
j  java.util.concurrent.ThreadPoolExecutor.runWorker(Ljava/util/concurrent/ThreadPoolExecutor$Worker;)V+95
j  java.util.concurrent.ThreadPoolExecutor$Worker.run()V+5
j  java.lang.Thread.run()V+11
v  ~StubRoutines::call_stub

Actions #4

Updated by Tobias Triffterer about 8 years ago

So I justed tested with OpenJDK 1.7.0_95 and it crashes as version 1.8.0.

A test with Oracle Java will follow in the next days.

Actions #5

Updated by Tobias Triffterer about 8 years ago

It took a bit longer than expected, but I now I tested with Oracle Java 1.8.0 Update 77.

I repeated the test several times and observed only one segfault, so Oracle Java seems to have this problem as well,
but the probability to trigger the bug seems to be smaller than with OpenJDK.

Yes, I know this sounds strange, and no, I don't have an explanation for the observations ;-)...

Actions #6

Updated by Tobias Wich over 6 years ago

  • Has duplicate Bug #414: Crash after PIN-Change (Ubunto 14.04, OpenJDK 1.7.0_91) added
Actions #7

Updated by Tobias Wich over 5 years ago

  • Status changed from New to Closed

I haven't seen this crash due to the JDK bug accessing PCSC for quite some time. I'm closing as fixed by JDK implementation.

Actions

Also available in: Atom PDF