Bug#983416: Error in javascript library

2021-03-05 Thread Alberto Garcia
On Fri, Mar 05, 2021 at 07:57:20PM +0400, Сергей Дмитриенко wrote:
> Yes, I understand. Probably you can close this bug.

Not yet, ideally WebKit should detect whether those instructions are
not supported and either produce different ones or disable the JIT
automatically. I'll check with upstream.

Berto



Bug#983416: Error in javascript library

2021-03-05 Thread Alberto Garcia
More findings from the core dump:

Program terminated with signal SIGILL, Illegal instruction.
#0  0x7f00eb999254 in wasm_entry ()
at ../Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:547
547 ../Source/JavaScriptCore/llint/LowLevelInterpreter.cpp: No such file or 
directory.
[Current thread is 1 (Thread 0x7f00e4913ac0 (LWP 4154))]
(gdb) layout asm

 │0x7f00eb999254roundss $0x2,%xmm0,%xmm1 │
 │0x7f00eb99925amovsbq 0x1(%r13,%r8,1),%r9   │
 │0x7f00eb999260movss  %xmm1,0x0(%rbp,%r9,8) │
 │0x7f00eb999267add$0x3,%r8  │

So here it is, the 'roundss' opcode was added in SSE4, which this CPU
does not support.

Berto



Bug#983416: Error in javascript library

2021-03-05 Thread Alberto Garcia
Control: tags -1 - moreinfo + confirmed

On Thu, Feb 25, 2021 at 04:19:56PM +0100, Alberto Garcia wrote:
> I'll come back with my findings.

So I tried with an older computer and I can also reproduce the
crash reliably, here's the CPU information and I'm also attaching a
backtrace.

vendor_id   : GenuineIntel
cpu family  : 6
model   : 15
model name  : Intel(R) Core(TM)2 Duo CPU L7500  @ 1.60GHz
stepping: 11
microcode   : 0xba
cpu MHz : 933.888
cache size  : 4096 KB
physical id : 0
siblings: 2
core id : 1
cpu cores   : 2
apicid  : 1
initial apicid  : 1
fpu : yes
fpu_exception   : yes
cpuid level : 10
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov 
pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm 
constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 
monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm pti tpr_shadow vnmi 
flexpriority dtherm ida
bugs: cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds 
swapgs itlb_multihit
bogomips: 3191.95
clflush size: 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Berto
Thread 1 "WebKitWebProces" received signal SIGUSR1, User defined signal 1.
futex_wake (private=, processes_to_wake=1, futex_word=)
at ../sysdeps/unix/sysv/linux/futex-internal.h:231
231 ../sysdeps/unix/sysv/linux/futex-internal.h: No such file or directory.
(gdb) bt
#0  0x7fddff695504 in WTF::HashTable, WTF::KeyValuePair, unsigned int>, 
WTF::KeyValuePairKeyExtractor, unsigned int> >, 
JSC::EncodedJSValueWithRepresentationHash, WTF::HashMap, unsigned int, 
JSC::EncodedJSValueWithRepresentationHash, 
JSC::EncodedJSValueWithRepresentationHashTraits, WTF::HashTraits 
>::KeyValuePairTraits, 
JSC::EncodedJSValueWithRepresentationHashTraits>::deallocateTable(WTF::KeyValuePair, unsigned int>*) ()
at DerivedSources/ForwardingHeaders/wtf/HashTable.h:1226
#1  0x7fddff695504 in WTF::HashTable, WTF::KeyValuePair, unsigned int>, 
WTF::KeyValuePairKeyExtractor, unsigned int> >, 
JSC::EncodedJSValueWithRepresentationHash, WTF::HashMap, unsigned int, 
JSC::EncodedJSValueWithRepresentationHash, 
JSC::EncodedJSValueWithRepresentationHashTraits, WTF::HashTraits 
>::KeyValuePairTraits, 
JSC::EncodedJSValueWithRepresentationHashTraits>::~HashTable() () at 
DerivedSources/ForwardingHeaders/wtf/HashTable.h:412
#2  0x7fddff695504 in WTF::HashMap, unsigned int, 
JSC::EncodedJSValueWithRepresentationHash, 
JSC::EncodedJSValueWithRepresentationHashTraits, WTF::HashTraits 
>::~HashMap() () at DerivedSources/ForwardingHeaders/wtf/HashMap.h:35
#3  0x7fddff695504 in JSC::BytecodeGenerator::~BytecodeGenerator() ()
at ../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1052
#4  0x7fddff68b58a in 
std::default_delete::operator()(JSC::BytecodeGenerator*)
 const () at /usr/include/c++/8/bits/unique_ptr.h:81
