Menu

#58 mbsync always exit with status code 1

1.3.3
invalid
nobody
None
unknown
5
2020-10-05
2020-10-04
Journeyman
No

Hi,

I'm experiencing this on version 1.3.0 from Ubuntu PPA. Sync succeed but exit status is always 1. This break running mbsync as a sysntemd service.

Any idea? It seems this issue is mentioned a couple of times in the mailing list, didnt understand if it was really understood the underlying issue.

I can always reproduce the error with different parameters, example:

mbsync --config /home/$USER/.config/isync/mbsyncrc <myaccount></myaccount>

mbsync --verbose --list --create --config /home/$USER/.config/isync/mbsyncrc <myaccount></myaccount>

thanks

Discussion

  • Journeyman

    Journeyman - 2020-10-04

    For completeness, I should mention that I can reproduce with latest 1.3.3 self compiled

     
  • Oswald Buddenhagen

    did you also try the master branch? (make a backup of everything first, as you can't easily downgrade the sync state.)

    instead of --verbose, use --debug, and send me a log. also a copy of your config.

    also note that --create does not make any sense in conjunction with --list. it's not a problem, though.
    but that --list returns a non-zero status is weird in itself - the log from that might be sufficient.

     
  • Journeyman

    Journeyman - 2020-10-05

    ah thanks for the tip. Running with --debug showed and interesting error:

    $ src/mbsync --debug --create --config ~/.config/isync/mbsyncrc -a
    Reading configuration file /home/$USER/.config/isync/mbsyncrc
    Notice: Master/Slave are deprecated; use Far/Near instead.
    Channel catchall-mydomain.com-inbox
    Opening far side store catchall-mydomain.com-remote...
    F: [ 1] Enter connect_store
    Resolving mail.mydomain.com... ok
    Connecting to mail.mydomain.com (a.b.c.d:993)... 
    F: [ 1] Leave connect_store
    Opening near side store catchall-mydomain.com-local...
    N: [ 2] Enter connect_store
    Maildir error: cannot open store '/home/$USER/.local/mail/mydomain.com/catchall/'
    N: [ 2] Callback enter connect_store, sts=3
    N: [ 2] Callback leave connect_store
    N: [ 2] Leave connect_store
    F: Enter cancel_store
    F: Leave cancel_store
    N: [ 3] Enter cancel_cmds
    N: [ 3] Callback enter cancel_cmds
    N: Enter free_store
    N: Leave free_store
    N: [ 3] Callback leave cancel_cmds
    N: [ 3] Leave cancel_cmds
    Channel catchall-mydomain.com-trash
    Skipping due to failed near side store catchall-mydomain.com-local.
    
    $ echo $?
    1
    

    A reduced version of my configuration:

    IMAPAccount catchall-mydomain.com
    Host mail.mydomain.com
    User catchall@mydomain.com
    Pass ***************
    
    IMAPStore catchall-mydomain.com-remote
    Account catchall-mydomain.com
    
    MaildirStore catchall-mydomain.com-local
    Subfolders Verbatim
    Path ~/.local/mail/mydomain.com/catchall/
    Inbox ~/.local/mail/mydomain.com/catchall/Inbox
    
    Channel catchall-mydomain.com-inbox
    Master :catchall-mydomain.com-remote:INBOX
    Slave :catchall-mydomain.com-local:
    
    Channel catchall-mydomain.com-trash
    Master :catchall-mydomain.com-remote:Trash
    Slave :catchall-mydomain.com-local:Trash
    
    Create Both
    SyncState *
    
    Group mydomain.com
    Channel catchall-mydomain.com-inbox
    Channel catchall-mydomain.com-trash
    Channel catchall-mydomain.com-sent
    

    In the beginning I've let mbsync create the full tree in ~/.local.mail and I think it failed to create one subdir.

    Creating by hand that subdir worked around the issue.

    The expected directory tree is:

    $ tree ~/.local/mail/
    /home/$USER/.local/mail/
    └── mydomain.com
        └── catchall
            ├── Inbox
               ├── cur
                  ├── 1601885541.28027_3.localhost,U=3:2,S
               ├── new
                  ├── 1601885541.28027_1.localhost,U=1:2,
               └── tmp
            └── Trash
                ├── cur
                ├── new
                └── tmp
    

    Besides the issue itself it would be great if that error could bubble up without a --debug flag.

    Hope this helps!

    Thanks

     

    Last edit: Journeyman 2020-10-05
  • Journeyman

    Journeyman - 2020-10-05

    If you spot anything else weird in my config, please let me know. It's the first time I use mbsync.

     
  • Oswald Buddenhagen

    i can't imagine that this error was actually not printed. maybe you redirected only stdout and forgot about stderr?

    which directory in particular was not created? note that the Store's Path is expected to exist; only actual mailboxes are created on demand.

    the global Create and SyncState options should be at the top of the file, and it's actually a bug that mbsync doesn't complain about it. it's not a problem for these particular options, though.

     
    • Journeyman

      Journeyman - 2020-10-05

      i can't imagine that this error was actually not printed. maybe you redirected only stdout and forgot about stderr?

      I stand corrected. You're right, the error appears on stderr. I guess I got confused and didn't notice.

      note that the Store's Path is expected to exist; only actual mailboxes are created on demand.

      ok, now I understand. My expectation was that mbsync could create the entire tree of directories starting from the root ~/.local/mail. Fair enough.

      thanks for your quick and detailed help!

      edit: I can't close this issue -__-

       

      Last edit: Journeyman 2020-10-05
  • Oswald Buddenhagen

    • status: reported --> invalid
     

Log in to post a comment.

MongoDB Logo MongoDB