element-hq / element-hq/element-web
re-open: element-desktop crashes with exit code 132 (gather_data_sampling=off)
- Dominant language
- TypeScript
- Stars
- 13.5k
- Forks
- 2.8k
- PR merge metrics
- PR metrics pending
Description
### Steps to reproduce
This is a re-open of element-hq/element-desktop#1397 as Arch is using `electron28` in the meantime, but the issue is still present.
The behaviour I observe: element-desktop crashes with exit code 132 (illegal hardware):
```bash
kmille@linbox:~ /usr/bin/element-desktop
/home/kmille/.config/Element exists: yes
/home/kmille/.config/Riot exists: no
No update_base_url is defined: auto update is disabled
Fetching translation json for locale: en_EN
Changing application language to en
Fetching translation json for locale: en
Resetting the UI components after locale change
Resetting the UI components after locale change
Changing application language to en
Fetching translation json for locale: en
Resetting the UI components after locale change
zsh: illegal hardware instruction (core dumped) /usr/bin/element-desktop
```
- it does not crash If I boot `6.7.1.arch1-1`
- it does not crash if I boot `6.7.2.hardened1-1` and use `gather_data_sampling=off` as kernel parameter
- it crashes if I boot `6.7.2.hardened1-1` without having `gather_data_sampling=off` parameter
My toughts about it:
- there was a CPU speculation vulnerability and a microkernel fix
- my CPU has not received a microcode update (out of date, Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz)
- the Linux kernel has a software mitigation (I think it removes AVX)
- element-desktop/electron fails to enumerate AVX properly, see the commit message:
> This is a big hammer. It is known to break buggy userspace that uses incomplete, buggy AVX enumeration. Unfortunately, such userspace does exist in the wild
- what works for me: using the kernel paremter `gather_data_sampling=off` (disables the Kernel software mitigation) and being unsafe
We already spoke about it, but now Arch Linux's `electron-desktop` is now using `electron28` and not `electron25`. I had the same issue with [signal-desktop](https://github.com/signalapp/Signal-Desktop/issues/6611#issuecomment-1829829130), but it was fixed (upstream).
Check the kernel docs about gather_data_sampling:
https://docs.kernel.org/admin-guide/hw-vuln/gather_data_sampling.html-
### Operating system
Arch Linux
### Application version
1.11.54-1
### Will you send logs?
Yes
Contributor guide
Assessment
This issue has not been assessed yet.