-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
rsync segfaults with *** buffer overflow detected ***: terminated
#265014
Comments
I also tried installing rsync with nix inside an archlinux container, which also works. So the issue seems to be NixOS specific
Same hash aswell:
|
As a workaround, I use this where I need rsync. Overlay it for a system wide fix. rsync = pkgs.rsync.overrideAttrs (_: _: {
hardeningDisable = ["fortify"];
}); |
@pinpox rebuild with |
This is the change that broke it. Disabling hardening as suggested by @splack works. |
@splack @ehmry Maybe I'm doing it wrong, but the workaround is not working for me. The hash of the overriden rsync is deploy-flake =
let
rsync-workaround = pkgs.rsync.overrideAttrs (_: _: {
hardeningDisable = [ "fortify" ];
});
in
{
deps = [ "check-vars" ];
desc = "Deploy flake repository to: ${hostName}";
cmds = [
''echo "Deploying flake to: {{.HOSTNAME}}"''
''
source_path={{.LOCAL_FLAKE_SOURCE}}
if test -d "$source_path"; then
source_path=$source_path/
fi
${rsync-workaround}/bin/rsync \
--verbose \
-e {{.REMOTE_COMMAND}}\ -l\ {{.REMOTE_USER}}\ -T \
-FD \
--checksum \
--times \
--perms \
--recursive \
--links \
--delete-excluded \
--mkpath \
${optionalString useSudo ''--rsync-path="{{.REMOTE_SUDO_COMMAND}} {{.REMOTE_SUDO_OPTS}} rsync"''} \
$source_path {{.REMOTE_USER}}\@{{.REMOTE_HOST}}:{{.REMOTE_CONFIG_DIR}}
''
];
}; |
@pinpox I made a flake to demonstrate the workaround. https://git.lanvise.com/lanvise/rsync Your snippet looks like it should work. Maybe reduce it to a simple flake to fix the inputs? |
- Pin nixos-anywhere to prevent possible issues caused by upstream PR: nix-community/nixos-anywhere#243. Read more from the below nixpkgs issue: NixOS/nixpkgs#265014. - Fix the task.py usage instructions in README.md after #8. - Make `nix flake check` pre-push check less verbose. Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
@splack I can confirm your flake works. The Since the cause of the error seems clear or is at least reproducible, how can we properly fix this? A workaround is nice, but I heavily depend on rsync for configuration and deployments and would be in favor of a proper, nixpkgs-wide fix if possible. I can submit PR's if necessary or take further steps to get this fixed, but would need some guidance as I don't really know here to start. |
Applied a patches that fixes the crash for me: #265846 |
- Pin nixos-anywhere to prevent possible issues caused by upstream PR: nix-community/nixos-anywhere#243. Read more from the below nixpkgs issue: NixOS/nixpkgs#265014. - Fix the task.py usage instructions in README.md after #8. - Make `nix flake check` pre-push check less verbose. Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
- Pin nixos-anywhere to prevent possible issues caused by upstream PR: nix-community/nixos-anywhere#243. Read more from the below nixpkgs issue: NixOS/nixpkgs#265014. - Fix the task.py usage instructions in README.md after tiiuae#8. - Make `nix flake check` pre-push check less verbose. Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
Describe the bug
I'm running on nixos-unstable and rsync segfaults with the error below. I tried the same rsync version on archlinux and it seems to work fine there, so the error is nixpkgs-specific.
The rsync above being run has the hash
/nix/store/i9dgn6ymv732q5gzw669y6y9zxsv3x2z-rsync-3.2.7/bin/rsync
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The command succeeds as it did before on nixos and still does on other OS's
Screenshots
If applicable, add screenshots to help explain your problem.

Here is a screenshot of the output on arch for comparison
Additional context
Add any other context about the problem here.
Notify maintainers
@ehmry @kampfschlaefer @ivan
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: