Skip to content

Build failure: protobuf_29 on Darwin #464439

@al3xtjames

Description

@al3xtjames

Nixpkgs version

  • Unstable (25.11)

Steps to reproduce

  1. nix build 'github:NixOS/nixpkgs/nixpkgs-unstable#protobuf_29' --rebuild

Can Hydra reproduce this build failure?

Yes, Hydra can reproduce this build failure.

Link to Hydra build job

https://hydra.nixos.org/build/313434089

Relevant log output

[ RUN      ] EditionMessageTest.ParseFromFileDescriptor
F0000 00:00:1763111900.108041 156907717 message_unittest.inc:152] Check failed: File::SetContents( filename, expected_message.SerializeAsString(), true) is OK (INTERNAL: fopen(/private/tmp/nix-build-protobuf-29.5.drv-0/protobuf_tempdir/golden_message, "wb"): No such file or directory) 
*** Check failure stack trace: ***
    @        0x103eea5b4  absl::lts_20240722::log_internal::LogMessage::SendToLog()
    @        0x103ee9cc4  absl::lts_20240722::log_internal::LogMessage::Flush()
    @        0x103eeaa30  absl::lts_20240722::log_internal::LogMessageFatal::~LogMessageFatal()
    @        0x103eeaa48  absl::lts_20240722::log_internal::LogMessageFatal::~LogMessageFatal()
    @        0x1026a0c60  google::protobuf::EditionMessageTest_ParseFromFileDescriptor_Test::TestBody()
    @        0x104fb5a88  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @        0x104fb590c  testing::Test::Run()
    @        0x104fb7028  testing::TestInfo::Run()
    @        0x104fb84ec  testing::TestSuite::Run()
    @        0x104fcd7a8  testing::internal::UnitTestImpl::RunAllTests()
    @        0x104fccefc  testing::internal::HandleExceptionsInMethodIfSupported<>()
    @        0x104fccdc8  testing::UnitTest::Run()
    @        0x103e27920  main
    @        0x196e6ab98  start

Additional context

EditionMessageTest.ParseFromFileDescriptor uses the TempDirDeleter class to allocate a temporary directory: https://github.com/protocolbuffers/protobuf/blob/f5de0a0495faa63b4186fc767324f8b9a7bf4fc4/src/google/protobuf/message_unittest.inc#L148

Its destructor cleans up the temporary directory once it is no longer needed: https://github.com/protocolbuffers/protobuf/blob/996e04c5efe88c2f12317e70957931ad5211f128/src/google/protobuf/testing/googletest.cc#L120-L124

Based on the logs from the test failure, it's almost as if the temporary directory is getting deleted before File::SetContents has a chance to create a file in it: https://github.com/protocolbuffers/protobuf/blob/f5de0a0495faa63b4186fc767324f8b9a7bf4fc4/src/google/protobuf/message_unittest.inc#L151-L152

I'm not sure why the destructor would get invoked in the first place, but removing the cleanup code from the destructor allows the test to pass: al3xtjames@6e33b74

I also can't reproduce this failure with other versions of protobuf. It affects both aarch64-darwin and x86_64-darwin.

System metadata

  • system: "aarch64-darwin"
  • host os: Darwin 24.6.0, macOS 15.7.2
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Lix, like Nix) 2.93.3 System type: aarch64-darwin Additional system types: x86_64-darwin Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /Users/alex/.config/nix/nix.conf:/Users/alex/.nix-profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/alex/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/4zal8hz11pah1lk6rxk2524nx96nydic-lix-2.93.3/share
  • nixpkgs: /nix/store/sa57k6i9qkwnrdnnih3wmgn78dr0ak36-source

Notify maintainers

@GaetanLepage


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions