Description
I have encountered a repeatable JVM crash issue when starting the MediaDriver on a solaris 10 / sparc9 box. This appears to be due to an unaligned write in an UnsafeBuffer made by the StatusMessageFlyweight. I have reproduced this with aeron 1.2.5 and 1.3.0.
To diagnose I ran with the -javaagent:agrona-agent-0.9.6.jar as per the wiki and it returns the following (on windows 7 x64 and solaris 10/sparc9):
WARNING: /var/tmp/aeron-someuser already exists.
TRANSFORM org.agrona.concurrent.UnsafeBuffer
TRANSFORM io.aeron.protocol.DataHeaderFlyweight
[GC (Allocation Failure) 65536K->5467K(251392K), 0.0627118 secs]
TRANSFORM io.aeron.protocol.HeaderFlyweight
TRANSFORM io.aeron.protocol.SetupFlyweight
TRANSFORM io.aeron.protocol.RttMeasurementFlyweight
TRANSFORM io.aeron.protocol.NakFlyweight
TRANSFORM io.aeron.protocol.StatusMessageFlyweight
Exception in thread "main" org.agrona.agent.BufferAlignmentException: Unaligned 8-byte access (Index=28, Buffer Alignment Offset=0)
at org.agrona.agent.BufferAlignmentInterceptor$Verifier.verifyAlignment(BufferAlignmentInterceptor.java:35)
at org.agrona.concurrent.UnsafeBuffer.putLong(UnsafeBuffer.java:344)
at io.aeron.protocol.StatusMessageFlyweight.receiverId(StatusMessageFlyweight.java:179)
at io.aeron.driver.media.ReceiveChannelEndpointThreadLocals.<init>(ReceiveChannelEndpointThreadLocals.java:70)
at io.aeron.driver.MediaDriver$Context.concludeNullProperties(MediaDriver.java:724)
at io.aeron.driver.MediaDriver$Context.conclude(MediaDriver.java:539)
at io.aeron.driver.MediaDriver.<init>(MediaDriver.java:170)
at io.aeron.driver.MediaDriver.launch(MediaDriver.java:285)
at io.aeron.driver.MediaDriver.launch(MediaDriver.java:274)
at io.aeron.driver.MediaDriver.main(MediaDriver.java:144)
Is this something that can be looked at and resolved in the flyweight?
I appreciate this target platform is unusual but in this instance I have a requirement to deploy a new server to legacy kit running Solaris 10 sparc9 architecture for a transient period. More generally should we consider sparc/solaris as a platform generically supported if run with a 1.8 JVM but not specifically verified?