djcb / mu

maildir indexer/searcher + emacs mail client + guile bindings
http://www.djcbsoftware.nl/code/mu
GNU General Public License v3.0
1.61k stars 389 forks source link

[mu bug] mu index crash on macos #2431

Closed friskgit closed 1 year ago

friskgit commented 1 year ago

Describe the bug Moving my Maildir from a Ubuntu install to a MacOS computer I get a segmentation fault when I try to run:

mu index -d indexing maildir /Users/henrik_frisk/Maildir -> store /Users/henrik_frisk/.cache/mu/xapian Segmentation fault: 11hecked: 113816; updated/new: 58176; cleaned-up: 0

To Reproduce Unfortuanately I'm guessing it's todo with my rather large Maildir.

Environment MacOS 12.6.3 Mu from git: version 1.9.19 Emacs GNU Emacs 28.2

Thanks for any help!

djcb commented 1 year ago

Hmmm, this is not really an actionable report; what we'd need is:

Thanks.

friskgit commented 1 year ago

Sorry about that.

It has never happened before, and does not happen on my Ubuntu system (same maildir contents > 13Gb) mu version 1.9.1. It appears to happen at the same point.

I will run under gdb and report.

On Sun, Feb 12, 2023, 12:04 PM Dirk-Jan C. Binnema @.***> wrote:

Hmmm, this is not really an actionable report; what we'd need is:

  • does this happen always? always at the same point?
  • please run under gdb and attach the backtrace
  • did this happen with earlier versions? which ones?

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/djcb/mu/issues/2431#issuecomment-1427003037, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHIRGB73M5JRZ5RAX7ESFDWXC7VBANCNFSM6AAAAAAUZHNI4M . You are receiving this because you authored the thread.Message ID: @.***>

friskgit commented 1 year ago

Apparently gdb is not ported to the M1 architecture but I got lldb to work. I'm not really used to it but here's the output:

(lldb) settings set target.run-args index (lldb) run Process 15932 launched: '/opt/homebrew/bin/mu' (arm64) indexing maildir /Users/henrik_frisk/Maildir -> store /Users/henrik_frisk/.cache/mu/xapian Process 15932 stopped

When I moed the maildir directory I zipped it and unpacked in on the new computer (that is from Ubuntu to MacOS).

friskgit commented 1 year ago

Ran it once more:

Process 16935 launched: '/opt/homebrew/bin/mu' (arm64) indexing maildir /Users/henrik_frisk/Maildir -> store /Users/henrik_frisk/.cache/mu/xapian Process 16935 stoppedchecked: 113121; updated/new: 3417; cleaned-up: 0

djcb commented 1 year ago

Thanks for checking.

Ah, the M1... it's a bit hard to guess from the assembly what's going on :-( . Any chance you can compile mu yourself on that platform?

friskgit commented 1 year ago

Sure, I'll try that!

On Mon, Feb 13, 2023, 12:08 PM Dirk-Jan C. Binnema @.***> wrote:

Thanks for checking.

Ah, the M1... it's a bit hard to guess from the assembly what's going on :-( . Any chance you can compile mu yourself on that platform?

— Reply to this email directly, view it on GitHub https://github.com/djcb/mu/issues/2431#issuecomment-1427751722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHIRGDVXM3SP3JZMHTGV43WXIIZFANCNFSM6AAAAAAUZHNI4M . You are receiving this because you authored the thread.Message ID: @.***>

friskgit commented 1 year ago

No, I get the same result. Tried to attach this version to the debugger but it claimed mu "doesn't contain any 'host' platform architectures" (like (arm64) I guess, probably something I should have added to the compiler). I still get a segmentation fault.

I tried removing everything except the archive from the Maildir (and a few other dirs like 'cur' etc) but it still segfaults.

/h

friskgit commented 1 year ago

Den mån 13 feb. 2023 kl 16:22 skrev Henrik Frisk @.***>:

Sure, I'll try that!

On Mon, Feb 13, 2023, 12:08 PM Dirk-Jan C. Binnema < @.***> wrote:

Thanks for checking.

Ah, the M1... it's a bit hard to guess from the assembly what's going on :-( . Any chance you can compile mu yourself on that platform?

— Reply to this email directly, view it on GitHub https://github.com/djcb/mu/issues/2431#issuecomment-1427751722, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHIRGDVXM3SP3JZMHTGV43WXIIZFANCNFSM6AAAAAAUZHNI4M . You are receiving this because you authored the thread.

I guess this is difficult to track down. Two questions:

A real shame if I can't use mu on the M1 (my university forces me to use a mac unfortunately)

/h

Message ID: @.***>

djcb commented 1 year ago

The old macs I have were nice machines, and perhaps the M1 is too... the ARM arch is a bit pickier, but there's not much I can do without some good backtrace... I don't have a good ARM machine handy ATM, unfortunately.

djcb commented 1 year ago

In any case, would be useful to get a backtrace with symbols, otherwise it's hard to see what's going on. Can you run make check? Does that pass? Thanks.

friskgit commented 1 year ago

On Thu, Feb 23, 2023, 7:34 PM Dirk-Jan C. Binnema @.***> wrote:

In any case, would be useful to get a backtrace with symbols, otherwise it's hard to see what's going on. Can you run make check? Does that pass? Thanks.

Not sure how to do that? make check on what?

FWIW I synchronized one of my accounts on the M1 with mbsync on an empty maildir and ran mu index on it without hickups, so it's likely to do with moving the maildir between systems i think.

— Reply to this email directly, view it on GitHub https://github.com/djcb/mu/issues/2431#issuecomment-1442247417, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHIRGEY3PMMWFRPPDOEM7LWY6USZANCNFSM6AAAAAAUZHNI4M . You are receiving this because you authored the thread.Message ID: @.***>

djcb commented 1 year ago

The make check command executes the unit-tests.

friskgit commented 1 year ago

On Mon, Feb 27, 2023, 11:39 PM Dirk-Jan C. Binnema @.***> wrote:

The make check command executes the unit-tests.

Right, but I had no problem compiling mu, andnitnworls fine (so far) with another maildir so how can 'make check' help understanding what's the issue with the maildir I moved from Linux to macOS?

Henrik

djcb commented 1 year ago

Perhaps the unit tests cover this specific problem, and running them would pinpoint where it is.

I can't really see how moving the maildir would make a difference, so it would be interesting to see what precisely "makes it work". Is it with some specific mailidir and/or message? Which one etc.

Otherwise, attaching gdb to the running process mu (compiled with symbols) and reproduce, and include the backtrace would be useful.

friskgit commented 1 year ago

Den ons 1 mars 2023 kl 22:10 skrev Dirk-Jan C. Binnema < @.***>:

Perhaps the unit tests cover this specific problem, and running them would pinpoint where it is.

I can't really see how moving the maildir would make a difference, so it would be interesting to see what precisely "makes it work". Is it with some specific mailidir and/or message? Which one etc.

Otherwise, attaching gdb to the running process mu (compiled with symbols) and reproduce, and include the backtrace would be useful.

Sorry for the silence. I switched methods and decided to start with a fresh maildir. Syncing the same accounts seems to work fine with mu now after soome time. I don't really now how to deal with all the stuff in my old maildir that I no longer have access to, but that's another issue. When my schedule gets less crazy I would be happy to help running the tests on the old maildir.

/Henrik

Message ID: @.***>

djcb commented 1 year ago

Ah, #2469 is about the same problem and has a backtrace, so continuing discussion there, thanks!