Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#50387 - [electron] SIGILL on starting atom

Attached to Project: Community Packages
Opened by Nathaniel Ringo (tikiking1) - Saturday, 13 August 2016, 20:15 GMT
Last edited by Nicola Squartini (tensor5) - Friday, 19 August 2016, 12:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Nicola Squartini (tensor5)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Starting Atom from its icon or the CLI (with or without --safe, with or without -f, before and after deleting ~/.atom and ~/.config/Atom), I'm getting a "The editor has crashed" box immediately on start, before any other window appears. This is accompanied by a core dump which, when opened in gdb, includes

Core was generated by `/usr/lib/electron/electron --type=renderer --js-flags='.
Program terminated with signal SIGILL, Illegal instruction.

(I can paste the whole core dump if wanted)

This is a fresh install of Arch Linux, I've installed the base and gnome groups, plus grub, vivaldi, vlc, atom, go, and git. I'm using the linux-samus4 kernel (with -march=broadwell) instead of the stock kernel. This feels like a dependency issue, but I'm not sure where.

Upstream rejects as distro issue: github.com/atom/atom/issues/12413

Additional info:
* package version(s)
* `atom 1.9.8-3`
* `electron 1.3.3-1`
* config and/or log files etc.
* Core dump attached.

Steps to reproduce:
* Open atom.desktop
* Get error message
* Be sad
This task depends upon

Closed by  Nicola Squartini (tensor5)
Friday, 19 August 2016, 12:49 GMT
Reason for closing:  Fixed
Comment by Nathaniel Ringo (tikiking1) - Saturday, 13 August 2016, 20:19 GMT
Whoops, wrong project...
Comment by Doug Newgard (Scimmia) - Saturday, 13 August 2016, 23:20 GMT
I'm guessing you're on i686?

Edit: wait, march=broadwell wouldn't make sense in that case. That's just usually where we see SIGILL.
Comment by Nathaniel Ringo (tikiking1) - Sunday, 14 August 2016, 00:17 GMT
I'm on the Chromebook Pixel 2015, so i7-5500U (SSE4.1/4.2, AVX 2.0). Is there a good way to find out what instruction it's failing on? BTW, the workaround from https://github.com/tensor5/arch-atom/issues/34 works here; electron-prebuilt is also 1.3.3, so I'm guessing it's something Arch-specific?
Comment by Nathaniel Ringo (tikiking1) - Sunday, 14 August 2016, 00:22 GMT
Found it, in gdb I did

x/i 0x18a4291 (address of crash)

It claims it's ud2... http://x86.renejeschke.de/html/file_module_x86_id_318.html

Any reason it would be?

EDIT:

The ud2 is followed by two weird no-ops. Alignment?

ud2
nopw %cs:0x0(%rax,%rax,1)
nopl (%rax)

This looks like it might be related to memory, maybe? The functions defined before and after both call madvise, and there's another ud2 after the return from the function following the problematic one.
Comment by Nathaniel Ringo (tikiking1) - Sunday, 14 August 2016, 03:15 GMT
Summarizing https://github.com/tensor5/arch-atom/issues/34 :

I hand-decompiled the general area around where the SIGILL happens. The function we crash in:

void xyzzy(void* addr, size_t len) {
if(madvise(addr, len, MADV_FREE) != 0)
__asm__("ud2");
}

and we crash on the ud2. There aren't any candidates for this piece of code in electron or any of its submodules. The function looks like it was compiled by clang, so I don't think it's an inclusion from glibc or any system library... Various nearby functions corresponded to memory management functions in V8; if we have a resident V8 expert, I'd love to get their opinion.

Edit was to remove BBCode tags; how do we format things here?
Comment by surefire (surefire) - Friday, 19 August 2016, 05:58 GMT
Nathaniel, do you have a problem with the latest version of `electron 1.3.3-2` ?
Comment by Nathaniel Ringo (tikiking1) - Friday, 19 August 2016, 06:21 GMT Comment by Nicola Squartini (tensor5) - Friday, 19 August 2016, 12:49 GMT

Loading...