browser icon indicating copy to clipboard operation
browser copied to clipboard

Doesn't launch for me: illegal instruction (core dumped)

Open BarbzYHOOL opened this issue 2 years ago • 9 comments

When trying to launch pulsebrowser or pulsebrowser-bin: illegal instruction (core dumped)

BarbzYHOOL avatar Dec 27 '22 23:12 BarbzYHOOL

Thanks for the report.

Can you run cat /proc/cpuinfo and confirm that your cpu has the following features available:

sse4_2 avx2

We compile against newer CPU models than firefox does in an attempt to slightly improve power efficiency (and maybe performance) by utilizing newer x86 extensions.

trickypr avatar Dec 28 '22 02:12 trickypr

cat /proc/cpuinfo | grep sse4_2 yields results

but cat /proc/cpuinfo | grep avx2 does not

BarbzYHOOL avatar Dec 30 '22 19:12 BarbzYHOOL

That means your CPU is not supported

We compile against newer CPU models than firefox does in an attempt to slightly improve power efficiency (and maybe performance) by utilizing newer x86 extensions.

Your CPU needs at least SSE4_2 and AVX2 to run or compile Pulse.

splatboydev avatar Dec 31 '22 09:12 splatboydev

k no idea what it's about, ciao

BarbzYHOOL avatar Dec 31 '22 22:12 BarbzYHOOL

I am going to reopen this because I think we should drop AVX2 support and this issue is a good point to bring that up. AVX(2) does not provide instructions that explicitly benefit any single part of the browser, they only improve some generic for loops. I think we should lower the bar to just SSE4.2 (which would be Nehalem, it provides extensions for XML parsing^1).

@PressJump Thoughts?

@splatboydev This change will apply to everyone using gluon. Any objections?

A brief overview of what `SSE4.2` and `AVX2` are

x86 CPUs are built on a CISC architecture. The reason they can perform better at certain tasks than RISC (e.g. ARM) is because they have dedicated instructions on chip that allow you to perform potentially hundreds of dedicated instructions as a single instructions.

With each new CPU generation (known as a micro-architecture), new instructions are added that can perform specific tasks. For example, AVX2, which was introduced with the Haswell micro-architecture allows you to perform operations on arrays in parallel. This is both faster and more power-efficient.

It is important to note that AVX2 is a generic instruction set, where as SEE4.2 is optimized for speeding up XML parsing^1.

trickypr avatar Jan 01 '23 02:01 trickypr

Sounds good to me.

PressJump avatar Jan 01 '23 05:01 PressJump

If it doesn't decrease performance much, go for it.

splatboydev avatar Jan 01 '23 06:01 splatboydev

Bonjour, Same bug for me. Tested at work on my Debian virtual machine (VirtualBox W11 host). /proc/cpuinfo tells no avx2 support, but has sse4_2.

I may try to add avx2, but I may face other troubles, because I had to disable it in the past. https://stackoverflow.com/questions/65780506/how-to-enable-avx-avx2-in-virtualbox-6-1-16-with-ubuntu-20-04-64bit

Whatever, as Firefox user from its beginning, Pulse Browser project sounds good for me, especially on my VM because of a smaller memory footprint.

Cordialement, Pascal

pdelrot-samea avatar May 09 '23 10:05 pdelrot-samea

If it doesn't decrease performance much, go for it.

Shouldn't using -mtune instead of -march build flag generate code for all CPUs, with newer ones being able to use newer instructions?

blacklightpy avatar Nov 05 '23 09:11 blacklightpy