-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Invalid NodeJS behavior on system with AMD CPU #33503
Comments
Have you checked to see if it's a problem with |
Hi,
We have tried install using apt manager - same problem.
Srrgey
Получить BlueMail для Android
На 22 мая 2020 г., 02:17, в 02:17, mscdex <notifications@github.com> написал:п>Have you checked to see if it's a problem with `nave` by trying to
…install the same version of node using one of the binary tarballs from
nodejs.org directly or via your package manager (either via a
nodesource repo or distro repo)?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#33503 (comment)
|
The same problem in Chrome.
root@ubuntu:~# google-chrome-stable --version
Google Chrome 83.0.4103.61
…On 22-May-20 02:17, mscdex wrote:
Have you checked to see if it's a problem with `nave` by trying to install the same version of node using one of the binary tarballs from nodejs.org directly or via your package manager (either via a nodesource repo or distro repo)?
|
Since you specifically mention AMD - you mean the problem doesn't arise when you configure qemu/kvm to emulate an Intel CPU? Do you also see the issue on real hardware? FWIW, I have a Ryzen 5 and everything works okay. |
I found the problem (example with buffer.js) in Google, nobody reported for real hardware, virtualization only.
We got a VM from cloud service. Our VMs with same setup on Intel hardware work as expected.
Получить BlueMail для Android
На 23 мая 2020 г., 16:34, в 16:34, Ben Noordhuis <notifications@github.com> написал:п>Since you specifically mention AMD - you mean the problem doesn't arise
…when you configure qemu/kvm to emulate an Intel CPU? Do you also see
the issue on real hardware?
FWIW, I have a Ryzen 5 and everything works okay.
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#33503 (comment)
|
Out of curiosity, did you check with node v10.x and v14.x on the same VM to see if the problems exist with those as well? |
FYI. The VM where the problem had detected was provided by serversget.com. The
CPU information is shown in the issue.
…On 23-May-20 16:34, Ben Noordhuis wrote:
Since you specifically mention AMD - you mean the problem doesn't arise when you configure qemu/kvm to emulate an Intel CPU? Do you also see the issue on real hardware?
FWIW, I have a Ryzen 5 and everything works okay.
|
root@ubuntu:~/node-v14.3.0-linux-x64# ./bin/node -e 'console.log(NaN|0)'
-1
root@ubuntu:~/node-v10.20.1-linux-x64# ./bin/node -e 'console.log(NaN|0)'
-1
…On 24-May-20 01:04, mscdex wrote:
Out of curiosity, did you check with node v10.x and v14.x on the same VM to see if the problems exist with those as well?
|
I'm 99.9% sure this is a qemu bug, not a node.js or V8 bug. Unless you have reason to believe otherwise, I suggest closing this out and taking it up with the qemu people. |
It is your decision.
The issue was opened to notify your about potential problem (we just request
another machine). If there is QEMU problem only, how Ubuntu works on?
Regards,
Sergey
…On 25-May-20 08:32, Ben Noordhuis wrote:
I'm 99.9% sure this is a qemu bug, not a node.js or V8 bug. Unless you have reason to believe otherwise, I suggest closing this out and taking it up with the qemu people.
|
Node.js generates x86_64 machine code at runtime and that's notoriously hard for qemu to track; other architectures have instructions to invalidate the icache but x86_64 doesn't. You're not the first to hit a bug and you probably won't be the last. I'll close this but if you or anyone else has further info, please leave a comment. Thanks for the report. |
Version: v12.16.1 (installed via nave)
Platform: Linux ubuntu 4.4.0-142-generic #168-Ubuntu SMP Wed Jan 16 21:00:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Subsystem:
vendor_id: AuthenticAMD
cpu family: 6
model: 6
model name: QEMU Virtual CPU version 2.5+
stepping : 3
cpu MHz: 2599.922
address sizes: 40 bits physical, 48 bits virtual
cpu cores : 4
What steps will reproduce the bug?
root@ubuntu:~# node -e 'var a; a|=0; console.log(a)'
What is the expected behavior?
The command should return '0'
What do you see instead?
The command returns '-1'
How often does it reproduce? Is there a required condition?
Always
Additional information
The command 'npm install <any_pkg_name>' output:
buffer.js:593
slice: (buf, start, end) => buf.utf8Slice(start, end),
^
RangeError: Index out of range
at Object.slice (buffer.js:593:37)
at Buffer.toString (buffer.js:790:14)
at Object.readFileSync (fs.js:403:41)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1177:22)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'ERR_OUT_OF_RANGE'
The text was updated successfully, but these errors were encountered: