Your message dated Mon, 27 Jul 2026 14:35:19 +0000
with message-id <[email protected]>
and subject line Bug#1142734: fixed in orc 1:0.4.42-4
has caused the Debian Bug report #1142734,
regarding orc: gst-plugins-bad1.0 FTBFS on riscv64 due to invalid RVV code 
generation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1142734: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1142734
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: orc
Version: 1:0.4.42-3
Severity: important

Dear maintainer,

gst-plugins-bad1.0 fails to build from source when built on a RISC-V CPU
with vector instructions [1], due to a SIGILL in the elements_openjpeg
test. Disabling rvv instruction detection in ORC workarounds the issue.

I tracked the issue down to the following ORC generated code:

   0x0000003f878a9220:  ld      a1,24(a0)
   0x0000003f878a9224:  ld      a2,56(a0)
   0x0000003f878a9228:  ld      a3,64(a0)
   0x0000003f878a922c:  ld      a4,72(a0)
   0x0000003f878a9230:  ld      a5,80(a0)
   0x0000003f878a9234:  vsetvli t0,zero,e16,m4,ta,ma
   0x0000003f878a9238:  li      t0,4
   0x0000003f878a923c:  vmv.v.x v16,t0
   0x0000003f878a9240:  lw      t2,8(a0)
   0x0000003f878a9244:  beqz    t2,0x3f878a9308
   0x0000003f878a9248:  vsetvli t1,t2,e16,m2,ta,ma
   0x0000003f878a924c:  sub     t2,t2,t1
   0x0000003f878a9250:  vle32.v v24,(a2)
   0x0000003f878a9254:  vnsrl.wi        v8,v24,16
   0x0000003f878a9258:  vnsrl.wi        v0,v24,0
   0x0000003f878a925c:  vsetvli t0,zero,e16,m4,ta,ma
   0x0000003f878a9260:  vzext.vf2       v24,v8
   0x0000003f878a9264:  vsetvli zero,t1,e16,m2,ta,ma
   0x0000003f878a9268:  vle32.v v4,(a5)
   0x0000003f878a926c:  vnsrl.wi        v8,v4,16
   0x0000003f878a9270:  vsetvli t0,zero,e16,m4,ta,ma
   0x0000003f878a9274:  vzext.vf2       v4,v8
   0x0000003f878a9278:  vadd.vv v12,v24,v4
   0x0000003f878a927c:  vsetvli zero,t1,e16,m2,ta,ma
   0x0000003f878a9280:  vle32.v v24,(a3)
   0x0000003f878a9284:  vnsrl.wi        v8,v24,16
   0x0000003f878a9288:  vsetvli t0,zero,e16,m4,ta,ma
   0x0000003f878a928c:  vzext.vf2       v24,v8
   0x0000003f878a9290:  vsetvli zero,t1,e16,m2,ta,ma
   0x0000003f878a9294:  vle32.v v4,(a4)
   0x0000003f878a9298:  vnsrl.wi        v8,v4,16
   0x0000003f878a929c:  vsetvli t0,zero,e16,m4,ta,ma
   0x0000003f878a92a0:  vzext.vf2       v4,v8
   0x0000003f878a92a4:  vadd.vv v28,v24,v4
   0x0000003f878a92a8:  li      t0,1
   0x0000003f878a92ac:  vsll.vx v4,v28,t0
   0x0000003f878a92b0:  vadd.vv v24,v28,v4
   0x0000003f878a92b4:  vadd.vv v4,v12,v24
   0x0000003f878a92b8:  vadd.vv v24,v4,v16
   0x0000003f878a92bc:  li      t0,3
   0x0000003f878a92c0:  vsrl.vx v4,v24,t0
   0x0000003f878a92c4:  vmax.vx v8,v4,zero
   0x0000003f878a92c8:  vsetvli zero,zero,e8,m1,ta,ma
=> 0x0000003f878a92cc:  vnclipu.wi      v8,v8,0
   0x0000003f878a92d0:  vsetvli zero,zero,e16,m2,ta,ma
   0x0000003f878a92d4:  vsetvli zero,t1,e32,m4,ta,ma
   0x0000003f878a92d8:  vzext.vf2       v12,v0
   0x0000003f878a92dc:  vzext.vf2       v4,v8
   0x0000003f878a92e0:  vsll.vi v4,v4,16
   0x0000003f878a92e4:  vor.vv  v24,v12,v4
   0x0000003f878a92e8:  vse32.v v24,(a1)
   0x0000003f878a92ec:  slli    t1,t1,0x2
   0x0000003f878a92f0:  add     a1,a1,t1
   0x0000003f878a92f4:  add     a2,a2,t1
   0x0000003f878a92f8:  add     a3,a3,t1
   0x0000003f878a92fc:  add     a4,a4,t1
   0x0000003f878a9300:  add     a5,a5,t1
   0x0000003f878a9304:  bnez    t2,0x3f878a9248
   0x0000003f878a9308:  ret

The trap occurs at the vnclipu.wi instruction. But further debugging
shows that it is actually not the relevant instruction. SIGILL happens
because the preceding vsetvli instruction set vtype to vill (unsupported
vector configuration), so any following vector instruction fail.

Digging a bit more into the problem, it is caused by the two following
vsetvli instructions:

   0x0000003f878a929c:  vsetvli t0,zero,e16,m4,ta,ma
   ...
   0x0000003f878a92c8:  vsetvli zero,zero,e8,m1,ta,ma

On the SpacemiT K1 (used by the rv-manda-04 build daemon where it
fails), VLEN=256 bits. Therefore the first vsetvli instruction
configures:
- SEW = 16
- LMUL = 4
- VLMAX = VLEN / SEW * LMUL = 256 / 16 * 4 = 64
- VL = VLMAX (as AVL = x0) = 64

The second instructions configures:
- SEW = 8
- LMUL = 1
- VLMAX = VLEN / SEW * LMUL = 256 / 8 * 1 = 32

Since both rs1 = x0 and rd = x0, the current vl is reused as the AVL.
However, according to the RVV 1.0 specification:

"When rs1=x0 and rd=x0, the instruction operates as if the current
vector length in vl is used as the AVL, and the resulting value is
written to vl, but not to a destination register. This form can only be
used when VLMAX and hence vl is not actually changed by the new SEW/LMUL
ratio. Use of the instruction with a new SEW/LMUL ratio that would
result in a change of VLMAX is reserved. Implementations may set vill in
this case."

The SpacemiT K1 (and also the SpacemiT K3) sets vill in this situation,
which is a permitted way to signal the undefined behaviour of this
sequence. That explains why vtype is set to vill and why the next vector
instruction fails.

I still have to understand why the ORC RVV backend emits such sequence
(and looking at above it also generate redundant vsetvli sequences
without vector instructions in between.

Regards
Aurelien

[1] 
https://buildd.debian.org/status/fetch.php?pkg=gst-plugins-bad1.0&arch=riscv64&ver=1.28.5-2&stamp=1784782699&raw=0
 

--- End Message ---
--- Begin Message ---
Source: orc
Source-Version: 1:0.4.42-4
Done: Marc Leeman <[email protected]>

We believe that the bug you reported is fixed in the latest version of
orc, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marc Leeman <[email protected]> (supplier of updated orc package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 27 Jul 2026 16:02:07 +0200
Source: orc
Architecture: source
Version: 1:0.4.42-4
Distribution: unstable
Urgency: medium
Maintainer: Maintainers of GStreamer packages <[email protected]>
Changed-By: Marc Leeman <[email protected]>
Closes: 1142734
Changes:
 orc (1:0.4.42-4) unstable; urgency=medium
 .
   * d/patches: add 0002-riscv-fix-convsusn-vsetvli-to-preserve-vl.patch
     (Closes: #1142734)
Checksums-Sha1:
 e7587b991e37674b53d0f0b485109158eb66f743 2474 orc_0.4.42-4.dsc
 2568a846d8701f5de5f67dcd620ca60d1a7aefcd 21468 orc_0.4.42-4.debian.tar.xz
 e4f3923f4d0904cb0b6827085255a0b7dd869d0e 7331 orc_0.4.42-4_source.buildinfo
Checksums-Sha256:
 7b82394b87e2e23e12741f84ad08939120044bf1731d6357ae9f56c7447965b0 2474 
orc_0.4.42-4.dsc
 a9c2c0336135f7cc33b8eb32339ab6a956f462ed1bd0367d63b0e3408a1e677e 21468 
orc_0.4.42-4.debian.tar.xz
 365ed8a9246c37f91be3cec4dd4d26717a7c8d264c26ce70d93ec655cf22d52a 7331 
orc_0.4.42-4_source.buildinfo
Files:
 53efd770717753f31f8211d1c1c2f11c 2474 devel optional orc_0.4.42-4.dsc
 3b9ccb688f9f99f2608b417c470b2a0a 21468 devel optional 
orc_0.4.42-4.debian.tar.xz
 b807f2686a0dcdb40aeb96af31d5057f 7331 devel optional 
orc_0.4.42-4_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQJKBAEBCgA0FiEEgnz9dLpGgVKgQfOgempPF1mVplsFAmpnZeoWHG1hcmMubGVl
bWFuQGdtYWlsLmNvbQAKCRB6ak8XWZWmW1qsEACr/BBuBThGSjQ1s3EVwzqOOaPZ
lAXU606GG2HlqsoyzqQr43QRlVJpTGZVdYl6GHnV1ZpXLQP5AF1TG5Wxdy4L8w4U
l2BTW3u+NVoC3Z8Q1ZQpe5Sk0wyxx6uY9wE+cbV+xYGcmynMBJPVOOdTWsLcih+n
swhMX7gKvroJRIIt/BfxpufOmhhT4ty/M2/bNJCDx29t5CGlzN9W7nWtgGjldl7c
QuOwZnkYIBfoPXeBa/ukQTh3DQKT/BUR3v9EJunmIoSyzgud7DguQa9opqy/aGhs
Dyxkm+DSQv1UmF3Do4AKHSqNAqvE5P5rVBB7EujpIewn0JXF63dm5OFxmALmWzLa
Iz4O5P+LGjypTKKR/yx8sYlfU0tiHuJ4zlMNEJlaT5ilsrqvs7hHNq5nT6f5GJRb
krea8JQY6PasfDUM0phtmECE/MRTKlErVwayJbdqZh48yV5ivHaz3t6tbied4adR
YH/N8adVRjCj8aidrRumhpDThbj8GoBtNssbGdGnCz/utUR225/4Mq5p1XHObOBu
yTSu93vwRrlD4t+rw9D7WQ7SBWKLBxcvJ9HW8pfsj92S17fnoDgVHGowO37zXkG/
GCp0JGzb9TWBzSwQOYvKhWgP+6W0amgrVHL+G0nIIId/c0bklWVLYcn/8j+xpR9j
XEUB8rhQng00hINmpw==
=60Y4
-----END PGP SIGNATURE-----

Attachment: pgpjWwvA_LFUv.pgp
Description: PGP signature


--- End Message ---

Reply via email to