Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fs copy fix for "Invalid cross-device link" #886

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

taclane
Copy link
Contributor

@taclane taclane commented Dec 5, 2023

Sometime between linux 5.3 and 5.18, a regression prevented files from copying across devices using copy_file_range(). Boost created a workaround for 1.78, and it was fixed in the 6.x kernel, but depending on what packages are offered in the distro, this problem may still remain.

Replicated with the following system:

libboost-all-dev/mantic,now 1.74.0.3ubuntu7 amd64 [installed]
libboost-filesystem-dev/mantic,now 1.74.0.3ubuntu7 amd64 [installed,automatic]

Linux system2 6.5.0-13-generic #13-Ubuntu SMP PREEMPT_DYNAMIC Fri Nov  3 12:16:05 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

A boost::filesystem::copy_file: Invalid cross-device link: will occur when transmissionArchive is true, and trunk-recorder attempts to copy the tx wavs from a ram-based tempDir to conventional storage at captureDir at the conclusion of a call. Previous mitigation techniques were either to disable transmissionArchive, or move the tempDir to the same device as captureDir.

This should help address issues like #843 by allowing the users with affected kernels to manually install newer version of boost libs, or allow users with 6.x kernels and affected boost libs to use std::filesystem instead.

@robotastic
Copy link
Owner

You are a saint for hunting down the root cause of this bug and putting together a patch!

@robotastic robotastic merged commit da711fe into robotastic:master Dec 6, 2023
1 check passed
@taclane taclane deleted the fs-copy-fix branch December 6, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants