$ coredumpctl gdb /usr/bin/mbsync PID: 12415 (mbsync) UID: 1000 (jarkko) GID: 1000 (jarkko) Signal: 11 (SEGV) Timestamp: Wed 2024-07-31 21:11:06 EEST (58min ago) Command Line: mbsync -V kapsi Executable: /usr/bin/mbsync Control Group: /user.slice/user-1000.slice/user/session.slice/org.gnome.Shell Unit: user User Unit: org.gnome.Shell Slice: user-1000.slice Owner UID: 1000 (jarkko) Boot ID: a3338b4485bd4e139823e7800bb0864d Machine ID: bf49fbc0a2a1401ca2ee487d88d3e557 Hostname: suppilovahvero Storage: /var/lib/systemd/coredump/core.mbsync.1000.a3338b4485bd4e139823e7800bb0864d.12415.1722449466000000.zst (present) Size on Disk: 522.5K Package: isync/1.4.4-8.fc40 build-id: 3fb7ee1e76d56b433d695891b1affa4e116328b9 Message: Process 12415 (mbsync) of user 1000 dumped core. Module libsasldb.so from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module libplain.so from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module liblogin.so from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module libpcre2-8.so.0 from rpm pcre2-10.44-1.fc40.x86_64 Module libselinux.so.1 from rpm libselinux-3.6-4.fc40.x86_64 Module libkeyutils.so.1 from rpm keyutils-1.6.3-3.fc40.x86_64 Module libkrb5support.so.0 from rpm krb5-1.21.3-1.fc40.x86_64 Module libcom_err.so.2 from rpm e2fsprogs-1.47.0-5.fc40.x86_64 Module libk5crypto.so.3 from rpm krb5-1.21.3-1.fc40.x86_64 Module libkrb5.so.3 from rpm krb5-1.21.3-1.fc40.x86_64 Module libgssapi_krb5.so.2 from rpm krb5-1.21.3-1.fc40.x86_64 Module libgssapiv2.so from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module libanonymous.so from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module libcap.so.2 from rpm libcap-2.69-8.fc40.x86_64 Module libnss_resolve.so.2 from rpm systemd-255.10-1.fc40.x86_64 Module libnss_mdns4_minimal.so.2 from rpm nss-mdns-0.15.1-11.fc40.x86_64 Module libcrypt.so.2 from rpm libxcrypt-4.4.36-5.fc40.x86_64 Module libz.so.1 from rpm zlib-ng-2.1.7-1.fc40.x86_64 Module libsasl2.so.3 from rpm cyrus-sasl-2.1.28-19.fc40.x86_64 Module libcrypto.so.3 from rpm openssl-3.2.1-2.fc40.x86_64 Module libssl.so.3 from rpm openssl-3.2.1-2.fc40.x86_64 Module mbsync from rpm isync-1.4.4-8.fc40.x86_64 Stack trace of thread 12415: #0 0x000055d33068a967 sync_chans (mbsync + 0xf967) #1 0x000055d33068d52e imap_list_store_p2 (mbsync + 0x1252e) #2 0x000055d33068d203 done_imap_cmd (mbsync + 0x12203) #3 0x000055d330696f61 imap_socket_read (mbsync + 0x1bf61) #4 0x000055d330680967 main (mbsync + 0x5967) #5 0x00007fb54fa39088 __libc_start_call_main (libc.so.6 + 0x2a088) #6 0x00007fb54fa3914b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a14b) #7 0x000055d3306810b5 _start (mbsync + 0x60b5) ELF object binary architecture: AMD x86-64 GNU gdb (Fedora Linux) 14.2-3.fc40 Copyright (C) 2023 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <https://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/bin/mbsync... This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.fedoraproject.org/> Enable debuginfod for this session? (y or [n]) y Debuginfod has been enabled. To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit. Reading symbols from /home/jarkko/.cache/debuginfod_client/3fb7ee1e76d56b433d695891b1affa4e116328b9/debuginfo... [New LWP 12415] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Core was generated by `mbsync -V kapsi'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x000055d33068a967 in sync_chans (mvars=0x7ffef80ee330, ent=<optimized out>) at /usr/src/debug/isync-1.4.4-8.fc40.x86_64/src/main.c:906 906 char *sname = boxes[N] ? boxes[N][sb] : NULL; Reproducible: Always Steps to Reproduce: mbsync -aV Actual Results: SIGSEGV Expected Results: Maildirs are synced. Happens also with the upstream of isync. I tried this. I marked this as urgent as it prevents me reviewing kernel patches in Linux ;-) I have Mac mini as backup and there mbsync works without issues but it is not a great environment for testing kernel patches. .mbsyncrc: cat .mbsyncrc IMAPAccount kapsi Host mail.kapsi.fi User jjs PassCmd "pass show imap/mail.kapsi.fi" SSLType IMAPS IMAPStore kapsi-remote Account kapsi MaildirStore kapsi-local SubFolders Verbatim Path ~/.cache/mbsync/kapsi/ Inbox ~/.cache/mbsync/kapsi/INBOX Channel kapsi Far :kapsi-remote: Near :kapsi-local: Patterns * Create Both Expunge Both SyncState *
Did also "SELInux sanity check": "setenforce 0" has no effect on this.
Created attachment 2043223 [details] isync-1.4.4-8.fc40.x86_64 Backtrace with isync-1.4.4-8.fc40.x86_64.
Created attachment 2043224 [details] e70c300f7446 ("permit leading whitespace in INTERNALDATE strings") Backtrace of upstream commit ID e70c300f7446 ("permit leading whitespace in INTERNALDATE strings").
This package is important because it is a niche piece of software BUT at the same time it is widely used by developers working on "core projects" of the Internet, which rely heavily on email.
(gdb) print boxes $1 = {0x5555556c4540, <optimized out>} I noticed this so I tried: diff --git a/src/main_sync.c b/src/main_sync.c index 226e324..afb23ca 100644 --- a/src/main_sync.c +++ b/src/main_sync.c @@ -623,6 +623,7 @@ sync_opened( main_vars_t *mvars, int t ) if (!mvars->chanptr->boxlist && mvars->chan->patterns) { mvars->chanptr->boxlist = 2; char **boxes[2]; + __asm__ __volatile__("" :: "m" (boxes)); boxes[F] = filter_boxes( mvars->boxes[F], mvars->chan->boxes[F], mvars->chan->patterns ); boxes[N] = filter_boxes( mvars->boxes[N], mvars->chan->boxes[N], mvars->chan->patterns ); box_ent_t **mboxapp = &mvars->chanptr->boxes; It literally fixed it! I.e. could this be a GCC bug?
I tried compiling with clang (18) now WITHOUT my fix, and that version also works just fine. This should be a stronger evidence of an actual bug in GCC (14). I'll attach my workaround to this bug.
Created attachment 2043239 [details] Workaround for the GCC-14 issue Commit message can be freely edited whatever suits you.
Could this be related to ceb0fa9 ("don't try to qsort() NULL array", 2024-07-04) which is in isync 1.5.0 but not earlier? That version also solves issues during first sync. I've prepared builds here (before prodding fab) in case you'd like to try out: https://copr.fedorainfracloud.org/coprs/mjg/isync/
So in the upstream this patch fixes the issue: ceb0fa980 It was pointed out the maintainer in the bug: https://sourceforge.net/p/isync/patches/19/
I've created a PR: https://src.fedoraproject.org/rpms/isync/pull-request/5 and uploaded the sources to the side cache. It just needs to be merged :)
*** Bug 2304747 has been marked as a duplicate of this bug. ***
(In reply to Michael J Gruber from comment #8) > Could this be related to > > ceb0fa9 ("don't try to qsort() NULL array", 2024-07-04) > > which is in isync 1.5.0 but not earlier? That version also solves issues > during first sync. I've prepared builds here (before prodding fab) in case > you'd like to try out: > > https://copr.fedorainfracloud.org/coprs/mjg/isync/ Indeed it is related to this. I locally applied the patch on the 1.4.4 and it works fine. What's the maintainers' preferred strategy regarding this ticket for FC40? - Upgrade to 1.5.0 - Patch the 1.4.4 (if needed, I can share my patch) Regards,
FEDORA-2024-5c1202ba1d (isync-1.5.0-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2024-5c1202ba1d
FEDORA-2024-5c1202ba1d (isync-1.5.0-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.
Problem still occurs in F40 and F41. Please apply the same to also F40 and F41
FEDORA-2024-1507e7def5 (isync-1.5.0-1.fc41) has been submitted as an update to Fedora 41. https://bodhi.fedoraproject.org/updates/FEDORA-2024-1507e7def5
FEDORA-2024-da3e6c873e (isync-1.5.0-1.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2024-da3e6c873e
FEDORA-2024-b22d84ca47 (isync-1.5.0-1.fc39) has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2024-b22d84ca47
FEDORA-2024-da3e6c873e has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-da3e6c873e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-da3e6c873e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-b22d84ca47 has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-b22d84ca47` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-b22d84ca47 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-1507e7def5 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-1507e7def5` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-1507e7def5 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-bfb8f42d46 has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-bfb8f42d46` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-bfb8f42d46 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2024-bfb8f42d46 (isync-1.5.0-2.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.