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

Recent commits segfault when changing mailbox #2919

Closed
fourjay opened this issue Apr 27, 2021 · 6 comments · Fixed by #2923
Closed

Recent commits segfault when changing mailbox #2919

fourjay opened this issue Apr 27, 2021 · 6 comments · Fixed by #2923
Labels

Comments

@fourjay
Copy link

fourjay commented Apr 27, 2021

Expected Behaviour

Google connected IMAP.
Changing folder to [Gmail]/Sent Mail work(ed)

Actual Behaviour

Recent changes caused segfault when changing to Sent Mail
Running under gdb change creates long period of maxed CPU when changing to Sent Mail

If NeoMutt crashed, did your OS create a 'coredump' file?

No

Steps to Reproduce

How often does this happen?

  • Always

When did it start to happen?

Last few commits

NeoMutt Version

I've reverted to 773f8da which works as expected

@fourjay fourjay added the type:bug Bug label Apr 27, 2021
@flatcap
Copy link
Member

flatcap commented Apr 27, 2021

Thanks for the speedy bug report. It's got me worried, though.
Those last four commits were meant to be risk free.

I can't repeat the problem with my GMail account, but there's not much in it.

coredump

If your machine is using systemd, then coredumps will be hidden away somewhere like: /var/lib/systemd/coredump
If so, you can get them by:

coredumpctl list
coredumpctl dump [ID] > coredump
gdm neomutt coredump

A backtrace would be very helpful if you can get one.

Last few commits

The only commit that does anything is 6956cdf.
Please can you try NeoMutt without it:

git revert 6956cdf1d6

Thanks

@fourjay
Copy link
Author

fourjay commented Apr 28, 2021

I am using systemd, and am unfamiliar with coredumpctl :-)
I've not yet got that working, but I did get gdb on this try.

Some possibly helpful output

(gdb) where
#0  send (source=0xcd44d50, current=0xcd44d50, event_type=event_type@entry=NT_EMAIL, event_subtype=event_subtype@entry=2, event_data=event_data@entry=0x7fffffffc3c0) at mutt/notify.c:115
#1  0x00000000004e47cf in notify_send (notify=<optimized out>, event_type=event_type@entry=NT_EMAIL, event_subtype=event_subtype@entry=2, event_data=event_data@entry=0x7fffffffc3c0)
    at mutt/notify.c:159
#2  0x00000000004d23cf in email_free (ptr=0x7ffff150d020) at email/email.c:52
#3  0x000000000043d8b6 in mx_fastclose_mailbox (m=m@entry=0x8e4130) at mx.c:455
#4  0x000000000043e76a in mx_fastclose_mailbox (m=0x8e4130) at mx.c:807
#5  mx_mbox_close (m=0x8e4130) at mx.c:806
#6  0x000000000044bd53 in change_folder_mailbox (menu=0x6123790, m=<optimized out>, oldcount=oldcount@entry=0xc85f1e4, shared=shared@entry=0xa26db0, read_only=read_only@entry=false)
    at index/index.c:686
#7  0x000000000044ed6b in mutt_index_menu (dlg=0x69bef90, m_init=<optimized out>) at index/index.c:2547
#8  0x000000000040b2cb in main (argc=1, argv=0x7fffffffe138, envp=<optimized out>) at main.c:1255


(gdb) l
110       if (!source || !current)
111         return false;
112
113       // mutt_debug(LL_NOTIFY, "send: %d, %ld\n", event_type, event_data);
114       struct ObserverNode *np = NULL;
115       STAILQ_FOREACH(np, &current->observers, entries)
116       {
117         struct Observer *o = np->observer;
118         if (!o)
119           continue;

@flatcap
Copy link
Member

flatcap commented Apr 28, 2021

Thanks! That's perfect.

@flatcap
Copy link
Member

flatcap commented Apr 28, 2021

I think I've fixed it.
Please can you give master a try.

Thanks again for your debugging

@fourjay
Copy link
Author

fourjay commented Apr 28, 2021

It's fixed the bug for me :-)

@flatcap
Copy link
Member

flatcap commented Apr 28, 2021

Great! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants