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

Attach path to failed put errors #367

Open
piegamesde opened this issue Jan 20, 2023 · 4 comments
Open

Attach path to failed put errors #367

piegamesde opened this issue Jan 20, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@piegamesde
Copy link
Contributor

My backup fails after some time with "bupstash put: Resource temporarily unavailable (os error 11)". This is not enough information for me to successfully debug the cause. I'd need to know which file it failed on, and during which operation.

@andrewchambers
Copy link
Owner

Yeah, at the very least it should be mentioning the path.

Any chance of getting an strace log to help track down the cause?

@andrewchambers andrewchambers changed the title Better error messages Attach path to failed put errors Jan 21, 2023
@andrewchambers andrewchambers added the enhancement New feature or request label Jan 21, 2023
@piegamesde
Copy link
Contributor Author

My initial debugging plan rested on the assumption that this is some IO error, in which case knowing the file and maybe also the operation in code that failed should be enough to debug it. However, it looks like this error may also come from different operations, for example spawning threads, in which case I'll probably have to do some strace inspection. I'd like to avoid it if possible though, especially since I think that we should have those error messages anyways.

@andrewchambers
Copy link
Owner

Interesting, it could be hitting some resource limits.

@piegamesde
Copy link
Contributor Author

piegamesde commented Feb 12, 2023

For the error handling, it looks like enabling the "backtrace" feature on the anyhow crate and then RUST_BACKTRACE=1 should be enough to get source information from all errors. Only thing left to test is if the error printing at the bottom of the main function also automatically makes use of that information.

For better or for worse, I can't reproduce my original error which prompted this investigation on master anymore. So it must have been fixed between 0.12 and 7082d77 somehow.

piegamesde added a commit to piegamesde/bupstash that referenced this issue Apr 17, 2023
piegamesde added a commit to piegamesde/bupstash that referenced this issue Apr 17, 2023
piegamesde added a commit to piegamesde/bupstash that referenced this issue Apr 18, 2023
piegamesde added a commit to piegamesde/bupstash that referenced this issue Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants