I have developped a web application in Java to work in a system where a Paylink is installed.
To monitor the status of the components connected to the Paylink, I look every second for the list of events with the methods provided in the SDK for Java (AESImhei.java).
Specifically I make calls on the methods NextAcceptorEvent, NextDispenserEvent and NextSystemEvent.
The problem is that the application crashes and kills the web server with the following message in the log at an undetermined moment.
Code: Select all
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f83ed49b0a3, pid=32105, tid=0x00007f83dbaac700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_161-b12) (build 1.8.0_161-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.161-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x9960a3] oopDesc* PSPromotionManager::copy_to_survivor_space<false>(oopDesc*)+0x143
#
# 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:
# /root/hs_err_pid32105.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted
If I comment the methods responsible for checking events, the jvm never crashes, so it must be a problem with AESImhei.NextXXXXXEvent. That's why I'm asking for help in this forum.
The methods that are executed every second are implemented as follows:
Code: Select all
private List<PaySystemComponentEvent> checkAcceptorEvents(int acceptorIndex) {
AESImhei.EventDetailBlock eventDetailBlock = new AESImhei.EventDetailBlock(); //null = jvm exception
List<PaySystemComponentEvent> eventCodes = new ArrayList<>();
EventCode eventCode = EventCode.valueOf(AESImhei.NextAcceptorEvent(acceptorIndex, eventDetailBlock));
while (!EventCode.IMHEI_NULL.equals(eventCode)) {
eventCodes.add(toPaySystemComponentEvent(eventCode));
eventCode = EventCode.valueOf(AESImhei.NextAcceptorEvent(acceptorIndex, eventDetailBlock));
}
return eventCodes;
}
private List<PaySystemComponentEvent> checkDispenserEvents(int dispenserIndex) {
AESImhei.EventDetailBlock eventDetailBlock = new AESImhei.EventDetailBlock(); //null = jvm exception
List<PaySystemComponentEvent> eventCodes = new ArrayList<>();
EventCode eventCode = EventCode.valueOf(AESImhei.NextDispenserEvent(dispenserIndex, eventDetailBlock));
while (!EventCode.IMHEI_NULL.equals(eventCode)) {
eventCodes.add(toPaySystemComponentEvent(eventCode));
eventCode = EventCode.valueOf(AESImhei.NextDispenserEvent(dispenserIndex, eventDetailBlock));
}
return eventCodes;
}
private List<PaySystemComponentEvent> checkSystemEvents() {
AESImhei.EventDetailBlock eventDetailBlock = new AESImhei.EventDetailBlock(); //null = jvm exception
List<PaySystemComponentEvent> eventCodes = new ArrayList<>();
EventCode eventCode = EventCode.valueOf(AESImhei.NextSystemEvent(eventDetailBlock));
while (!EventCode.IMHEI_NULL.equals(eventCode)) {
eventCodes.add(toPaySystemSystemEvent(eventCode));
eventCode = EventCode.valueOf(AESImhei.NextSystemEvent(eventDetailBlock));
}
return eventCodes;
}
- Operating system: Linux Debian 9 "Stretch"
- JDK/JRE 1.8
- Web server: Wildfly 12.0.0-final
Do you have any idea of what I am doing wrong?
Thank you very much.