Source: raft Version: 0.15.0-1 Severity: normal Tags: patch Dear Maintainer,
The follow two tests fail on hppa: FAIL: test/integration/uv FAIL: test/unit/core See: https://buildd.debian.org/status/fetch.php?pkg=raft&arch=hppa&ver=0.15.0-1&stamp=1661714018&raw=0 The test/unit/core test fails because test_compress.c fails to allocate 357198848 bytes. This is fixed by adding hppa to the list of 32-bit architectures in the Lower-mipsel_malloc.patch patch. The test/integration/uv fails because of bad addresses in the io_submit system call: src/uv_append.c:197 - write: io_submit: bad address in system call argument Error: test/integration/test_uv_append.c:630: assertion failed: status == result->status (18 == 0) Error: child killed by signal 6 (Aborted) append/nonBlockingBarrierLongBlockingTask [ ERROR ] The Debian hppa architecture is 32-bit big endian. One can see the problem with strace: [pid 27905] io_submit(0xf5854000, 1, [{aio_data=0x2913c000000000, aio_lio_opcode=IOCB_CMD_PWRITEV, aio_fildes=13, aio_buf=0x29159000000000, aio_nbytes=1, aio_offset=0}]) = -1 EFAULT (Bad address) The aio_data and aio_buf arguments are passed incorrectly for a 32-bit big-endian architecture. The attached hppa-uv_writer.patch patch fixes the and the testsuite now runs without fails. See: https://buildd.debian.org/status/fetch.php?pkg=raft&arch=hppa&ver=0.15.0-1&stamp=1663183915&raw=0 Regards, Dave Anglin -- System Information: Debian Release: bookworm/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable') merged-usr: no Architecture: hppa (parisc64) Kernel: Linux 5.19.8+ (SMP w/4 CPU threads) Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
Description: Lower malloc() size for mipsel For unknown reason this is nearly the max mipsel can malloc() Author: Laszlo Boszormenyi (GCS) <g...@debian.org> Forwarded: no Last-Update: 2022-04-24 --- Index: raft-0.15.0/test/unit/test_compress.c =================================================================== --- raft-0.15.0.orig/test/unit/test_compress.c +++ raft-0.15.0/test/unit/test_compress.c @@ -128,7 +128,10 @@ TEST(Compress, compressDecompressRandomO } static char* len_nonrandom_one_params[] = { -#if !defined(__LP64__) && (defined(__arm__) || defined(__i386__) || defined(__mips__)) +#if defined(__MIPSEL__) +/* mipsel has lower malloc limits */ + "4096", "65536", "4194304", "1073741824", "1427483000", +#elif !defined(__LP64__) && (defined(__arm__) || defined(__hppa__) || defined(__i386__) || defined(__mips__)) /* 4KB 64KB 4MB 1GB INT_MAX (larger allocations fail on 32-bit archs */ "4096", "65536", "4194304", "1073741824", "2147483647", #else
Index: raft-0.15.0/src/uv_writer.c =================================================================== --- raft-0.15.0.orig/src/uv_writer.c +++ raft-0.15.0/src/uv_writer.c @@ -463,10 +463,18 @@ int UvWriterSubmit(struct UvWriter *w, req->iocb.aio_fildes = (uint32_t)w->fd; req->iocb.aio_lio_opcode = IOCB_CMD_PWRITEV; req->iocb.aio_reqprio = 0; +#if defined(__hppa__) + req->iocb.aio_buf = (uintptr_t)bufs; +#else *((void **)(&req->iocb.aio_buf)) = (void *)bufs; +#endif req->iocb.aio_nbytes = n; req->iocb.aio_offset = (int64_t)offset; +#if defined(__hppa__) + req->iocb.aio_data = (uintptr_t)req; +#else *((void **)(&req->iocb.aio_data)) = (void *)req; +#endif #if defined(RWF_HIPRI) /* High priority request, if possible */