Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1037425

Bug#977021: bus errors on armhf running on a 64bit kernel

From Pierre Gruet <pgtdebian@free.fr>
Newsgroups linux.debian.bugs.dist
Subject Bug#977021: bus errors on armhf running on a 64bit kernel
Date 2020-12-13 22:00 +0100
Message-ID <BlGDf-3mo-5@gated-at.bofh.it> (permalink)
References <BknsZ-4uL-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Dear Bernd,

I have looked again at the issue we discussed last Friday; as pointed 
out in the companion bug report

	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=929530#5

I see an unaligned address is passed to GetXxxArrayRegion() in the 
native part of the code, when running the tests testXxxToByteToXxx, for 
Xxx in {Char, Short, Ing, Long, Float, Double}: this happens when the 
argument targetOfs of the test is not a multiple of the size of Xxx.

I suggest to remove all pairs (i,j) from getOfs() in NativeDataTests 
where j is not zero. I think the pairs (i,0) could remain even when i is 
not zero, but I would remove them as well because the only place, in the 
main source, where copyXxxToByte or copyByteToXxx are used is in 
NativeTaggedArray, and there it never happens that inStart and outStart 
are not multiples of the size of Xxx.

Do you agree or am I missing something? If you think my suggestions are 
correct, I will upload the package with a patch leaving only the pair 
(0,0) in getOfs() in NativeDataTests.

Warm thanks for your help,
Pierre


On Thu, 10 Dec 2020 18:45:37 +0100 Bernd Rinn <brinn@ethz.ch> wrote:
 > Dear Pierre,
 >
 > No, I've not yet seen this bus error. I can see two changes to my test
 > setup:
 >
 > - JDK 11 instead of JDK 8
 > - 64bit OS instead of 32 bit OS
 >
 > The 64bit platoform is more likely to be the change that uncovers this
 > bug. Which hardware did you get the error on?
 >
 > All the best,
 > Bernd
 >
 > On 12/10/20 5:45 PM, Pierre Gruet wrote:
 > > Control: forwarded -1 brinn@ethz.ch
 > >
 > >
 > > Dear Bernd,
 > >
 > > In Debian we have received a bug report you may find below: there 
seems
 > > to be an unaligned memory access in (seemingly) the JNI part of 
sis-base
 > > version 18.09, leading to a failure on the architecture armhf 
running on
 > > a 64bit kernel.
 > >
 > > Have you already met this issue and do you see how it might be fixed?
 > >
 > > Thanks a lot,
 > > Pierre Gruet
 > >
 > >
 > > On Thu, 10 Dec 2020 07:15:24 +0100 Matthias Klose <doko@debian.org> 
wrote:
 > >  > Package: src:libsis-base-java
 > >  > Version: 18.09~pre1+git20180928.45fbd31+dfsg-2
 > >  > Severity: important
 > >  > Tags: sid bullseye
 > >  >
 > >  > building libsis-base-java (or running the jni) leads to a bus 
error,
 > > usually
 > >  > caused by unaligned memory accesses.
 > >  >
 > >  > [...]
 > >  > LC_ALL=C java -Djava.library.path=source/c/.libs -classpath
 > > sis-base-test.jar
 > >  > ch.systemsx.cisd.base.AllTests
 > >  > Application: base
 > >  > Version: UNKNOWN*
 > >  > Java VM: OpenJDK Server VM (v11.0.9.1+1-Debian-1)
 > >  > CPU Architecture: arm
 > >  > OS: Linux (v4.15.0-126-generic)
 > >  > Test class: NativeDataTests
 > >  >
 > >  > Running testFloatToByteNonNativeByteOrderPartialOutputArray
 > >  > Running testIntToByteToInt
 > >  >  Arguments: [0, 0]
 > >  >  Arguments: [0, 1]
 > >  > #
 > >  > # A fatal error has been detected by the Java Runtime Environment:
 > >  > #
 > >  > #  SIGBUS (0x7) at pc=0xf74b1d1c, pid=10186, tid=10187

Back to linux.debian.bugs.dist | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#977021: bus errors on armhf running on a 64bit kernel Matthias Klose <doko@debian.org> - 2020-12-10 07:20 +0100
  Bug#977021: bus errors on armhf running on a 64bit kernel Pierre Gruet <pgtdebian@free.fr> - 2020-12-10 17:50 +0100
    Bug#977021: bus errors on armhf running on a 64bit kernel Bernd Rinn <brinn@ethz.ch> - 2020-12-10 19:10 +0100
      Bug#977021: bus errors on armhf running on a 64bit kernel Pierre Gruet <pgtdebian@free.fr> - 2020-12-10 22:00 +0100
  Bug#977021: bus errors on armhf running on a 64bit kernel Pierre Gruet <pgtdebian@free.fr> - 2020-12-13 22:00 +0100
    Bug#977021: bus errors on armhf running on a 64bit kernel Bernd Rinn <brinn@ethz.ch> - 2020-12-14 01:10 +0100
      Bug#977021: bus errors on armhf running on a 64bit kernel Pierre Gruet <pgtdebian@free.fr> - 2020-12-15 11:00 +0100

csiph-web