Bug#1070959: /usr/lib/riscv64-linux-gnu/libapt-pkg.so.6.0.0: apt: riscv64: sun20i-d1: http(s): unhandled signal 4 code 0x1 in libapt-pkg.so.6.0.0

2024-05-11 Thread scpcom
Package: libapt-pkg6.0t64
Version: 2.9.2
Severity: important
File: /usr/lib/riscv64-linux-gnu/libapt-pkg.so.6.0.0
X-Debbugs-Cc: scp...@gmx.de

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?

When I run apt-get update on Allwinner D1 Nezha hardware I get the following 
errors:

[ 1610.448999] http[1575]: unhandled signal 4 code 0x1 at 0x003fa43ee5f8 in 
libapt-pkg.so.6.0.0[3fa4326000+19c000]
[ 1610.459512] CPU: 0 PID: 1575 Comm: http Not tainted 6.6.29+sun20i #sun20i
[ 1610.466313] Hardware name: Allwinner D1 Nezha (DT)
[ 1610.471109] epc : 003fa43ee5f8 ra : 003fa43ee5f8 sp : 
003fc95c63d0
[ 1610.478337]  gp : 002ae3eca800 tp : 003fa35a0780 t0 : 
000a
[ 1610.485563]  t1 : b8fa9f1e0b81022a t2 : 0064 s0 : 
002ae95abe00
[ 1610.492789]  s1 :  a0 : 002ae95a5f80 a1 : 

[ 1610.500014]  a2 : 002ae9565020 a3 :  a4 : 
0001
[ 1610.507239]  a5 : 0001 a6 : 002ae95a1590 a7 : 
144ef8bcb0a5ab57
[ 1610.514465]  s2 : 003fa3df9618 s3 : 002ae3eca0a0 s4 : 

[ 1610.521691]  s5 : 002ae959bda0 s6 : 002ae3eca0a0 s7 : 
003fc95c6d48
[ 1610.528917]  s8 : 003fc95c6d58 s9 : 003fc95c6690 s10: 
002ae9582730
[ 1610.536144]  s11: 003fa44ffd18 t3 : 003fa3d167cc t4 : 
003a
[ 1610.543371]  t5 : 0001 t6 : 005c
[ 1610.548688] status: 00024020 badaddr: 833f cause: 
0002
[ 1610.563819] https[1574]: unhandled signal 4 code 0x1 at 0x003fa5b155f8 
in libapt-pkg.so.6.0.0[3fa5a4d000+19c000]
[ 1610.574420] CPU: 0 PID: 1574 Comm: https Not tainted 6.6.29+sun20i #sun20i
[ 1610.581307] Hardware name: Allwinner D1 Nezha (DT)
[ 1610.586102] epc : 003fa5b155f8 ra : 003fa5b155f8 sp : 
003fd7b3b3c0
[ 1610.593329]  gp : 002ac54c6800 tp : 003fa4cc6780 t0 : 
000a
[ 1610.600554]  t1 : b8fa9f1e0b81022a t2 : 0064 s0 : 
002ad80d4e40
[ 1610.607780]  s1 :  a0 : 002ad80cefc0 a1 : 

[ 1610.615006]  a2 : 002ad808e018 a3 :  a4 : 
0001
[ 1610.622233]  a5 : 0001 a6 : 002ad80d2bc0 a7 : 
6fd82bd679d27ec2
[ 1610.629458]  s2 : 003fa5796618 s3 : 002ac54c60a0 s4 : 

[ 1610.636686]  s5 : 002ad80d5540 s6 : 002ac54c60a0 s7 : 
003fd7b3bd38
[ 1610.643912]  s8 : 003fd7b3bd48 s9 : 003fd7b3b680 s10: 
002ad80ab730
[ 1610.651138]  s11: 003fa5c26d18 t3 : 003fa56b37cc t4 : 
003a
[ 1610.658363]  t5 : 0001 t6 : 005c
[ 1610.663680] status: 00024020 badaddr: 833f cause: 
0002

The problem seems to exists since mid 2023.
On Ubuntu 23.04 there is no error.
I got the error on Ubuntu 23.10, 24.04 and latest Debian unstable.
The error only shows up on the real hardware and not inside a chroot 
(qemu-user-static riscv64 image on amd64 hardware).

   * What exactly did you do (or not do) that was effective (or
 ineffective)?

I build apt 2.9.2 from sources on Ubuntu 23.04 and installed the resulting 
libapt-pkg6.0t64 deb on Debian unstable which temporairly solved the problem.

It looks like a toolchain issue and apt may not be the only affected packge (I 
have seen the same "unhandled signal 4 code 0x1" on libvte)

*** End of the template - remove these template lines ***


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: riscv64

Kernel: Linux 6.6.29+sun20i (SMP w/1 CPU thread)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de
Shell: /bin/sh linked to /usr/bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages libapt-pkg6.0t64:riscv64 depends on:
ii  libbz2-1.0   1.0.8-5.1
ii  libc62.38-10
ii  libgcc-s114-20240429-1
ii  libgcrypt20  1.10.3-2+b1
ii  liblz4-1 1.9.4-2
ii  liblzma5 5.6.1+really5.4.5-1
ii  libstdc++6   14-20240429-1
ii  libsystemd0  255.5-1
ii  libudev1 255.5-1
ii  libxxhash0   0.8.2-2+b1
ii  libzstd1 1.5.5+dfsg2-2+b1
ii  zlib1g   1:1.3.dfsg+really1.3.1-1

Versions of packages libapt-pkg6.0t64:riscv64 recommends:
ii  apt  2.9.2

libapt-pkg6.0t64:riscv64 suggests no packages.

-- no debconf information



Bug#1070959: Aw: Bug#1070959 closed by Jessica Clarke (Re: Bug#1070959: /usr/lib/riscv64-linux-gnu/libapt-pkg.so.6.0.0: apt: riscv64: sun20i-d1: http(s): unhandled signal 4 code 0x

2024-05-18 Thread scpcom
> Gesendet: Dienstag, den 14.05.2024 um 17:21 Uhr
> Von: "Debian Bug Tracking System" 
> An: scpcom 
> Betreff: Bug#1070959 closed by Jessica Clarke  (Re: 
> Bug#1070959: /usr/lib/riscv64-linux-gnu/libapt-pkg.so.6.0.0: apt: riscv64: 
> sun20i-d1: http(s): unhandled signal 4 code 0x1 in libapt-pkg.so.6.0.0)
> 
> This is an automatic notification regarding your Bug report
> which was filed against the libapt-pkg6.0t64 package:
> 
> #1070959: /usr/lib/riscv64-linux-gnu/libapt-pkg.so.6.0.0: apt: riscv64: 
> sun20i-d1: http(s): unhandled signal 4 code 0x1 in libapt-pkg.so.6.0.0
> 
> It has been closed by Jessica Clarke .
> 
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Jessica Clarke 
>  by
> replying to this email.
> 
> 
> -- 
> 1070959: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070959
> Debian Bug Tracking System
> Contact ow...@bugs.debian.org with problems

> 0x833f is FENCE.TSO, which some of the T-Head cores notoriously
> failed to implement, thereby violating the RISC-V spec. LLVM has
> emitted it for a long time, but GCC didn’t until recently (14.1) so
> without doing proper architectural testing, just running Linux on top
> of it historically wouldn’t have revealed the issue.
> 
> OpenSBI 1.1 (released June 2022) emulates the instruction for this
> hardware, so update your firmware to a version that includes a
> recent-ish version of OpenSBI and pretends your hardware is more
> conforming.

Thank you, I will try to integrate a newer OpenSBI into my setup.