#917236 nanomsg 1.1.5+dfsg-1: FTBFS, alignment problem

Package:
src:nanomsg
Source:
nanomsg
Submitter:
Steve McIntyre
Date:
2024-04-25 17:54:29 UTC
Severity:
important
Tags:
#917236#5
Date:
2018-12-24 14:15:08 UTC
From:
To:
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/nanomsg_1.1.5+dfsg-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@mjolnir:~/debian/build/nanomsg/nanomsg-1.1.5+dfsg$ gdb obj-arm-linux-gnueabi/ws_async_shutdown obj-arm-linux-gnueabi/core

...

warning: core file may not match specified executable file.
[New LWP 5270]
[New LWP 5271]
[New LWP 5268]
[New LWP 5277]
[New LWP 5275]
[New LWP 5278]
[New LWP 5269]
[New LWP 5272]
[New LWP 5273]
[New LWP 5276]
[New LWP 5274]
[New LWP 5279]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabi/libthread_db.so.1".
Core was generated by `/home/steve/debian/build/nanomsg/nanomsg-1.1.5+dfsg/obj-arm-linux-gnueabi/ws_as'.
Program terminated with signal SIGBUS, Bus error.
#0  0xf7d14b58 in nn_sws_recv (self=0x17ed380, msg=0x0) at ./src/transports/ws/sws.c:573
573         cmsg->cmsg_level = NN_WS;
[Current thread is 1 (Thread 0xf7316460 (LWP 5270))]
(gdb) p cmsg
$1 = (struct nn_cmsghdr *) 0xf7315d9d
(gdb) p *cmsg
$2 = {cmsg_len = 0, cmsg_level = 0, cmsg_type = 0}
(gdb) p cmsg->smsg_level
There is no member named smsg_level.
(gdb) p cmsg->cmsg_level
$3 = 0
(gdb) p &cmsg->cmsg_level
$4 = (int *) 0xf7315da1

The definition of nn_cmsghdr:

struct nn_cmsghdr {
    size_t cmsg_len;
    int cmsg_level;
    int cmsg_type;
};

says that cmsg_level is an int, but the structure here is not aligned
appropriately.

#917236#12
Date:
2021-09-22 04:13:21 UTC
From:
To:
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

#917236#17
Date:
2023-12-14 13:59:02 UTC
From:
To:
forwarded 917236 https://github.com/nanomsg/nanomsg/issues/1105