control: severity -1 serious control: tags -1 patch pending Patch uploaded in sid, since the current NMU can't migrate due to this bug
G. On Sat, 29 Dec 2018 19:23:33 +0000 Steve McIntyre <st...@einval.com> wrote: > Source: pywavelets > Version: 0.5.1-1.1 > Severity: important > User: debian-...@lists.debian.org > Usertags: alignment > > Hi! > > I've been doing a full rebuild of the Debian archive, building all > source packages targeting armel and armhf using arm64 hardware. We are > planning in future to move all of our 32-bit armel/armhf builds to > using arm64 machines, so this rebuild is to identify packages that > might have problems with this configuration. > > A feature of the arm64 kernel is that it does *not* support fixing up > code with broken alignment, so code that might have built and run OK > on our older armel/armhf build machines due to kernel fixups will now > fail. > > When building your package, I've found a bus error (aka alignment > fault). The full log is online at > > > https://www.einval.com/debian/arm/rebuild-logs/armel/FAIL/pywavelets_0.5.1-1.1_armel.log > > for reference > > I've done a quick bit of debugging to find the source of the > bug. Here's a gdb stacktrace and variable printout to demonstrate the > problem. > > (sid-armel)steve@maul:~/debian/build/pywavelets/pywavelets-0.5.1$ gdb > /usr/bin/python2.7 core > ... > Reading symbols from /usr/bin/python2.7...(no debugging symbols found)...done. > [New LWP 3291] > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1". > Core was generated by `python2.7 -c import sys ; sys.path.insert(0, > '/home/steve/debian/build/pywavele'. > Program terminated with signal SIGBUS, Bus error. > #0 double_downcoef_axis (input=0x1011b90, input_info=..., output=0xfe4500, > output_info=..., wavelet=0x1161b78, axis=0, coef=COEF_APPROX, > dwt_mode=MODE_SYMMETRIC, swt_level=0, > transform=DWT_TRANSFORM) at pywt/_extensions/c/wt.template.c:100 > 100 temp_input[j] = *(TYPE *)(((char *) input) + > input_offset > (gdb) list > 95 > 96 // Copy to temporary input if necessary > 97 if (make_temp_input) > 98 for (j = 0; j < input_info.shape[axis]; ++j) > 99 // Offsets are byte offsets, to need to cast to char > and back > 100 temp_input[j] = *(TYPE *)(((char *) input) + > input_offset > 101 + j * > input_info.strides[axis]); > 102 > 103 // Select temporary or direct output and input > 104 input_row = make_temp_input ? temp_input > (gdb) p input > $1 = (const double * const restrict) 0x1011b90 > (gdb) p input_offset > $2 = <optimized out> > (gdb) p j > $3 = <optimized out> > > This is a classic pattern for alignment problems. You can't just cast
diff -Nru pywavelets-0.5.1/debian/changelog pywavelets-0.5.1/debian/changelog --- pywavelets-0.5.1/debian/changelog 2019-12-13 19:37:57.000000000 +0100 +++ pywavelets-0.5.1/debian/changelog 2019-12-18 15:36:45.000000000 +0100 @@ -1,3 +1,11 @@ +pywavelets (0.5.1-1.3) unstable; urgency=medium + + * Non-maintainer upload. + * Grab patch from Ubuntu and Balint Reczey to fix an aligment problem on + armhf (Closes: #917652) + + -- Gianfranco Costamagna <locutusofb...@debian.org> Wed, 18 Dec 2019 15:36:45 +0100 + pywavelets (0.5.1-1.2) unstable; urgency=medium * Non-maintainer upload. diff -Nru pywavelets-0.5.1/debian/patches/03-Explicity-align-data-records-in-test_byte_offset.patch pywavelets-0.5.1/debian/patches/03-Explicity-align-data-records-in-test_byte_offset.patch --- pywavelets-0.5.1/debian/patches/03-Explicity-align-data-records-in-test_byte_offset.patch 1970-01-01 01:00:00.000000000 +0100 +++ pywavelets-0.5.1/debian/patches/03-Explicity-align-data-records-in-test_byte_offset.patch 2019-12-18 15:36:38.000000000 +0100 @@ -0,0 +1,25 @@ +From a2474a8d81a105c9abe525f5279568322f71a77c Mon Sep 17 00:00:00 2001 +From: Balint Reczey <balint.rec...@canonical.com> +Date: Fri, 5 May 2017 11:51:14 +0000 +Subject: [PATCH] TST: Explicity align data records in test_byte_offset() + +Also use dict for dtype definition because list format +ignores alignment. See https://github.com/numpy/numpy/issues/663 +--- + pywt/tests/test_multidim.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/pywt/tests/test_multidim.py ++++ b/pywt/tests/test_multidim.py +@@ -86,8 +86,9 @@ + + for mode in pywt.Modes.modes: + expected = pywt.dwtn(data, wavelet) +- padded = np.ones((3, 6), dtype=np.dtype([('data', data.dtype), +- ('pad', 'byte')])) ++ padded = np.ones((3, 6), dtype=np.dtype({'ddata': (data.dtype, 0), ++ 'pad': ('byte', data.dtype.itemsize)}, ++ align=True)) + padded[:] = data + padded_dwtn = pywt.dwtn(padded['data'], wavelet) + for key in expected.keys(): diff -Nru pywavelets-0.5.1/debian/patches/series pywavelets-0.5.1/debian/patches/series --- pywavelets-0.5.1/debian/patches/series 2015-11-08 20:38:24.000000000 +0100 +++ pywavelets-0.5.1/debian/patches/series 2019-12-18 15:36:38.000000000 +0100 @@ -1,3 +1,4 @@ 01-get_version_from_source.patch 02-remove_privacy_offenders.patch +03-Explicity-align-data-records-in-test_byte_offset.patch do_not_rewrite_git_revision_on_build.patch