#5  0x7fddff68b58a in std::unique_ptr >::~unique_ptr() () at 
/usr/include/c++/8/bits/unique_ptr.h:274
#6  0x7fddff68b58a in JSC::BytecodeGenerator::generate(JSC::VM&, JSC::FunctionNode*, JSC::SourceCode 
const&, JSC::UnlinkedFunctionCodeBlock*, 
WTF::OptionSet, JSC::VariableEnvironment const*, 
JSC::ECMAMode) ()
at ../Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h:441
#7  0x7fddff68b58a in generateUnlinkedFunctionCodeBlock ()
at ../Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp:77
#8  0x7fddff68b58a in 
JSC::UnlinkedFunctionExecutable::unlinkedCodeBlockFor(JSC::VM&, JSC::SourceCode 
const&, JSC::CodeSpecializationKind, WTF::OptionSet, 
JSC::ParserError&, JSC::SourceParseMode) () at 
../Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp:232
#9  0x7fddfffcbfdf in 
JSC::ScriptExecutable::newCodeBlockFor(JSC::CodeSpecializationKind, 
JSC::JSFunction*, JSC::JSScope*, JSC::Exception*&) ()
at ../Source/JavaScriptCore/runtime/ScriptExecutable.cpp:326
#10 0x7fddfffd1f77 in 
JSC::ScriptExecutable::prepareForExecutionImpl(JSC::VM&, JSC::JSFunction*, 
JSC::JSScope*, JSC::CodeSpecializationKind, JSC::CodeBlock*&) ()
at ../Source/JavaScriptCore/runtime/ScriptExecutable.cpp:422
#11 0x7fddffcb0161 in 
JSC::ScriptExecutable::prepareForExecution(JSC::VM&, 
JSC::JSFunction*, JSC::JSScope*, JSC::CodeSpecializationKind, JSC::CodeBlock*&) 
()
at ../Source/JavaScriptCore/bytecode/CodeBlock.h:1086
#12 0x7fddffcb0161 in JSC::LLInt::setUpCall(JSC::CallFrame*, 
JSC::CodeSpecializationKind, JSC::JSValue, JSC::LLIntCallLinkInfo*) () at 
../Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:1664
#13 0x7fddff41233c in llint_op_call ()
at ../Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:547
#14 0x7ffdd9b9f130 in  ()
#15 0x7fddff41234a in llint_op_call ()
at ../Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:547
#16 0x7fdd7c7ea520 in

Bug#983416: Error in javascript library

2021-02-25 Thread Alberto Garcia
On Thu, Feb 25, 2021 at 06:37:28PM +0400, Сергей Дмитриенко wrote:
> *$ JavaScriptCoreUseJIT=0 epiphany***
> 
> Yes! It work!

Ok, that's good to know.

> Linux z61t 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64
> GNU/Linux
> 
> Linux debian 4.19.0-14-686-pae #1 SMP Debian 4.19.171-2 (2021-01-30) i686
> GNU/Linux

Hmmm, one of your computers runs a 64-bit system but the other one is
32-bit so we cannot really compare.

My guess is that the JavaScriptCore JIT compiler is producing opcodes
that don't run in an Intel Core 2. I actually have an old computer
with one of those processors, so I can give it a try later.

I'll come back with my findings.

Berto



Bug#983416: Error in javascript library

2021-02-25 Thread Alberto Garcia
On Thu, Feb 25, 2021 at 05:28:54PM +0400, Сергей Дмитриенко wrote:
> No. I have an account, but the button "Login" doesn't respond when clicked.
> 
> And the same error in kern.log:
> 
> Feb 25 17:07:44 z61t kernel: [21036.696350] do_trap: 7 callbacks suppressed
> Feb 25 17:07:44 z61t kernel: [21036.696355] traps: WebKitWebProces[6720]
> trap invalid opcode ip:7fd6ac8ce254 sp:7fff0fde8000 error:0 in
> libjavascriptcoregtk-4.0.so.18.17.13[7fd6ac3f5000+15e]
> Feb 25 17:16:15 z61t kernel: [21547.743728] traps: WebKitWebProces[7202]
> trap invalid opcode ip:7fb88f3d4254 sp:7ffc092fa200 error:0 in
> libjavascriptcoregtk-4.0.so.18.17.13[7fb88eefb000+15e]

I see, does it work if run epiphany like this?

$ JavaScriptCoreUseJIT=0 epiphany

Also, can you confirm that both machines that you have (the Z61t and
the ThinkCentre) are both running buster (amd64) and the same version
of WebKitGTK?

Thanks!

Berto



Bug#983416: Error in javascript library

2021-02-24 Thread Alberto Garcia
On Wed, Feb 24, 2021 at 11:02:22PM +0400, Сергей Дмитриенко wrote:
> No error!
> 
> But I can't login. No reaction on click to login button.

I don't have an account there, but if I try to log in I get one of
these errors:

   Неправильный телефон или почта

   Неправильный пароль

Berto



Bug#983416: Error in javascript library

2021-02-24 Thread Alberto Garcia
On Wed, Feb 24, 2021 at 10:28:16PM +0400, Сергей Дмитриенко wrote:
> It looks like I'm a little confused :(
> 
> *apt show libjavascriptcoregtk-4.0-18 | grep Version*
> 
> Version: 2.30.5-1~deb10u1
> 
> *apt show -a libjavascriptcoregtk-4.0-18 | grep Version*
> 
> Version: 2.30.5-1~deb10u1
> Version: 2.30.4-1~deb10u1
> 
> *dpkg -l libjavascriptcoregtk* | grep ii*
> 
> ii  libjavascriptcoregtk-4.0-18:amd64 2.30.5-1~deb10u1 amd64   
> JavaScript engine library from WebKitGTK
> 
> I'm fully reinstall libjavascriptcoregtk with autoremove a lot of Gnome
> library, but error still appear. I use XFCE.
> 
> My notebook Lenovo Z61t - maybe this is the case? My another very old IBM
> ThinkCentre (MT-M 8424-7KG) with buster work fine.
> 
> Sorry for my English.

Can you try with the MiniBrowser?

$ /usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser https://www.avito.ru/

Does the problem still happen?

Berto



Bug#983416: Error in javascript library

2021-02-24 Thread Alberto Garcia
Control: tags -1 moreinfo

On Wed, Feb 24, 2021 at 12:49:57AM +0400, Сергей Дмитриенко wrote:
> Package: libjavascriptcoregtk-4.0-18
> Version: 2.30.4-1~deb10u1

I cannot reproduce the problem with 2.30.5-1~deb10u1, can you also try
with that version?

Thanks!

Berto