ci: Roll NetBSD releases to 11.0, drop 9.4 #321

pull hebasto wants to merge 4 commits into bitcoin-core:master from hebasto:260727-ci-netbsd changing 4 files +13 −13
  1. hebasto commented at 1:17 PM on July 27, 2026: member

    No description provided.

  2. DrahtBot commented at 1:17 PM on July 27, 2026: none

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK maflcko

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  3. hebasto force-pushed on Jul 27, 2026
  4. hebasto force-pushed on Jul 27, 2026
  5. hebasto commented at 2:23 PM on July 27, 2026: member

    https://github.com/bitcoin-core/libmultiprocess/actions/runs/30274461317/job/90004862019?pr=321:

    Test project /home/runner/work/libmultiprocess/libmultiprocess/build-netbsd
        Start 1: mptest
    1/1 Test [#1](/bitcoin-core-multiprocess/1/): mptest ...........................***Failed    0.18 sec
    [ TEST ] listen_tests.cpp:214: ListenConnections accepts incoming connections
    [ PASS ] listen_tests.cpp:214: ListenConnections accepts incoming connections (5338 μs)
    [ TEST ] listen_tests.cpp:224: ListenConnections enforces a local connection limit
    [ PASS ] listen_tests.cpp:224: ListenConnections enforces a local connection limit (5166 μs)
    [ TEST ] listen_tests.cpp:262: ListenConnections accepts multiple connections
    [ PASS ] listen_tests.cpp:262: ListenConnections accepts multiple connections (4218 μs)
    [ TEST ] spawn_tests.cpp:50: SpawnProcess does not run callback in child
    [ PASS ] spawn_tests.cpp:50: SpawnProcess does not run callback in child (66370 μs)
    [ TEST ] test.cpp:143: Call FooInterface methods
    [ PASS ] test.cpp:143: Call FooInterface methods (36477 μs)
    [ TEST ] test.cpp:274: Call IPC method after client connection is closed
    [ PASS ] test.cpp:274: Call IPC method after client connection is closed (1379 μs)
    [ TEST ] test.cpp:284: Calling IPC method after server connection is closed
    [ PASS ] test.cpp:284: Calling IPC method after server connection is closed (1220 μs)
    [ TEST ] test.cpp:294: Calling IPC method and disconnecting during the call
    [ PASS ] test.cpp:294: Calling IPC method and disconnecting during the call (1323 μs)
    [ TEST ] test.cpp:307: Calling IPC method, disconnecting and blocking during the call
    [ PASS ] test.cpp:307: Calling IPC method, disconnecting and blocking during the call (3011 μs)
    [ TEST ] test.cpp:349: Worker thread destroyed before it is initialized
    [ PASS ] test.cpp:349: Worker thread destroyed before it is initialized (16281 μs)
    [ TEST ] test.cpp:379: Calling async IPC method, with server disconnect racing the call
    [ PASS ] test.cpp:379: Calling async IPC method, with server disconnect racing the call (20428 μs)
    [ TEST ] test.cpp:404: Calling async IPC method, with server disconnect after cleanup
    [ PASS ] test.cpp:404: Calling async IPC method, with server disconnect after cleanup (2712 μs)
    [ TEST ] test.cpp:428: Destroying ProxyClient<> with destroy method after peer disconnect
    terminate called after throwing an instance of 'std::runtime_error'
      what():  IPC client method called after disconnect.
    *** Received signal [#6](/bitcoin-core-multiprocess/6/): Abort trap
    stack: 
    0% tests passed, 1 tests failed out of 1
    Total Test time (real) =   0.18 sec
    The following tests FAILED:
    	  1 - mptest (Failed)
    Errors while running CTest
    

    Related (?): https://github.com/bitcoin/bitcoin/issues/35823

  6. maflcko commented at 6:56 AM on July 29, 2026: contributor

    Can you share the stacktrace?

  7. hebasto force-pushed on Jul 30, 2026
  8. hebasto commented at 5:12 PM on July 31, 2026: member

    Can you share the stacktrace?

    (gdb) bt
    [#0](/bitcoin-core-multiprocess/0/)  0x00007eb8253b853a in ___lwp_park60 () from /usr/lib/libc.so.12
    [#1](/bitcoin-core-multiprocess/1/)  0x00007eb8259b6cd0 in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
    [#2](/bitcoin-core-multiprocess/2/)  0x000000000043618a in operator() (__closure=0x7eb82527d028) at /home/hebasto/dev/libmultiprocess/src/mp/proxy.cpp:373
    [#3](/bitcoin-core-multiprocess/3/)  0x0000000000439f52 in std::__invoke_impl<void, mp::EventLoop::startAsyncThread()::<lambda()> >(std::__invoke_other, struct {...} &&) (__f=...)
        at /usr/include/g++/bits/invoke.h:61
    [#4](/bitcoin-core-multiprocess/4/)  0x0000000000439e89 in std::__invoke<mp::EventLoop::startAsyncThread()::<lambda()> >(struct {...} &&) (__fn=...) at /usr/include/g++/bits/invoke.h:96
    [#5](/bitcoin-core-multiprocess/5/)  0x0000000000439d7e in std::thread::_Invoker<std::tuple<mp::EventLoop::startAsyncThread()::<lambda()> > >::_M_invoke<0>(std::_Index_tuple<0>) (this=0x7eb82527d028)
        at /usr/include/g++/bits/std_thread.h:279
    [#6](/bitcoin-core-multiprocess/6/)  0x0000000000439cf4 in std::thread::_Invoker<std::tuple<mp::EventLoop::startAsyncThread()::<lambda()> > >::operator()(void) (this=0x7eb82527d028)
        at /usr/include/g++/bits/std_thread.h:286
    [#7](/bitcoin-core-multiprocess/7/)  0x0000000000439c38 in std::thread::_State_impl<std::thread::_Invoker<std::tuple<mp::EventLoop::startAsyncThread()::<lambda()> > > >::_M_run(void) (this=0x7eb82527d020)
        at /usr/include/g++/bits/std_thread.h:231
    [#8](/bitcoin-core-multiprocess/8/)  0x00007eb825848c7b in execute_native_thread_routine () from /usr/lib/libstdc++.so.9
    [#9](/bitcoin-core-multiprocess/9/)  0x00007eb8259b82e1 in pthread.create_tramp () from /usr/lib/libpthread.so.1
    [#10](/bitcoin-core-multiprocess/10/) 0x00007eb82539dd60 in ?? () from /usr/lib/libc.so.12
    [#11](/bitcoin-core-multiprocess/11/) 0x0000000000200000 in ?? ()
    [#12](/bitcoin-core-multiprocess/12/) 0x0000000000000000 in ?? ()
    
  9. hebasto force-pushed on Aug 1, 2026
  10. hebasto commented at 4:30 PM on August 1, 2026: member

    Apparently, until this is fixed upstream, GCC <14.x requires -DKJ_NO_EXCEPTIONS=0 whenever it processes capnproto/c++/src/kj/common.h.

    On NetBSD 11.0, the default compiler is GCC 12.5, which means the devel/capnproto binary package cannot be used.

  11. hebasto marked this as ready for review on Aug 1, 2026
  12. hebasto force-pushed on Aug 1, 2026
  13. in .github/workflows/ci.yml:22 in 278af3d96b
      21 | -            capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0 -DKJ_USE_KQUEUE=0"'
      22 | -          - release: 10.1
      23 | -            capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
      24 | +          - release: '10.1'
      25 | +            # Hardcode GCC 14, since default GCC version is older
      26 | +            # and may not be compatible with libmultiprocess.
    


    maflcko commented at 8:59 AM on August 2, 2026:

    unrelated, as this is just move-only, but this could be explained a bit better.

    I presume this is just about the c++20 features and has nothing to do with netbsd? I presume netbsd 10 ships with gcc 10?

    In that case, I wonder if there should be a CI task to confirm the C++20 used here compiles with gcc 11. edit: done in #330

    Also, if true, maybe the comment can instead say:

    Force later GCC version, because on NetBSD 10 the default GCC 10 is too old to compile the C++ code in this repo.
    

    hebasto commented at 4:13 PM on August 2, 2026:

    I presume netbsd 10 ships with gcc 10?

    Yes, It's 10.5.0.

    I presume this is just about the c++20 features and has nothing to do with netbsd?

    I've just built on NetBSD 10.1 using the default GCC 10.5.0 compiler.

    UPDATE:

    $ env CXXFLAGS="-Wpedantic" cmake -B build -G Ninja
    -- The CXX compiler identification is GNU 10.5.0
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++ - skipped
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
    -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Performing Test HAVE_PTHREAD_GETNAME_NP
    -- Performing Test HAVE_PTHREAD_GETNAME_NP - Success
    -- Performing Test HAVE_PTHREAD_THREADID_NP
    -- Performing Test HAVE_PTHREAD_THREADID_NP - Failed
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP
    -- Performing Test HAVE_PTHREAD_GETTHREADID_NP - Failed
    -- Configuring done (0.9s)
    -- Generating done (0.0s)
    -- Build files have been written to: /home/hebasto/dev/libmultiprocess/build
    $ cmake --build build
    [6/7] Building CXX object CMakeFiles/multiprocess.dir/src/mp/proxy.cpp.o
    In file included from /home/hebasto/dev/libmultiprocess/src/mp/proxy.cpp:8:
    /home/hebasto/dev/libmultiprocess/include/mp/proxy-types.h:630:2: warning: extra ';' [-Wpedantic]
      630 | };
          |  ^
    [7/7] Linking CXX static library libmultiprocess.a
    
  14. in .github/workflows/ci.yml:64 in 278af3d96b
      60 | @@ -58,12 +61,12 @@ jobs:
      61 |          run: |
      62 |            cd /usr/pkgsrc/devel/capnproto/
      63 |            unset PKG_PATH
      64 | -          make ${{ matrix.capnproto-cppflags }} install
      65 | +          make CPPFLAGS="-DKJ_NO_EXCEPTIONS=0" install
    


    maflcko commented at 9:00 AM on August 2, 2026:

    Maybe add a comment why this is needed? Also, could keep the ${{ matrix.capnproto-cppflags }} and then explain why this is set for both configs, while NetBSD 11 also sets DKJ_NO_EXCEPTIONS=0 for the later build.


    hebasto commented at 8:08 PM on August 2, 2026:

    Thanks! Reworked.

  15. maflcko approved
  16. maflcko commented at 10:18 AM on August 2, 2026: contributor

    lgtm ACK 278af3d96bc2f3798b008d0454242df896ec22b1

  17. hebasto force-pushed on Aug 2, 2026
  18. refactor: Drop stray semicolons after function definitions bd508311b5
  19. ci: Drop NetBSD release 9.4
    NetBSD 9.x will become unsupported once release 11.0 is released.
    36f7400277
  20. ci: Switch to default compiler on NetBSD 9.4
    Also document a workaround for a bug in Cap'n Proto affecting compilers
    prior to GCC 14.
    2d33b14fb0
  21. ci: Add NetBSD release 11.0 a9e70dbe77
  22. hebasto force-pushed on Aug 2, 2026
  23. hebasto commented at 8:09 PM on August 2, 2026: member

    @maflcko

    Thank you for your feedback. I reworked this PR and switched all NetBSD jobs to the system's default compilers.

  24. maflcko commented at 5:28 AM on August 3, 2026: contributor

    lgtm ACK a9e70dbe775ab628dd6610c7e173bf0d350036f8

  25. in .github/workflows/ci.yml:26 in 2d33b14fb0
      21 | +          # than 14.x require `-DKJ_NO_EXCEPTIONS=0` when
      22 | +          # processing `capnproto/c++/src/kj/common.h`.
      23 | +          # See https://github.com/capnproto/capnproto/pull/2756/changes/28fa1a6753514d8de56875ec2222fa0e1c3a04f7.
      24 |            - release: 10.1
      25 |              capnproto-cppflags: 'CPPFLAGS="-DKJ_NO_EXCEPTIONS=0"'
      26 | +            env_vars: 'CXXFLAGS="-DKJ_NO_EXCEPTIONS=0"'
    


    ryanofsky commented at 7:40 PM on August 3, 2026:

    In commit "ci: Switch to default compiler on NetBSD 9.4" (2d33b14fb0e7ad79ee7ad527c119066a0ecd480e)

    I was confused by inconsistency here between CPPFLAGS and CXXFLAGS but apparently this is needed because cmake ignores uses CXXFLAGS and ignores CPPFLAGS

  26. in .github/workflows/ci.yml:20 in 2d33b14fb0
      16 | @@ -17,8 +17,13 @@ jobs:
      17 |          # Test all supported releases.
      18 |          # See https://www.netbsd.org/releases/.
      19 |          include:
      20 | +          # Due to a bug in Cap'n Proto, GCC compilers older
    


    ryanofsky commented at 7:42 PM on August 3, 2026:

    In commit "ci: Switch to default compiler on NetBSD 9.4" (2d33b14fb0e7ad79ee7ad527c119066a0ecd480e)

    It'd be nice if commit message said what motivation was for this change. It seems like this is switching to an older compiler and adding a workaround only needed in the older compiler. Unclear why this is better than just using the newer compiler.

    EDIT: Looking at next commit, reason for doing this seems to be newer netbsd version added in next commit that maybe doesn't support GCC 14, or maybe defaults to a newer version that would be preferred for wider coverage?


    maflcko commented at 6:16 AM on August 4, 2026:

    I presume the rationale is that the default compiler is more likely used (by default), so documenting the workaround for it seems fine.

    However, using GCC 14, or anything else, will work equally as a workaround and seems fine as well.

  27. ryanofsky commented at 8:03 PM on August 3, 2026: collaborator

    I'm very confused by this PR. There is no description. The first comment is a link to a failing CI job with no context and link to a Bitcoin bug. Then there is a request for a stack trace, then a stack trace, and then discussion GCC versions and and c++20 features. Unclear what the CI failure and stack trace have to do with KJ_NO_EXCEPTIONS.

    The code changes here seem fine. It does seem good to drop netbsd 9.4, add netbsd 11.0, stop hardcoding GCC 14, drop unneeded semicolons, and use -DKJ_NO_EXCEPTIONS=0 to work around https://github.com/capnproto/capnproto/pull/2756.

    But it would be really helpful if PR had a description and commit messages that said what the motivation for the individual changes to make this less confusing and make understanding these change possible in the future

  28. ryanofsky merged this on Aug 3, 2026
  29. ryanofsky closed this on Aug 3, 2026

  30. hebasto deleted the branch on Aug 4, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/libmultiprocess. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-08-05 20:30 UTC

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