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

Linux 5.5.x: IPC/file-system operations seems to get sporadically freezed #253

Closed
vladimiry opened this issue Feb 13, 2020 · 12 comments
Closed

Comments

@vladimiry
Copy link
Owner

vladimiry commented Feb 13, 2020

Summary: there is no reliable solution for the issue at the moment except for reverting to the 5.4 kernel.

I just tried to toggle the Start minimized to tray option on the "General" app settings block and got the Invocation timeout of calling "patchBaseConfig" method on "electron-mail:ipcMain-api" channel with 25000ms timeout error message which I expected to see since I visually saw that the form remains blocked which means the flag toggling process is still in progress.

The issue occurred after the computer got out from the suspend mode.

Toggling the Start minimized to tray flag simply sends the signal to the main process, then the main process updates the config.json and sends the updated version back.

So far the issue has been noticed only on Arch Linux based systems (see also #250 and #252). The app instability issues started to happen a few days ago (on Feb 8-12), so seems to be caused by recent system update since the app is a static thing (was not updated).

Toggling the Start minimized to tray flag is just one case I noticed but it looks like the inter-process communication is affected as a whole thing (see #250 and #252). The wild guess is that the file system access involvement is a required but not limited condition for an issue occurring (access to FS gets freezed and so IPC request doesn't respond within the timeout).

CC @lachlantula, @gourdcaptain, @srappan. Not sure if this issue is similar to issue you reported just recently, since I use @electron v8 based build but you were using released build which is @electron v7 based.

@vladimiry
Copy link
Owner Author

vladimiry commented Feb 13, 2020

I also noticed that after the recent system updates the nm-applet gets segfault-ed quite often especially after the suspend mode with the error message:

systemd-coredump[26719]: Process 22518 (nm-applet) of user 1000 dumped core.
                                                 #14 0x0000563bf888d1d6 n/a (nm-applet)
                                                 #16 0x0000563bf888d2fe n/a (nm-applet)
kernel: nm-applet[22518]: segfault at 20 ip 00007fcc90d51ca0 sp 00007ffca0d56530 error 6 in libglib-2.0.so.0.6200.4[7fcc90cdd000+81000]

The 5.5.2-1 kernel was used. Maybe it's worth to revert to the LTS/5.4 kernel.

@vladimiry
Copy link
Owner Author

In all the 4 reported cases of weird app behavior on Arch-based systems the 5.5.x Linux kernel was used (5.5.2 and 5.5.3).

@vladimiry vladimiry pinned this issue Feb 14, 2020
@vladimiry vladimiry changed the title Inter-process communication / IPC freezed on Linux (Arch Linux system at least) Arch Linux systems: Inter-process communication / IPC freezed on Linux Feb 14, 2020
@vladimiry vladimiry changed the title Arch Linux systems: Inter-process communication / IPC freezed on Linux Arch Linux systems: Inter-process communication / IPC freezed Feb 14, 2020
@vladimiry
Copy link
Owner Author

vladimiry commented Feb 14, 2020

I was able to find in the syslog mentioning libraries like libpthread.so.0 and libc.so.6 related to the node/elecron/nm-applet processes segfaults stacktraces. So I guess the following issues might be similar to what some Linux/Arch users face using ElectronMail with kernel 5.5 (especially the app based on @electron v7, like v4.2.2 release):

That's a Dart stuff of curse, but another blind guess is that @nodejs / @electron might experience similar epoll-related issues. That would explain the guess posted above in the first message:

The wild guess is that the file system access involvement is a required but not limited condition for an issue occurring (access to FS gets freezed and so IPC request doesn't respond within the timeout).

@vladimiry
Copy link
Owner Author

I would be interested to see if someone who recently reported EM v4.2.2 use issues/freezes/timeouts on Arch + 5.5.x kernel could run journalctl -p 3 -r --since "2020-02-12 00:00:00" --until "2020-02-12 23:59:59"-like command and located there some electron / electron-mail / node-like processes segfaults (set the date range you faced the issue within).

@vladimiry vladimiry changed the title Arch Linux systems: Inter-process communication / IPC freezed Linux 5.5.x: IPC/file-system operations seems to get sporadically freezed Feb 14, 2020
@lachlanshoesmith
Copy link

I found the following:

Feb 13 22:43:37 okcomputer systemd-coredump[82098]: Process 82000 (electron-mail) of user 1000 dumped core.

There were several instances of crashes like that.

@vladimiry
Copy link
Owner Author

Might be related kernel issue https://bugzilla.kernel.org/show_bug.cgi?id=205933 (picked from flutter issues tracker).

@vladimiry
Copy link
Owner Author

vladimiry commented Feb 20, 2020

Also possibly related task electron/electron#22291. It would explain why ElectronMail build based on Electron v8 works for @lachlantula, @gourdcaptain, @srappan. The lib https://www.archlinux.org/packages/core/x86_64/glibc/ landed to Arch repo on Feb 11 / Last Updated: 2020-02-11 09:07 UTC which is within above-mentioned time slot:

The app instability issues started to happen a few days ago (on Feb 8-12), so seems to be caused by recent system update since the app is a static thing (was not updated).

@vladimiry
Copy link
Owner Author

Electron v8 based release https://github.com/vladimiry/ElectronMail/releases/tag/v4.3.0 got published. So closing the issue for now as there has been no freezing issues reported if Electron v8 based build was used.

@vladimiry
Copy link
Owner Author

Referencing relevant messages:

Thanks @bedwardly-down for such a thorough investigation.

@bedwardly-down
Copy link

bedwardly-down commented Mar 4, 2020

You're quite welcome. The little info you gave me went a long way and to be fair, that investigation was a bit frustrating but fun. i think I'd like to contribute more in that regard. I also use Protonmail as my main email service, so I'll try your client out and see what i can do here. ☺️

@vladimiry
Copy link
Owner Author

Looks like 5.7 kernel doesn't experience the issue. So using either 5.4 LTS or 5.7 is a solution.

@vladimiry vladimiry unpinned this issue Jun 13, 2020
@bedwardly-down
Copy link

5.6.13 up seems to have fixed the issue for Joplin (the other Electron app that had this issue). There were two epoll related commits submitted by the maintainers that created the original problem commit. Hopefully, no one will mess with this further in the kernel.

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

No branches or pull requests

3 participants