You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void onMessage(final long messages, final long bytes)
{
totalBytes += bytes;
totalMessages += messages;
}
to:
public void onMessage(final long messages, final long bytes)
{
if ((ThreadLocalRandom.current().nextInt() % 100) < 10)
{
System.out.println("Good time for a nap...");
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
}
totalBytes += bytes;
totalMessages += messages;
}
Wait a few seconds, then control-c the subscriber, and (at least for me) the JVM on the subscriber will crash with various interesting messages, like:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010414a229, pid=5354, tid=22019
#
# JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x54a229] Unsafe_GetIntVolatile+0x3e
#
# Core dump written. Default location: /cores/core or core.5354
#
# An error report file with more information is saved as:
# /Users/ericb/GitHub/Aeron/hs_err_pid5354.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Abort trap: 6 (core dumped)
Putting the random sleep only on the subscriber is also enough to reproduce, it seems. Probably doesn't even have to be random; I would bet the bug has more to do with control-c'ing the subscriber while it is still in the middle of message delivery or with several messages waiting to be delivered.
and rebuild.
jstack output for the core referred to above:
The text was updated successfully, but these errors were encountered: