GnuTLS fails to build for aarch64 in QEMU

  • Open
  • quality assurance status badge
Details
3 participants
  • Matevz Langus
  • Maxim Cournoyer
  • Lars Rustand
Owner
unassigned
Submitted by
Lars Rustand
Severity
normal
L
L
Lars Rustand wrote on 12 Jan 07:52 +0100
(address . bug-guix@gnu.org)
87mstbqbwx.fsf@gmail.com
GnuTLS fails to build with --system=aarch64-linux. The test "test-free"
fails. Output follows below:


make[6]: 'libtests.a' is up to date.
CCLD test-xalloc-die
make[6]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make check-TESTS
make[6]: Entering directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[7]: Entering directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
PASS: test-alignasof
PASS: test-accept
PASS: test-arpa_inet
PASS: test-alloca-opt
PASS: test-assert
PASS: test-bind
PASS: test-array_list
PASS: test-binary-io.sh
PASS: test-byteswap
PASS: test-bitrotate
PASS: test-c-ctype
PASS: test-calloc-gnu
PASS: test-cloexec
PASS: test-canonicalize-lgpl
PASS: test-close
PASS: test-c-strcase.sh
PASS: test-connect
PASS: test-ctype
PASS: test-environ
PASS: test-dup2
PASS: test-errno
PASS: test-explicit_bzero
PASS: test-fcntl
PASS: test-fcntl-h
PASS: test-fdopen
PASS: test-fgetc
PASS: test-float
PASS: test-fopen-gnu
PASS: test-fopen
PASS: test-fputc
PASS: test-fread
PASS: test-fpending.sh
PASS: test-fseek2.sh
PASS: test-fseek.sh
PASS: test-fseeko2.sh
PASS: test-fseeko.sh
PASS: test-fseeko3.sh
PASS: test-error.sh
PASS: test-fstat
PASS: test-fseeko4.sh
PASS: test-ftell.sh
PASS: test-ftell2.sh
FAIL: test-free
PASS: test-ftell3
PASS: test-ftello3
PASS: test-ftello.sh
PASS: test-ftello2.sh
PASS: test-ftello4.sh
PASS: test-func
PASS: test-getaddrinfo
PASS: test-fwrite
PASS: test-ftruncate.sh
PASS: test-getcwd-lgpl
PASS: test-getdelim
PASS: test-getline
PASS: test-getdtablesize
PASS: test-getpeername
PASS: test-getprogname
PASS: test-gettimeofday
PASS: test-scratch-buffer
PASS: test-ignore-value
PASS: test-inet_ntop
PASS: test-inet_pton
PASS: test-intprops
PASS: test-inttostr
PASS: test-inttypes
PASS: test-ioctl
PASS: test-isblank
PASS: test-langinfo
PASS: test-limits-h
PASS: test-linked_list
PASS: test-listen
PASS: test-linkedhash_list
PASS: test-locale
PASS: test-localename
PASS: test-once1
PASS: test-once2
PASS: test-rwlock1
PASS: test-lstat
PASS: test-malloc-gnu
PASS: test-lseek.sh
PASS: test-memset_explicit
PASS: test-malloca
PASS: test-netdb
PASS: test-hash
PASS: test-netinet_in
PASS: test-nstrftime
PASS: test-open
PASS: test-parse-datetime
PASS: test-pathmax
PASS: test-perror2
PASS: test-pipe
PASS: test-pselect
PASS: test-pthread
PASS: test-nanosleep
PASS: test-pthread-thread
PASS: test-raise
PASS: test-rawmemchr
PASS: test-read-file
PASS: test-realloc-gnu
PASS: test-readlink
PASS: test-reallocarray
PASS: test-perror.sh
PASS: test-recvfrom
PASS: test-recv
PASS: test-sched
PASS: test-select
PASS: test-send
PASS: test-sendto
PASS: test-setenv
PASS: test-pthread_sigmask2
PASS: test-setlocale_null
PASS: test-pthread_sigmask1
PASS: test-setlocale1.sh
PASS: test-setsockopt
PASS: test-select-out.sh
PASS: test-shutdown
PASS: test-signal-h
PASS: test-setlocale2.sh
PASS: test-setlocale_null-mt-one
PASS: test-select-in.sh
PASS: test-snprintf
PASS: test-sockets
PASS: test-stat
PASS: test-stat-time
PASS: test-stdbool
PASS: test-stdckdint
PASS: test-stdint
PASS: test-stddef
PASS: test-stdio
PASS: test-stdlib
PASS: test-strerror
PASS: test-strerror_r
PASS: test-sigprocmask
PASS: test-memchr
PASS: test-string
PASS: test-strings
PASS: test-sleep
PASS: test-strverscmp
PASS: test-strnlen
PASS: test-strtoll
PASS: test-sys_ioctl
PASS: test-symlink
PASS: test-sys_select
PASS: test-sys_socket
PASS: test-sys_time
PASS: test-sys_stat
PASS: test-sys_types
PASS: test-sys_uio
PASS: test-setlocale_null-mt-all
PASS: test-thread_self
PASS: test-thread_create
PASS: test-timespec
PASS: test-time
PASS: test-unistd
PASS: test-unsetenv
PASS: test-vasprintf
PASS: test-vasnprintf
PASS: test-verify
PASS: test-vsnprintf
PASS: test-wchar
PASS: test-usleep
PASS: test-init.sh
PASS: test-xalloc-die.sh
PASS: test-tls
PASS: test-lock
PASS: test-verify.sh
============================================================================
Testsuite summary for GnuTLS 3.8.2
============================================================================
# TOTAL: 167
# PASS: 166
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
============================================================================
See src/gl/tests/test-suite.log
Please report to bugs@gnutls.org
============================================================================
make[7]: *** [Makefile:5011: test-suite.log] Error 1
make[7]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[6]: *** [Makefile:5119: check-TESTS] Error 2
make[6]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[5]: *** [Makefile:6379: check-am] Error 2
make[5]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[4]: *** [Makefile:4903: check-recursive] Error 1
make[4]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[3]: *** [Makefile:6381: check] Error 2
make[3]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl/tests'
make[2]: *** [Makefile:3949: check-recursive] Error 1
make[2]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl'
make[1]: *** [Makefile:4100: check] Error 2
make[1]: Leaving directory '/tmp/guix-build-gnutls-3.8.2.drv-0/gnutls-3.8.2/src/gl'
make: *** [Makefile:2324: check-recursive] Error 1

Test suite failed, dumping logs.

--- ./src/gl/tests/test-suite.log -------------------------------------------

===============================================
GnuTLS 3.8.2: src/gl/tests/test-suite.log
===============================================

# TOTAL: 167
# PASS: 166
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test-free
===============

qemu-aarch64: ../../linux-user/mmap.c:801: mmap_reserve_or_unmap: Assertion `ret == 0' failed.
**
ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
Bail out! ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
FAIL test-free (exit status: 127)


error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("check" "-j" "8") exit-status: 2 term-signal: #f stop-signal: #f>
phase `check' failed after 175.9 seconds
command "make" "check" "-j" "8" failed with status 2
M
M
Maxim Cournoyer wrote on 19 Jan 04:28 +0100
(name . Lars Rustand)(address . rustand.lars@gmail.com)(address . 68399@debbugs.gnu.org)
87wms6j91m.fsf@gmail.com
Hi,

Lars Rustand <rustand.lars@gmail.com> writes:

[...]

Toggle quote (26 lines)
> --- ./src/gl/tests/test-suite.log -------------------------------------------
>
> ===============================================
> GnuTLS 3.8.2: src/gl/tests/test-suite.log
> ===============================================
>
> # TOTAL: 167
> # PASS: 166
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 1
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: test-free
> ===============
>
> qemu-aarch64: ../../linux-user/mmap.c:801: mmap_reserve_or_unmap: Assertion `ret == 0' failed.
> **
> ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
> Bail out! ERROR:../../accel/tcg/cpu-exec.c:532:cpu_exec_longjmp_cleanup: assertion failed: (cpu == current_cpu)
> FAIL test-free (exit status: 127)


That one looks like a probable discrepancy due to QEMU emulation more
than a bug in GnuTLS.

On the other hand, we can see from our CI that an aarch64-linux (actual
hardware) build also failed with:

Toggle snippet (69 lines)
FAIL: tls13-resume-x509
=======================

client:668: *** Previous session was NOT resumed
try to resume from session ticket (different cipher order)
server:911: server: session_is_resumed error (1)
try to resume from session ticket (different cipher order)
FAIL tls13-resume-x509 (exit status: 1)

FAIL: tls13-early-data
======================

client:472: client: max_early_data_size mismatch -1 != 1024
server:692: server: Handshake has failed (The TLS connection was non-properly terminated.)

FAIL tls13-early-data (exit status: 1)

[...]

FAIL: dtls-repro-20170915
=========================

negotiating DTLS 1.2 with cli-cert
client: Resource temporarily unavailable, try again.
server: The operation timed out
dtls_try_with_key_mtu:578: Handshake failed
FAIL dtls-repro-20170915 (exit status: 1)

FAIL: resume-with-stek-expiration
=================================


testing tls1.2 resumption

STEK was rotated!
client: Handshake was completed
client: Success: Session was NOT resumed
server: Handshake was completed
server: Success: Session was NOT resumed
STEK was rotated!
client: Handshake was completed
client: Success: Session was resumed
server: Handshake was completed
server: Success: Session was resumed
STEK was rotated!
client: Handshake was completed
client: Success: Session was resumed
server: Handshake was completed
server: Success: Session was resumed
STEK was rotated!
client: Handshake was completed
client: Success: Session was NOT resumed
server: Handshake was completed
server: Success: Session was NOT resumed

testing tls1.3 resumption

client: Handshake was completed
client: Success: Session was NOT resumed
STEK was rotated!
server: Handshake was completed
server: Success: Session was NOT resumed
client: Handshake was completed
resume_and_close:140: client: Session was not resumed (but should)
STEK was rotated!
server:253: server: Handshake failed: Error in the push function.
FAIL resume-with-stek-expiration (exit status: 1)


We should check whether upstream is already tracking these failures and
disable the tests in the meantime in our package of QEMU for this
architecture.

--
Thanks,
Maxim
M
M
Matevz Langus wrote on 22 Mar 09:09 +0100
GnuTLS fails to build for aarch64 in QEMU
(address . 68399@debbugs.gnu.org)
71753114-d8c7-93a6-0893-d1d876200bea@borea.si
I did have same issue (FAIL: tls13-resume-x509) on ppc64le native (non
QEMU) build with versions 3.8.0, 3.8.1, 3.8.2 and also latest 3.7.x.
But 3.8.3 compiled fine.

regards,
  Matevz
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 68399@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68399
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch