Skip to content

pkgsi686Linux.samba: don't configure waf in parallel on 32-bit systems#289405

Merged
fabianhjr merged 1 commit intoNixOS:masterfrom
trofi:samba-fix-i686
Feb 17, 2024
Merged

pkgsi686Linux.samba: don't configure waf in parallel on 32-bit systems#289405
fabianhjr merged 1 commit intoNixOS:masterfrom
trofi:samba-fix-i686

Conversation

@trofi
Copy link
Contributor

@trofi trofi commented Feb 16, 2024

Description of changes

Without the change waf configure hung on i686Linux.samba on systems with large amount of host CPUs (for me it's 16).

This happens because one of the worker processes gets -ENOMEM and does not recover from it:

2084476 mmap2(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory)
2084476 munmap(0xf2b5c000, 16384)       = 0
2084476 rt_sigprocmask(SIG_BLOCK, ~[RT_1], NULL, 8) = 0
2084476 madvise(0x1ff000, 8372224, MADV_DONTNEED) = 0
2084476 exit(0)                         = ?
2084476 +++ exited with 0 +++

THe change extends 32-bit arm workaround to limit to one thread to all 32-bit systems.

Closes #287339

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Without the change `waf configure` hung on `i686Linux.samba` on systems
with large amount of host CPUs (for me it's 16).

This happens because one of the worker processes gets `-ENOMEM` and does
not recover from it:

    2084476 mmap2(NULL, 8392704, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = -1 ENOMEM (Cannot allocate memory)
    2084476 munmap(0xf2b5c000, 16384)       = 0
    2084476 rt_sigprocmask(SIG_BLOCK, ~[RT_1], NULL, 8) = 0
    2084476 madvise(0x1ff000, 8372224, MADV_DONTNEED) = 0
    2084476 exit(0)                         = ?
    2084476 +++ exited with 0 +++

THe change extends 32-bit arm workaround to limit to one thread to all
32-bit systems.
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Feb 16, 2024
Copy link
Member

@fabianhjr fabianhjr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified via nix build github:NixOS/nixpkgs/9e38b7b0fb88a7ce82749d9ebcdeb3133fc371c8#samba --system i686-linux

Fixes the issue, thanks @trofi 🎉

@fabianhjr fabianhjr merged commit 6c2492f into NixOS:master Feb 17, 2024
@github-actions
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

samba build hangs/deadlocks for i686-linux

2 participants