guix build fails on RISC-V due to python-py-cpuinfo test failure #33873

issue laanwj openend this issue on November 14, 2025
  1. laanwj commented at 4:16 pm on November 14, 2025: member

    i’m trying to do a guix build (of the master branch) on RISC-V hardware. The device is a Scaleway EM-RV1-C4M16S128-A server from Scaleway. It has a four core T-HEAD C910 CPU:

    0Architecture:          riscv64
    1  Byte Order:          Little Endian
    2CPU(s):                4
    3  On-line CPU(s) list: 0-3
    
     0processor       : 0
     1hart            : 0
     2isa             : rv64imafdcsu
     3mmu             : sv39
     4cpu-freq        : 1.848Ghz
     5cpu-icache      : 64KB
     6cpu-dcache      : 64KB
     7cpu-l2cache     : 1MB
     8cpu-tlb         : 1024 4-ways
     9cpu-cacheline   : 64Bytes
    10â‹® (4 times)
    

    However, it fails in the tests of python-py-cpuinfo (a dependency of LIEF).

    0building /gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv...
    1/ 'check' phasenote: keeping build directory `/tmp/guix-build-python-py-cpuinfo-8.0.0-1.4d6987e.drv-3'
    2builder for `/gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv' failed with exit code 1
    3build of /gnu/store/gs9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv failed
    4View build log at '/var/log/guix/drvs/gs/9j7j3c0z9wph9y2ag7j60xfq0jhhnr-python-py-cpuinfo-8.0.0-1.4d6987e.drv.gz'.
    5cannot build derivation `/gnu/store/wmcihcrlgln588v5xbk89zh05rvr2hdi-python-fastjsonschema-2.15.1.drv': 1 dependencies couldn't be built
    6building /gnu/store/gqr2b58a66m4gwblgprqbmp3yfnfq41c-python-pycparser-2.21.drv...
    7cannot build derivation `/gnu/store/vllqd95n44lpzfpj08v5wgp61gg23dr2-python-pydantic-2.5.3.drv': 1 dependencies couldn't be built
    8note: keeping build directory `/tmp/guix-build-python-pycparser-2.21.drv-3'
    9cannot build derivation `/gnu/store/a0a1wwiwdgk9mxlspkl6p5mddfsdhrkh-python-lief-0.16.6.drv': 1 dependencies couldn't be built
    

    Detailed failure:

     0======================================================================
     1FAIL: test_all (test_actual.TestActual)
     2----------------------------------------------------------------------
     3Traceback (most recent call last):
     4  File "/tmp/guix-build-python-py-cpuinfo-8.0.0-1.4d6987e.drv-0/source/tests/test_actual.py", line 74, in test_all
     5    self.assertTrue(len(cpuinfo._get_cpu_info_from_proc_cpuinfo()) > 0)
     6AssertionError: False is not true
     7
     8----------------------------------------------------------------------
     9Ran 152 tests in 17.371s
    10
    11FAILED (failures=1, skipped=1)
    12Test failed: <unittest.runner.TextTestResult run=152 errors=0 failures=1>
    13error: Test failed: <unittest.runner.TextTestResult run=152 errors=0 failures=1>
    14error: in phase 'check': uncaught exception:
    15%exception #<&invoke-error program: "python" arguments: ("-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test") exit-status: 1 term-signal: #f stop-signal: #f> 
    16phase `check' failed after 19.5 seconds
    17command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1
    18build process 6 exited with status 256
    
  2. laanwj added the label Build system on Nov 14, 2025
  3. hebasto commented at 4:27 pm on November 14, 2025: member

    Which OS?

    I’ve found Debian to be more suitable for RISC-V.

    (somewhat related: https://codeberg.org/guix/guix/issues/3852)

  4. laanwj commented at 5:07 pm on November 14, 2025: member

    It’s debian (Debian GNU/Linux forky/sid). Intentially chose that because i assumed it would be least hassle 😄

    Looks like the package is defined in

    0/home/guix-build/.cache/guix/checkouts/lmgz3ewobtxzz4rsyp72z7woeuxeghzyukvmmnxlwpobu76yyi5a/gnu/packages/python-xyz.scm
    

    Would it be possible to patch it to disable the tests, like with openssl?

  5. laanwj commented at 5:51 pm on November 14, 2025: member

    i patched all versions of python-xyz.scm on the system (not sure how to determine which exactly i need to) with this:

     0diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
     1index cba99cce62..7d91059365 100644
     2--- a/gnu/packages/python-xyz.scm
     3+++ b/gnu/packages/python-xyz.scm
     4@@ -31650,6 +31650,7 @@ (define-public python-py-cpuinfo
     5           (base32
     6            "0h5wi1bfcqqr1x3j1pa7dmkx7siprsyksbsy80fl2sdrrgpji0b0"))))
     7       (build-system python-build-system)
     8+      (arguments (list #:tests? #false))
     9       (home-page "https://github.com/workhorsy/py-cpuinfo")
    10       (synopsis "Get CPU info with Python")
    11       (description
    

    This seems to have worked to get past it.

  6. maflcko added the label Upstream on Nov 17, 2025
  7. maflcko commented at 1:41 pm on November 17, 2025: member

    I presume the same fails upstream, without guix: https://github.com/workhorsy/py-cpuinfo/blame/f3f0fec58335b9699b9b294267c15f516045b1fe/tests/test_actual.py#L74

    Though, upsteam is unmaintained, so i am not sure what can be done here.

  8. laanwj commented at 2:34 pm on November 17, 2025: member

    Right! i could take a look at fixing this upstream.

    From a high level perspective, i don’t quite understand why a cpuinfo module would be needed for deterministic cross-compiling in the first place. Nor why it’d run tests that depend on local CPU configuration. But i guess it’s some deeper nested dependency that gets pulled in unconditionally (through LIEF in this case?). GUIX sadly has more of those, basically same complaint as in #30042.

  9. maflcko commented at 2:43 pm on November 17, 2025: member
    Yeah, if it is pulled in through LIEF, it could make sense to strip the unmaintained dependency from LIEF upstream.
  10. hebasto commented at 4:58 pm on November 17, 2025: member

    Yeah, if it is pulled in through LIEF, it could make sense to strip the unmaintained dependency from LIEF upstream.

    FWIW:

    0# guix graph --path python-lief python-py-cpuinfo
    1python-lief@0.17.1
    2python-pydantic@2.10.4
    3python-pytest-benchmark@5.1.0
    4python-py-cpuinfo@9.0.0
    

    (guix checked out at a different commit though)

  11. hebasto commented at 5:51 pm on November 17, 2025: member

    i’m trying to do a guix build (of the master branch) on RISC-V hardware. The device is a Scaleway EM-RV1-C4M16S128-A server from Scaleway.

    It builds fine for me on an instance from the same provider:

    0# guix describe
    1Generation 3	Nov 17 2025 17:45:37	(current)
    2  guix 5cb84f2
    3    repository URL: https://git.guix.gnu.org/guix.git
    4    commit: 5cb84f2013c5b1e48a7d0e617032266f1e6059e2
    5# guix build python-py-cpuinfo
    6/gnu/store/v09j8kcdxci3nbrjrqz7gik0sf5rm3dx-python-py-cpuinfo-8.0.0-1.4d6987e
    
  12. laanwj commented at 9:09 am on November 18, 2025: member

    It builds fine for me on an instance from the same provider:

    Okay, now i’m confused. What operating system? Also debian forky/sid?

    It could be that they got me a faulty server? i can’t imagine having done anything wrong here, just followed basic GUIX build steps.

  13. laanwj commented at 9:11 am on November 18, 2025: member

    Looks like it stopped an error in the -rust-1.65.0.drv.gz build this night. The “faulty server” hypothesis definitely not disproven 😄 Why do i always have this little luck with RISC-V devices lol.

    0...
    1patch-cargo-checksums: generate-checksums for vendor/winapi
    2patch-cargo-checksums: generate-checksums for vendor/windows-sys-0.28.0
    3patch-cargo-checksums: generate-checksums for vendor/windows-sys
    4patch-cargo-checksums: generate-checksums for vendor/windows_aarch64_msvc-0.28.0
    5Fatal glibc error: pthread_mutex_lock.c:94 (___pthread_mutex_lock): assertion failed: mutex->__data.__owner == 0
    6build process 6 exited with status 6
    
  14. hebasto commented at 9:43 am on November 18, 2025: member

    It builds fine for me on an instance from the same provider:

    Okay, now i’m confused. What operating system? Also debian forky/sid?

    Yes, debian forky/sid.

  15. laanwj commented at 10:19 am on November 18, 2025: member

    Could also be a kernel bug:

     0[155604.743750] BUG: using smp_processor_id() in preemptible [00000000] code: guile/662593
     1[155604.751799] caller is debug_smp_processor_id+0x20/0x2a
     2[155604.757101] CPU: 3 PID: 662593 Comm: guile Not tainted 5.10.113-scw1 [#1](/bitcoin-bitcoin/1/)
     3[155604.763806] Call Trace:
     4[155604.766349] [<ffffffe0002040f0>] walk_stackframe+0x0/0x112
     5[155604.771928] [<ffffffe000fcd022>] show_stack+0x46/0x62
     6[155604.777075] [<ffffffe000fd6be2>] dump_stack_lvl+0x7a/0x9a
     7[155604.782567] [<ffffffe000fd6c1a>] dump_stack+0x18/0x20
     8[155604.787716] [<ffffffe000fe3aba>] check_preemption_disabled+0xb4/0xb6
     9[155604.794163] [<ffffffe000fe3adc>] debug_smp_processor_id+0x20/0x2a
    10[155604.800352] [<ffffffe000feb818>] kprobe_breakpoint_handler+0x36/0x202
    11[155604.806887] [<ffffffe000204080>] do_trap_break+0x3a/0x8e
    12[155604.812293] [<ffffffe000201e4c>] ret_from_exception+0x0/0xc
    13[155604.817956] CPU: 3 PID: 662593 Comm: guile Not tainted 5.10.113-scw1 [#1](/bitcoin-bitcoin/1/)
    14[155604.824659] epc: 0000003ff7b26262 ra : 0000003ff7b26256 sp : 0000003fca5b89e0
    15[155604.831884]  gp : 0000000000014800 tp : 0000003fca5ba8e0 t0 : 0000000000001000
    16[155604.839194]  t1 : 0000000000000030 t2 : 00000000000003ff s0 : 0000003ff7c1bbf8
    17[155604.846505]  s1 : 0000003ff7c1bbf8 a0 : 0000000000000000 a1 : 000000000000000a
    18[155604.853816]  a2 : 0000000000000006 a3 : 0000000000000000 a4 : 0000000000000004
    19[155604.861125]  a5 : 0000000000000005 a6 : 0000000000000000 a7 : 0000000000000083
    20[155604.868436]  s2 : 0000003fca5ba180 s3 : 0000003ff7fda000 s4 : 0000000000000000
    21[155604.875745]  s5 : 0000003fca5b8b40 s6 : 0000003fca5b8b40 s7 : 0000000000000008
    22[155604.883057]  s8 : 0000000000000071 s9 : 0000003ff7fd6000 s10: 0000000000000004
    23[155604.890368]  s11: 0000000000000004 t3 : 0000003ff7b66b5e t4 : 0000003ff7fda060
    24[155604.897678]  t5 : 0000003ff7ae0000 t6 : 0000000000000004
    25[155604.903079] status: 0000000200004020 badaddr: 0000000000000000 cause: 0000000000000003
    26[155604.911085] End Trace.
    27[155604.913611] BUG: using __this_cpu_read() in preemptible [00000000] code: guile/662593
    28[155604.921578] caller is __this_cpu_preempt_check+0x1a/0x22
    

    Which kernel are you running? 5.10.113-scw1 here. (Apparently released Wed, 27 Apr 2022. That’s ancient especially in RISC-V land! Going to report this to Scaleway.)

  16. hebasto commented at 10:35 am on November 18, 2025: member

    Which kernel are you running? 5.10.113-scw1 here. (Apparently released Wed, 27 Apr 2022. That’s ancient especially in RISC-V land!)

    0# uname -srv
    1Linux 5.10.113-scw1 [#1](/bitcoin-bitcoin/1/) SMP PREEMPT Fri Jul 12 15:31:22 UTC 2024
    
  17. hebasto commented at 11:33 am on November 18, 2025: member

    Which kernel are you running? 5.10.113-scw1 here. (Apparently released Wed, 27 Apr 2022. That’s ancient especially in RISC-V land!)

    0# uname -srv
    1Linux 5.10.113-scw1 [#1](/bitcoin-bitcoin/1/) SMP PREEMPT Fri Jul 12 15:31:22 UTC 2024
    

    I’ve just checked out Fedora 40:

    0# uname -srv
    1Linux 5.10.113-scw1 [#1](/bitcoin-bitcoin/1/) SMP PREEMPT Mon Jul 15 10:10:04 UTC 2024
    
  18. laanwj commented at 1:19 pm on November 18, 2025: member

    Linux 5.10.113-scw1 #1 SMP PREEMPT Mon Jul 15 10:10:04 UTC 2024

    It looks like the kernel is fixed and provided externally. It doesn’t actually use one from the distro. (Might be a SoC with no upstream kernel support in the first place, so they’re stuck at this version. That’s on the course for embedded systems, sadly)

    Anyhow if you never came across this problem on any of the other servers with the same SoC, it’s probably a problem with this specific server.

    (i restarted the build and it’s now building again, but i suspect it’s a matter of time before it happens again)

  19. laanwj commented at 6:25 am on November 20, 2025: member

    Another faliure, this time in rust-1.75.0.drv.gz:

    0malloc(): unaligned fastbin chunk detected
    1build process 6 exited with status 6
    

    in -rust-1.82.0.drv.gz

    0corrupted double-linked list
    1rustc exited with signal: 6 (SIGABRT)
    2error: could not compile `cargo` (lib)
    

    (memory corruption?)

  20. laanwj closed this on Nov 25, 2025

  21. laanwj commented at 8:18 am on November 25, 2025: member
    Clearly a hardware issue, closing.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-10 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me