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

[mu bug] mu index crash on macos #2431

Closed
friskgit opened this issue Feb 12, 2023 · 16 comments
Closed

[mu bug] mu index crash on macos #2431

friskgit opened this issue Feb 12, 2023 · 16 comments

Comments

@friskgit
Copy link

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
Copy link
Owner

djcb commented Feb 12, 2023

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.

@friskgit
Copy link
Author

friskgit commented Feb 12, 2023 via email

@djcb djcb changed the title [mu bug] [mu bug] mu index crash on macos Feb 12, 2023
@friskgit
Copy link
Author

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

  • thread Speedbar #5, stop reason = EXC_BAD_ACCESS (code=1, address=0x400000018b8c02e4)
    frame #0: 0x000000018b8c02e4 libsystem_c.dylib_fseeko + 204 libsystem_c.dylib:
    0x18b8c02e4 <+204>: ldrh w8, [x19, #0x10]
    0x18b8c02e8 <+208>: mov w9, #0x81a
    0x18b8c02ec <+212>: tst w8, w9
    0x18b8c02f0 <+216>: b.ne 0x18b8c04f8 ; <+736>
    Target 0: (mu) stopped.

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

@friskgit
Copy link
Author

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

  • thread make check failure ubuntu 10.04 #6, stop reason = EXC_BAD_ACCESS (code=1, address=0x2d)
    frame #0: 0x0000000100614420 libgobject-2.0.0.dylibg_type_class_unref + 20 libgobject-2.0.0.dylibg_type_class_unref:
    -> 0x100614420 <+20>: ldr x0, [x0]
    0x100614424 <+24>: cmp x0, #0x3fd
    0x100614428 <+28>: b.lo 0x100614438 ; <+44>
    0x10061442c <+32>: and x9, x0, #0xfffffffffffffffc
    Target 0: (mu) stopped.

@djcb
Copy link
Owner

djcb commented Feb 13, 2023

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
Copy link
Author

friskgit commented Feb 13, 2023 via email

@friskgit
Copy link
Author

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
Copy link
Author

friskgit commented Feb 16, 2023 via email

@djcb
Copy link
Owner

djcb commented Feb 17, 2023

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
Copy link
Owner

djcb commented Feb 23, 2023

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
Copy link
Author

friskgit commented Feb 23, 2023 via email

@djcb
Copy link
Owner

djcb commented Feb 27, 2023

The make check command executes the unit-tests.

@friskgit
Copy link
Author

friskgit commented Mar 1, 2023 via email

@djcb
Copy link
Owner

djcb commented Mar 1, 2023

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
Copy link
Author

friskgit commented Mar 13, 2023 via email

@djcb
Copy link
Owner

djcb commented Apr 6, 2023

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

@djcb djcb closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants