-
Notifications
You must be signed in to change notification settings - Fork 285
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
0.2.20240718-145624+f4e9df48: Permission denied (os error 13) #928
Comments
@robhuang , can you run some of those commands with Also, does |
I'm getting a similar failure. Here's the requested output: $ sl --version $ sl rebase --debug --trace -d main |
I spoke to Robert and he downgraded to the previous version 0.2.20240219 to resolve the issue. |
Thanks for the logs @ross-lightsource . Seems like the issue is somewhere in the Rust side of the codebase. Can you run your command as |
$ SL_LOG=workingcopy=trace sl rebase --debug --trace -d main > rebase.log 2>&1 The result was 17M of details about lightsource source code, so I trimmed out the source code structure details listed in the middle. |
I've also done some digging here with strace The problem is calls to In our repo we have a folder The strace log show attempts to stat these directories and to stat for .sl within those directories. These all fail with EACCES (13) Liberal application of the Adding
to my config does not fix this [ETA] - this is a trimmed strace log, only including the process that failed, and including the last successful couple of statx calls, then then failures and every log item inbetween. paths are mildly redacted |
FWIW the following patch fixes the issue... diff --git a/eden/scm/lib/workingcopy/src/filesystem/physicalfs.rs b/eden/scm/lib/workingcopy/src/filesystem/physicalfs.rs
index 3cb5bb8e9c..8526422ee6 100644
--- a/eden/scm/lib/workingcopy/src/filesystem/physicalfs.rs
+++ b/eden/scm/lib/workingcopy/src/filesystem/physicalfs.rs
@@ -43,6 +43,7 @@ use crate::util::dirstate_write_time_override;
use crate::util::maybe_flush_treestate;
use crate::util::update_filestate_from_fs_meta;
use crate::walker::WalkEntry;
+use crate::walker::WalkError;
use crate::walker::Walker;
use crate::workingcopy::WorkingCopy;
@@ -304,6 +305,21 @@ impl<M: Matcher + Clone + Send + Sync + 'static> PendingChanges<M> {
// Shouldn't happen since we don't request directories.
}
Some(Err(e)) => {
+ if e.is::<WalkError>() {
+ let walk_err = e.downcast::<WalkError>().expect("error should be a walk error");
+ match &walk_err {
+ WalkError::IOError(path, _) |
+ WalkError::InvalidFileType(path) |
+ WalkError::InvalidMTime(path, _) => {
+ if self.ignore_matcher.matches_file(&path)? {
+ tracing::trace!(%path, %walk_err, "ignore walk error");
+ continue;
+ }
+ }
+ _ => {}
+ }
+ return Err(walk_err.into())
+ }
return Err(e);
}
None => {
|
I recently upgraded to the latest Sapling release 0.2.20240718-145624+f4e9df48. Unfortunately, some commands now result in permission denied errors:
I'm on Fedora 40, installed Sapling via Homebrew.
I've hit the same error while running inside a Docker container running Ubuntu 20.04, installed from the prebuilt binary from the releases page.
The text was updated successfully, but these errors were encountered: