- Package:
- src:python-fitsio
- Source:
- python-fitsio
- Submitter:
- Steve McIntyre
- Date:
- 2021-09-22 04:28:27 UTC
- Severity:
- important
- Tags:
Hi! First seen on the build arm-arm-01 which is an arm64 machine configured to build for armhf, build log at https://buildd.debian.org/status/fetch.php?pkg=python-fitsio&arch=armhf&ver=0.9.11%2Bdfsg-1%2Bb2&stamp=1530604224&raw=0 I can similarly reproduce this on other arm64 hardware. Backtrace shows: (gdb) bt #0 ffi8fi8 (input=input@entry=0x16568df, ntodo=ntodo@entry=1, scale=1, zero=0, output=output@entry=0xfff3d1a0, status=status@entry=0xfff44384) at putcolj.c:1871 #1 0xf6cc5a8a in ffpcljj (fptr=0x15d3660, colnum=8, firstrow=<optimized out>, firstelem=1, nelem=1, array=0x16568df, status=0xfff44384) at putcolj.c:1428 #2 0xf6cc5c3c in ffpcljj (fptr=<optimized out>, colnum=<optimized out>, firstrow=<optimized out>, firstelem=firstelem@entry=1, nelem=nelem@entry=1, array=array@entry=0x16568df, status=status@entry=0xfff44384) at putcolj.c:1538 #3 0xf6cbc2b4 in ffpcl (fptr=<optimized out>, datatype=<optimized out>, colnum=<optimized out>, firstrow=1, firstelem=1, nelem=1, array=0x16568df, status=0xfff44384) at putcol.c:701 #4 0xf6e02a26 in ?? () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) p input $2 = (LONGLONG *) 0x16568df Disassembly of the problem area gives: 0xf6cc54ce <+206>: ldr.w r0, [r10] 0xf6cc54d2 <+210>: ldmia.w sp!, {r4, r5, r6, r7, r8, r10, r11, pc} 0xf6cc54d6 <+214>: cmp r1, #0 0xf6cc54d8 <+216>: ble.n 0xf6cc54ca <ffi8fi8+202> 0xf6cc54da <+218>: subs r2, #8 0xf6cc54dc <+220>: add.w r1, r0, r1, lsl #3 => 0xf6cc54e0 <+224>: ldrd r4, r5, [r0], #8 0xf6cc54e4 <+228>: cmp r1, r0 0xf6cc54e6 <+230>: strd r4, r5, [r2, #8]! 0xf6cc54ea <+234>: bne.n 0xf6cc54e0 <ffi8fi8+224> 0xf6cc54ec <+236>: vpop {d8-d12} 0xf6cc54f0 <+240>: ldr.w r0, [r10] The offending ldrd instruction here clearly matches up with the source, which is the simple-case loop in ffi8fi8(): if (scale == 1. && zero == 0.) { for (ii = 0; ii < ntodo; ii++) output[ii] = input[ii]; } The ldrd instruction will be the read from input[ii]. That's clearly unaligned, given the LONGLONG *input which starts at 0x16568df. This doesn't look like an issue with the compiler coalescing unrelated values (which was an initial guess at the problem when discussing it in #debian-buildd). It's simply reading an unaligned 64-bit value and that's failing.
...
as we have (slow) alignment fixups enabled in the kernel. Disabling
that briefly and rebuilding, I see exactly the same build failure:
...
I: pybuild base:217: cd /home/93sam/build/python-fitsio/python-fitsio-0.9.11+dfsg/.pybuild/cpython2_2.7_fitsio/build; python2.7 -m unittest discover -v
testAsciiTableWriteRead (fitsio.test.TestReadWrite) ... ok
testBz2Read (fitsio.test.TestReadWrite) ... skipped 'bzip2 is not supported with debian cfitsio package'
testChecksum (fitsio.test.TestReadWrite) ... Bus error
E: pybuild pybuild:336: test: plugin distutils failed with: exit code=135: cd /home/93sam/build/python-fitsio/python-fitsio-0.9.11+dfsg/.pybuild/cpython2_2.7_fitsio/build; python2.7 -m unittest discover -v
dh_auto_test: pybuild --test -i python{version} -p 2.7 returned exit code 13
debian/rules:10: recipe for target 'build' failed
make: *** [build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
control: forwarded -1 https://github.com/esheldon/fitsio/issues/86 This is upstream issue #86. Marking the bug as forwarded.
We believe that the bug you reported is fixed in the latest version of python-fitsio, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to 902990@bugs.debian.org, and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Ole Streicher <olebole@debian.org> (supplier of updated python-fitsio package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing ftpmaster@ftp-master.debian.org) Format: 1.8 Date: Thu, 05 Jul 2018 11:09:18 +0200 Source: python-fitsio Binary: python-fitsio python3-fitsio Architecture: source Version: 0.9.11+dfsg-2 Distribution: unstable Urgency: medium Maintainer: Debian Astronomy Team <debian-astro-maintainers@lists.alioth.debian.org> Changed-By: Ole Streicher <olebole@debian.org> Description: python-fitsio - Python 2 library to read from and write to FITS files python3-fitsio - Python 3 library to read from and write to FITS files Closes: 902990 Changes: python-fitsio (0.9.11+dfsg-2) unstable; urgency=medium . * Update VCS fields to use salsa.d.o * Push compat to 11 * Push Standards-Version to 4.1.5. Change copyright format URL to https * Fix aligned read (Closes: #902990) Checksums-Sha1: 3a442712fbd9daa3891deb03d0272a01c7ddcbd6 2200 python-fitsio_0.9.11+dfsg-2.dsc 7e822364fabb9d76ca244236d8ce00d47d53e508 8344 python-fitsio_0.9.11+dfsg-2.debian.tar.xz Checksums-Sha256: a7bc120b9695f2d404e39e3a34fde39f27406737f47dcd119d7551bb489d345f 2200 python-fitsio_0.9.11+dfsg-2.dsc 5f5acfcd8201192e29482bc335a93cba2b9a6e4d6207a88075764d2a8136c0b2 8344 python-fitsio_0.9.11+dfsg-2.debian.tar.xz Files: 11c33c6307a9dd8ec6a0250493c7e8d4 2200 python optional python-fitsio_0.9.11+dfsg-2.dsc b9f940df14266a220bcdc98e906bbbfd 8344 python optional python-fitsio_0.9.11+dfsg-2.debian.tar.xz -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEuvxshffLFD/utvsVcRWv0HcQ3PcFAls9+EsACgkQcRWv0HcQ 3PfjUw//Yu38LD2urxchzOuKd9agZhwNdKvrQMmGx21KSKNRq3epofOd1tWU4k7V B/gFD9AbxNPtI+XCygwCEXIF353eGjQOTKaao5SuRAAJ7yT09KjmjQn+B1pjI527 7RdyEgpFJUPVP6HgqX5Y0gB1sk5YV2WJZvMWMhEXvBRN1wisQhCS9vHeLvY2ANzr fKmKrFboM4hU8ZuQ06MrVoCZbCxYvByhkvKs0ylEVEAPr/EJ2/7P5ptx2gEG/BVT 2yf7qd5rjxON2AkvWpZEnY9YXYAZMeB19aSk5ea+RKx9GIKojXaPSmKmR5lWO37B 0TG8PZMgcNrKadVxz0+5LPr1wXAZkPFY2V5LQIfmWFbyRJ++EftiO5FxiJD7/q8U 64ZrQwFieDkJhCXNNXySBEJZPMuDLsAV13bPXpTlgVJqJaOgqHtpBRNggo3YNapK +bVM34tLpJ3cy5awHuOx/JC3qfcTcG5jMUpaVmyLmL6AwwnwdZ1J9pARe97uUzwW HKLAH2jXaVeoRSsXs3glWVniw8nkfKgvPiA+DbbdBmSTmRJFpUapiLgZ4JMeEUxF 3Z+gIU8P9vSQbTz+cD38/tVDnU0p+xXGJcUIL/JIBareDUsAZx13BxZ4g76Z9w0c ygB9FtYBNHPLWZ5LexaUue+qiiOTmMn7TccOtsFKXToKBfPpknY= =FWbf -----END PGP SIGNATURE-----
Hi, I still don't have a final solution here, and upstreams proposed solution does not work. Therefore, I adopted Ubuntus approach disabling the tests for armhf until a solution is found. This makes the package still usable on armhf (with the danger of running into an alignment problem), but allows to lower the severity to important. Cheers Ole
The original bug is resolved by disabling build time tests on armhf. The new one (with severity "important") is however kept open until the problem is resolved upstream. Cheers Ole
Hello, Good morning, We have gone through your samples from a partner and Here is our Order List. Please do bear in mind that we are very much in need of this order, quote your competitive prices. Kindly send the Order confirmation. Your early reply will be much appreciated. Best Regards, Maryanah Erwin. PT FINDORA INTERNUSA Jln Pahlawan 66 Kec. Arjawinangun 45162 CIREBON West-Java INDONESIA tel : +62 231 357334 fax: +62 231 357260 email: marketing@findora.com