-
Notifications
You must be signed in to change notification settings - Fork 221
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
user-callback is not called properly when an error occurs #1491
Comments
I think this bug may occur whenever I will look into our code and try to fix this when I find the time for this (holidays at the moment). The underlying error reason (documented in #851) I cannot fix unfortunately, this needs the eyes of an |
Possibly related to #1053 |
First bug analysis resultsI could reproduce the underlying error ("invalid cross-device link", see #851 (comment)) and have traced which user callback functions are called in case of a successful vs. erroneous backup (
The user callback 4 is clearly not called in case of an error (as reported in the issue). Suspected code locationThe This iconstellation shortcuts the user callback 4 call. Next steps
|
Maybe is #489 related (but not relevant for a solution). It is about killing rsync with BIT not noticing it. |
@buhtz Sharp eyes, I will try to test the "kill rsync" behaviour too since a solution affects the same code locations that I am just debugging... |
I am using my diagnostics callback script for that: https://github.com/bit-team/user-callback/blob/master/user-callback.diagnostics Documentation on how to use this could be better (how to install without overwriting the existing script, what is does, when to use, where to find the logged output...) but given our lack of resources this has low prio
It will also happen when running BiT CLI or even the
Yes, I think so too and will try to fix this |
Very nice! I'll add it to my user-callback so that I'll have some better trace next time an issue happens. |
I have just sent a PR (#1502) with all a lot of fixes. It would be great if find the time and a way to test this new version (clone + build without a I have also just updated my diagnostics user callback script to support the two new error codes (and fix a bug with a wrong logging text): https://github.com/bit-team/user-callback/blob/master/user-callback.diagnostics |
…lling rsync not handled gracefully / rsync exit code not evaluated) (#1502) Fix bug: Taking a snapshot reports `rsync` errors now even if no snapshot was taken (#1491) Fix bug: takeSnapshot() recognizes errors now by also evaluating the rsync exit code (#489) Fixes related problem: Killing `rsync` was not handled gracefully (by ignoring the rsync exit code) Fix bug: The error user-callback is now always called if an error happened during taking a snapshot (#1491) Feature: Introduce new error codes for the "error" user callback (as part of #1491): 5: Error while taking a snapshot. 6: New snapshot taken but with errors. Improvement: The `rsync` exit code is now contained in the snapshot log. Example: [E] Error: 'rsync' ended with exit code -9 (negative values are signal numbers, see 'kill -l') Fix CHANGES entries (stick to our standards) --------- Co-authored-by: aryoda <[email protected]>
And also 976081b |
I want to learn more about your distro maintenance. Based on the version number What happens when Debian decide to have a The links you provide do look kind of "official". Is this Ubuntu "main" or "universe" (the community)? You do have What is "lunar"? From a PR perspective it is nice to have fancy names. Even the old conservative Debian do use this. But it would improve communication if you could use a version number always. That makes it easier for people not using Ubuntu on a regular base to understand the context. Even as a regular Debian user I'm not able to remember the "name" of my current version. 🤣 |
Built.
It will supersede all 1.3.3-5~git* thanks to the ~.
It is official in the sense that all packages are built and tested from only official sources, without any modification.
Fair enough. Lunar is the latest Ubuntu stable distribution 23.04. |
I also maintain a Debian repository, but I haven't built and tested the latest unstable debs for that environment yet. |
If you want to remove them, you'll have to update the debian/control file. |
@jean-christophe-manciot Wow, didn't know about your work "behind the curtain" to maintain installation packages! I think you also should include the PR #1503 to avoid a an traceback when trying to show the systray icon... (since we are on the dev branch) @buhtz We have collected a lot of changes now in DEV, how about preparing a new interim release (e.g. for the ARCH maintainers who give a quick feedback in case of problems)? |
Dear jean-christophe, |
It is my way of giving back to the open source community for its awesome work ;-).
976081b is the latest dev commit that I see for now, but I'll try to build new unstable debs for any new related commits. |
Yes, my other PR (#1503) is still in the approval pipeline before I can merge it (hopefully today) @buhtz If you could find the time to review my PR, I have changed only a few LoCs... |
Did. Didn't you get notification about it? I might have missed a button somewhere in the GitHub frontend. |
#1503 (it is a new one, different from the fix here)? |
|
With the latest build (ecf9312) and the latest @aryoda diagnostics user callback script, I started a backup of profile 2 which failed with the error:
The
What is strange is:
|
THX a lot for testing! Regarding the "Unknown error code!" msg it looks like the old version of the diagnostics user callback script is called. Could you please open the profile settings dialog, click on "edit user-callback" and check if it contains the new error codes: Regarding the duplicated "8 - unmount..." it looks like the second unmount was triggered by closing the GUI (same timestamp as the next log entry). The GUI must also mount or unmount if you change the profile (not very nice and efficient, we have open issues here, e.g. #977, #724). I will try to reproduce and debug your observations tomorrow night... |
I failed to mention an important part: I did receive an email for the first time and the script has been called with the following parameters:
I looks like the issue has been solved: bravo :-)
My bad: I did take the contents of your new user-callback but I kept my old $4 parameter name ```error_code````, hence the "Unknown error code". |
backintime-common/backintime-qt: 1.3.3-4 https://fr.archive.ubuntu.com/ubuntu lunar/universe amd64 Packages
When the "Invalid cross-device link" issue happens, the snapshot fails but the user-callback is not called properly. It should be called as:
I discovered this issue because my user-callback is supposed to send an email when an error (4) happens, but I received nothing.
However, If I run it manually with the right parameters, for instance
./user-callback 1 Main 4
, the email is sent & received.Attached files:
The text was updated successfully, but these errors were encountered: