[Debian-med-packaging] Bug#929530: libsis-base-java: unaligned access on armhf

Steve Langasek steve.langasek at canonical.com
Sat May 25 20:24:02 BST 2019


Source: libsis-base-java
Version: 18.09~pre1+git20180827.fe4953e+dfsg-1
Severity: important
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu eoan

Dear maintainers,

In Ubuntu, libsis-base-java fails to build on armhf with an unaligned access
error (SIGBUS):

Running testIntToByteToInt
 Arguments: [0, 0]
 Arguments: [0, 1]
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGBUS (0x7) at pc=0xf6bd95a4, pid=17199, tid=17200
#
# JRE version: OpenJDK Runtime Environment (11.0.3+5) (build 11.0.3+5-Ubuntu-1ubuntu2)
# Java VM: OpenJDK Server VM (11.0.3+5-Ubuntu-1ubuntu2, mixed mode, g1 gc, linux-)
# Problematic frame:
# V  [libjvm.so+0x48c5a4]
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P" (or dumping to /<<BUILDDIR>>/libsis-base-java-18.09~pre1+git20180827.fe4953e+dfsg/core.17199)
#
# An error report file with more information is saved as:
# /<<BUILDDIR>>/libsis-base-java-18.09~pre1+git20180827.fe4953e+dfsg/hs_err_pid17199.log
#
# If you would like to submit a bug report, please visit:
#   https://bugs.launchpad.net/ubuntu/+source/openjdk-lts
#
Aborted (core dumped)
make[1]: *** [debian/rules:47: override_dh_auto_test-arch] Error 134

  (https://launchpad.net/ubuntu/+source/libsis-base-java/18.09~pre1+git20180827.fe4953e+dfsg-1/+build/15630858)

Further investigation shows that this is a result of libsis-base-java
passing an unaligned pointer as the 'buf' argument to the JNI function
GetIntArrayRegion().

On ARM, unaligned memory access is not guaranteed to succeed; depending on
the CPU and the kernel configuration, it may raise SIGBUS instead.

This problem is reproducible on amdahl, the Debian arm64 porter machine, in
an armhf chroot.  It will also affect some number of users running Debian
armhf on a 64-bit kernel, and will likely become a serious build failure in
Debian in the future when the autobuilders are transitioned to 64-bit CPUs.

I am not sure if it should be considered a bug in libsis-base-java for
passing an unaligned address to GetIntArrayRegion(), or a bug in openjdk for
performing unaligned access when passed an unaligned address.  But I am
inclined to think the bug is in libsis-base-java, because technically the
value it's passing as an int* argument is not valid on this architecture as
a pointer to an int.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-med-packaging/attachments/20190525/42caa017/attachment.sig>


More information about the Debian-med-packaging mailing list