Skip to content
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

Node.js crash with a fatal error on Date#toLocaleString #27379

Closed
mysticatea opened this issue Apr 24, 2019 · 23 comments
Closed

Node.js crash with a fatal error on Date#toLocaleString #27379

mysticatea opened this issue Apr 24, 2019 · 23 comments
Assignees
Labels
confirmed-bug Issues with confirmed bugs. i18n-api Issues and PRs related to the i18n implementation. v8 engine Issues and PRs related to the V8 dependency.

Comments

@mysticatea
Copy link

  • Version: 12.0.0
  • Platform: Windows (Japanese)
  • Subsystem:

Node.js crash with a fatal error on a call of Date#toLocaleString.
I know that Node.js doesn't contain full ICU, but I didn't expect it to crash with a fatal error.

> node -e "new Date().toLocaleString()"

#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 000000F1A52FD440
@fgreinus
Copy link

You need full icu support in order to use Intl-related functionality.

I fixed it using https://github.com/unicode-org/full-icu-npm and doing what it printed when i installed it.

@gsbelarus
Copy link

Me too. Reverted to v 11.14.0.

@joyeecheung
Copy link
Member

cc @nodejs/i18n @nodejs/platform-windows

@joyeecheung joyeecheung added windows Issues and PRs related to the Windows platform. i18n-api Issues and PRs related to the i18n implementation. labels Apr 24, 2019
@inoyakaigor
Copy link

inoyakaigor commented Apr 24, 2019

Same error here:
v 12.0.0
macos 10.14.4
If it means locale is Russian

Got error:

/* Connecting to MySQL database via db.authenticate() method of sequelize */


#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 0x7ffeefbfe020Illegal instruction: 4

@srl295 srl295 added the confirmed-bug Issues with confirmed bugs. label Apr 24, 2019
@srl295 srl295 self-assigned this Apr 24, 2019
@srl295
Copy link
Member

srl295 commented Apr 24, 2019

aaargh.. Confirmed.

I'm going to say it's probably a v8 regression at this poin, probbaly in deps/v8/src//objects/js-date-time-format.cc

LC_ALL=ja node -e "new Date().toLocaleString()"

@refack refack added v8 engine Issues and PRs related to the V8 dependency. and removed windows Issues and PRs related to the Windows platform. labels Apr 24, 2019
@refack refack changed the title Node.js crash with a fatal error on Date#toLocaleString on Windows Node.js crash with a fatal error on Date#toLocaleString Apr 24, 2019
@srl295
Copy link
Member

srl295 commented Apr 24, 2019

Problem doesn't appear in 8549ac0

@srl295
Copy link
Member

srl295 commented Apr 24, 2019 via email

@srl295
Copy link
Member

srl295 commented Apr 24, 2019

Ooh, this may actually be due to https://unicode-org.atlassian.net/browse/ICU-20558 which we are discussing in ICU-TC at this very instant. If so it's not a v8 bug strictly but was a regression in ICU 63 (and 64)

@srl295
Copy link
Member

srl295 commented Apr 24, 2019

OK so confirmed, IF it were possible to compile ICU 62 against v12/master's v8 (which it isn't with out HACK HACK HACK => srl295@5972e3e ) that this would not be seen.

So I can confirm this is an ICU 63 regression.

@ryzokuken
Copy link
Contributor

@srl295 Node 12 doesn't have V8 74 yet?

@srl295
Copy link
Member

srl295 commented Apr 24, 2019

@ryzokuken 62/63 are ICU not v8 versions

@srl295
Copy link
Member

srl295 commented Apr 24, 2019

OK, so I verified that the open ICU PR unicode-org/icu#632 applied as a floating patch against ICU 63.x and also upcoming 64.x resolves this. Once the ICU PR lands, I'll open a PR as a floating patch. (@ryzokuken it won't conflict with your PR)

@richardlau richardlau pinned this issue Apr 25, 2019
@bluelovers
Copy link

#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 000000FB603EDB50

@srl295
Copy link
Member

srl295 commented Apr 25, 2019

Note that this does not repro with the following, because the issue has to do with the default locale.

node -p "new Intl.DateTimeFormat(['ja']).format(new Date())"

@luozhihua
Copy link

webpack --watch and tsc --watch threw the same error:

#
# Fatal error in , line 0
# Check failed: U_SUCCESS(status).
#
#
#
#FailureMessage Object: 0x7ffc98e77040fish: 'tsc --watch' terminated by signal SIGILL

Issues: #31111

@bluelovers
Copy link

no hotfix for this?

@srl295
Copy link
Member

srl295 commented Apr 26, 2019

@bluelovers I'm not sure what you are asking. #27415 is the PR that fixes this.

@bluelovers
Copy link

@srl295 sry, i mean a released hotfix like 12.0.x

@srl295
Copy link
Member

srl295 commented Apr 26, 2019

@bluelovers it's set to be fast tracked, so dot version soon after it lands…?

targos pushed a commit to targos/node that referenced this issue Apr 27, 2019
- Floating patch for ICU 63.x and 64.x
- fixing crash in Intl when ICU data not found.
- Regression test from refack included.

Background:
- ICU-13778 (landed in ICU 63.1) fixed a bug but
added a regression.
- a recent v8 land in Node v12 (which one?) exposes
this bug to cause a crash when ICU data is not found.

ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558
Backport of: unicode-org/icu#632
Fixes: nodejs#27379
Co-authored-by: Refael Ackermann <refack@gmail.com>

PR-URL: nodejs#27415
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
@targos targos closed this as completed Apr 27, 2019
targos pushed a commit that referenced this issue Apr 27, 2019
- Floating patch for ICU 63.x and 64.x
- fixing crash in Intl when ICU data not found.
- Regression test from refack included.

Background:
- ICU-13778 (landed in ICU 63.1) fixed a bug but
added a regression.
- a recent v8 land in Node v12 (which one?) exposes
this bug to cause a crash when ICU data is not found.

ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558
Backport of: unicode-org/icu#632
Fixes: #27379
Co-authored-by: Refael Ackermann <refack@gmail.com>

PR-URL: #27415
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
@targos targos unpinned this issue Apr 27, 2019
@targos
Copy link
Member

targos commented Apr 27, 2019

PR landed. Proposing a release in #27440 for 2019-04-29.

BethGriggs pushed a commit that referenced this issue May 10, 2019
- Floating patch for ICU 63.x and 64.x
- fixing crash in Intl when ICU data not found.
- Regression test from refack included.

Background:
- ICU-13778 (landed in ICU 63.1) fixed a bug but
added a regression.
- a recent v8 land in Node v12 (which one?) exposes
this bug to cause a crash when ICU data is not found.

ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558
Backport of: unicode-org/icu#632
Fixes: #27379
Co-authored-by: Refael Ackermann <refack@gmail.com>

PR-URL: #27415
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
MylesBorins pushed a commit that referenced this issue May 16, 2019
- Floating patch for ICU 63.x and 64.x
- fixing crash in Intl when ICU data not found.
- Regression test from refack included.

Background:
- ICU-13778 (landed in ICU 63.1) fixed a bug but
added a regression.
- a recent v8 land in Node v12 (which one?) exposes
this bug to cause a crash when ICU data is not found.

ICU Bug: https://unicode-org.atlassian.net/browse/ICU-20558
Backport of: unicode-org/icu#632
Fixes: #27379
Co-authored-by: Refael Ackermann <refack@gmail.com>

PR-URL: #27415
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
clydin added a commit to clydin/angular-cli that referenced this issue May 20, 2019
Node.js 12.0 contains a defect which will cause the command to crash.  This is due to the locale support in Node.js 12.0 (ICU).  ref: nodejs/node#27379
mgechev pushed a commit to angular/angular-cli that referenced this issue May 22, 2019
Node.js 12.0 contains a defect which will cause the command to crash.  This is due to the locale support in Node.js 12.0 (ICU).  ref: nodejs/node#27379
mgechev pushed a commit to angular/angular-cli that referenced this issue May 22, 2019
Node.js 12.0 contains a defect which will cause the command to crash.  This is due to the locale support in Node.js 12.0 (ICU).  ref: nodejs/node#27379
@ninezero90hy
Copy link

ninezero90hy commented Jan 11, 2021

There is no problem with v14.15.4. In MacOs,
It may not be accurate, but as of today, it is.

Does anyone know exactly which version it was resolved in? 😉

@codeyourwayup
Copy link

who in the world would think that nodejs has major bugs like this one! I scrached my head to bald and finally figure it out, it is a node version issue...which is more often than I expected.

@srl295
Copy link
Member

srl295 commented Jan 29, 2022

who in the world would think that nodejs has major bugs like this one! I scrached my head to bald and finally figure it out, it is a node version issue...which is more often than I expected.

Hi Frank. This issue was found and fixed three years ago. What version are you on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. i18n-api Issues and PRs related to the i18n implementation. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging a pull request may close this issue.