A new tab/render process after timezone change still has the old timezone in V8. |
||||||||||||
Issue descriptionSpun off from bug v8:3547 , bug 466014 , bug 417640 * How to reproduce 1. Go to http://i18nl10n.com/chrome/tzchange.html 2. Click on 'check' 3. The last line has the current timezone (other lines can be ignored for this bug); Say, 'America/Los_Angeles' 4. Change the OS timezone (drastically different one; e.g. Asia/Seoul ) - On Chrome OS, can be done in Settings - On Linux, use the system settings UI. It's also possible on the command line (see https://help.ubuntu.com/community/UbuntuTime ) 5. Make a new tab 6. Go to the url at page 1. Click on 'check' and see the last line for the timezone. Actual: It's still the old one ( America/Los_Angeles) Expected: It should be 'Asia/Seoul' ICU default timezone in ICU is updated in both browser and render processes on timezone change (TimeZoneMintor initiates this update). With that, existing tabs (render processes) get a new updated timezone. On Linux and Chrome OS, this update is not applied to a zygote process, from which new render process is forked. The zygote process is created at the browser start-up and has the ICU default timezone set at that time. As a result, in v8, Intl.DateTimeFormat().resolved.timeZone in a new tab (made after a timezone update) still has the initial timezone (America/Los_Angeles). TimeZoneMonitor needs to send a message (with a new timezone ID, e.g. Asia/Seoul) to the zygote process (there's only one afaik) to update the ICU timezone there (as it does to render processes).
,
Jan 24 2017
Issue 256489 has been merged into this issue.
,
Jan 25 2017
A couple of ideas (potentially crazy. might be a bit expensive): While/before forking, ask the browser process for the time zone ID (Olson) and update the ICU default time zone in zygote. A new tz id can be compared with the current default. If they agree, it'll not be updated. This has to happen every time render process is forked from zygote process (instead of only 'on tz change'). A much better way would be to send down a new Olson tz ID to Zygote ON a tz update (from TimeZone monitor) if we can get hold of a zygote_host. A recent decoupling of TZMonitor from content might or might not make this more difficult than before ( bug 612341 ).
,
Oct 11 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/28ef8dc7009d57de2782668ed00dff34e31dee2d commit 28ef8dc7009d57de2782668ed00dff34e31dee2d Author: Jungshik Shin <jshin@chromium.org> Date: Wed Oct 11 23:21:37 2017 Revert "Enable icu-timezone-data by default" This reverts commit d9a25842d3aba82ead5e06c7fd7cb4896e6ad202. Reason for revert: I'm reverting this CL for a few reasons. #2 is the most significant and I should have thought of that before making a switch. Sorry for that. 1) perf-regression: http://crbug.com/769706 2) http://crbug.com/612010 : ICU timezone update is not propagated to zygote process so that new tabs will hold on to an old timezone even after a timezone change on Linux and Chrome OS. 3) http://crbug.com/754053 : OS timezone detection issues on macOS 10.13, Ubutu 16, RHEL 7, SuSe Linux 12 or newer. ; it's being fixed. So, it actually ok. 4) http://crbug.com/771868 : timezone wrong in gmail: If it's due to #3, we're fine because it's fixed. If not, we need to look more. Original change's description: > Enable icu-timezone-data by default > > This will introduce a new behavior on POSIX(-like) platforms. Timezone > names inside parentheses after GMT offset will not be 3-4 letter > abbreviation any longer. They'll be human-readable names in the current > default locale. This matches the current Windows behavior. > > new Date(2017, 5, 22).toString() > new Date(2017, 11, 22).toString() > > Current: > > Thu Jun 22 2017 00:00:00 GMT-0700 (PDT) > Fri Dec 22 2017 00:00:00 GMT-0800 (PST) > > New in en-US locale: > > Thu Jun 22 2017 00:00:00 GMT-0700 (Pacific Daylight Time) > Fri Dec 22 2017 00:00:00 GMT-0800 (Pacific Standard Time) > > New in German locale: > > Thu Jun 22 2017 00:00:00 GMT-0700 (Nordamerikanische Westküsten-Sommerzeit) > Fri Dec 22 2017 00:00:00 GMT-0800 (Nordamerikanische Westküsten-Normalzeit) > > BUG= v8:6031 , v8:2137 , v8:6076 > TEST=mjsunit/icu-date-lord-howe.js, mjsunit/icu-date-to-string.js > > Change-Id: I4e7fd8b3ddae5c7779e220c4c101e45904fcdc01 > Reviewed-on: https://chromium-review.googlesource.com/625164 > Commit-Queue: Jungshik Shin <jshin@chromium.org> > Reviewed-by: Daniel Ehrenberg <littledan@chromium.org> > Cr-Commit-Position: refs/heads/master@{#47953} TBR=adamk@chromium.org,littledan@chromium.org,jshin@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: v8:6031 , v8:2137 , v8:6076, chromium:769706 , chromium:612010 , chromium:771868 Change-Id: I60d75467ee21975d3a235344b01c0d2d44a7da96 Reviewed-on: https://chromium-review.googlesource.com/713404 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/heads/master@{#48478} [modify] https://crrev.com/28ef8dc7009d57de2782668ed00dff34e31dee2d/src/flag-definitions.h
,
Oct 12 2017
We are creating the 6.3 branch today. Please merge this on the branch afterwards.
,
Oct 12 2017
(the revert)
,
Oct 12 2017
From 771868, macOS seems to have begun to show a similar symptom:
-----------cut----here
In a new tab (opened after a timezone change), I got this. Note that timeZone is not defined.
> var nf= new Intl.DateTimeFormat("en")
> nf.resolvedOptions()
{locale: "en", numberingSystem: "latn", calendar: "gregory", timeZone: undefined, year: "numeric", …}
In an existing tab, I got this (note that timeZOne is correct)
{locale: "en", numberingSystem: "latn", calendar: "gregory", timeZone: "Australia/Sydney", year: "numeric", …}
Hmm.... this is bug 612010 , but that bug didn't exist on macOS. It's only for Chrome OS and Linux. So, something must have happened recently to make it an issue on macOS.
Does macOS now have a zygote process?
--------cut-----here --------
,
Oct 16 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d7343703bc6a3c1dbd5ead201186c520ffc9e47b commit d7343703bc6a3c1dbd5ead201186c520ffc9e47b Author: Jungshik Shin <jshin@chromium.org> Date: Mon Oct 16 20:43:16 2017 Merged: Revert "Enable icu-timezone-data by default" This reverts commit d9a25842d3aba82ead5e06c7fd7cb4896e6ad202. This is for 6.3 branch (to go with Chromium 63 branch). Reason for revert: I'm reverting this CL for a few reasons. #2 is the most significant and I should have thought of that before making a switch. Sorry for that. 1) perf-regression: http://crbug.com/769706 2) http://crbug.com/612010 : ICU timezone update is not propagated to zygote process so that new tabs will hold on to an old timezone even after a timezone change on Linux and Chrome OS. 3) http://crbug.com/754053 : OS timezone detection issues on macOS 10.13, Ubutu 16, RHEL 7, SuSe Linux 12 or newer. ; it's being fixed. So, it actually ok. 4) http://crbug.com/771868 : timezone wrong in gmail: If it's due to Revision: 28ef8dc7009d BUG= chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 ,v8:6076 LOG=N NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true R=adamk@chromium.org, hablich@chromium.org Change-Id: Id0093c2bc69e5bc1d3b7147b7bbcc633ed625a45 Reviewed-on: https://chromium-review.googlesource.com/721919 Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/branch-heads/6.3@{#7} Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} [modify] https://crrev.com/d7343703bc6a3c1dbd5ead201186c520ffc9e47b/src/flag-definitions.h
,
Oct 16 2017
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/3b1cfa38bcd616609f263ac3b6721c0214c45d19 commit 3b1cfa38bcd616609f263ac3b6721c0214c45d19 Author: Michael Hablich <hablich@chromium.org> Date: Tue Oct 17 16:11:43 2017 Revert "Merged: Revert "Enable icu-timezone-data by default"" This reverts commit d7343703bc6a3c1dbd5ead201186c520ffc9e47b. Reason for revert: broke some branch builders like https://build.chromium.org/p/client.v8.branches/builders/V8%20arm%20-%20sim%20-%20beta%20branch%20-%20debug Original change's description: > Merged: Revert "Enable icu-timezone-data by default" > > This reverts commit d9a25842d3aba82ead5e06c7fd7cb4896e6ad202. > This is for 6.3 branch (to go with Chromium 63 branch). > > Reason for revert: > > I'm reverting this CL for a few reasons. #2 is the most significant and > I should have thought of that before making a switch. Sorry for that. > > 1) perf-regression: http://crbug.com/769706 > 2) http://crbug.com/612010 : ICU timezone update is not propagated to > zygote process so that new tabs will hold on to an old timezone even > after a timezone change on Linux and Chrome OS. > > 3) http://crbug.com/754053 : OS timezone detection issues on macOS > 10.13, Ubutu 16, RHEL 7, SuSe Linux 12 or newer. ; it's being fixed. So, > it actually ok. > > 4) http://crbug.com/771868 : timezone wrong in gmail: If it's due to > > Revision: 28ef8dc7009d > > BUG= chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 ,v8:6076 > LOG=N > NOTRY=true > NOPRESUBMIT=true > NOTREECHECKS=true > R=adamk@chromium.org, hablich@chromium.org > > Change-Id: Id0093c2bc69e5bc1d3b7147b7bbcc633ed625a45 > Reviewed-on: https://chromium-review.googlesource.com/721919 > Reviewed-by: Adam Klein <adamk@chromium.org> > Commit-Queue: Jungshik Shin <jshin@chromium.org> > Cr-Commit-Position: refs/branch-heads/6.3@{#7} > Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} > Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} TBR=adamk@chromium.org,hablich@chromium.org,jshin@chromium.org Change-Id: I8b30f8f9c63b93cb000facbf910ed111ca3f9ab2 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 , v8:6076 Reviewed-on: https://chromium-review.googlesource.com/723324 Reviewed-by: Michael Hablich <hablich@chromium.org> Commit-Queue: Michael Hablich <hablich@chromium.org> Cr-Commit-Position: refs/branch-heads/6.3@{#18} Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} [modify] https://crrev.com/3b1cfa38bcd616609f263ac3b6721c0214c45d19/src/flag-definitions.h
,
Oct 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/9685d9c25a45f7902fe6250b64ca61abeea1e9f5 commit 9685d9c25a45f7902fe6250b64ca61abeea1e9f5 Author: Jungshik Shin <jshin@chromium.org> Date: Tue Oct 17 20:55:47 2017 Revert "Revert "Merged: Revert "Enable icu-timezone-data by default""" This reverts commit 3b1cfa38bcd616609f263ac3b6721c0214c45d19. Reason for revert: ICU was not rolled in 6.3 branch leading invalid-locale test failure (that was added to test an ICU fix). Now, ICU is rolled in 6.3 branch ( https://chromium-review.googlesource.com/c/v8/v8/+/723564 ). Original change's description: > Revert "Merged: Revert "Enable icu-timezone-data by default"" > > This reverts commit d7343703bc6a3c1dbd5ead201186c520ffc9e47b. > > Reason for revert: broke some branch builders like https://build.chromium.org/p/client.v8.branches/builders/V8%20arm%20-%20sim%20-%20beta%20branch%20-%20debug > > Original change's description: > > Merged: Revert "Enable icu-timezone-data by default" > > > > This reverts commit d9a25842d3aba82ead5e06c7fd7cb4896e6ad202. > > This is for 6.3 branch (to go with Chromium 63 branch). > > > > Reason for revert: > > > > I'm reverting this CL for a few reasons. #2 is the most significant and > > I should have thought of that before making a switch. Sorry for that. > > > > 1) perf-regression: http://crbug.com/769706 > > 2) http://crbug.com/612010 : ICU timezone update is not propagated to > > zygote process so that new tabs will hold on to an old timezone even > > after a timezone change on Linux and Chrome OS. > > > > 3) http://crbug.com/754053 : OS timezone detection issues on macOS > > 10.13, Ubutu 16, RHEL 7, SuSe Linux 12 or newer. ; it's being fixed. So, > > it actually ok. > > > > 4) http://crbug.com/771868 : timezone wrong in gmail: If it's due to > > > > Revision: 28ef8dc7009d > > > > BUG= chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 ,v8:6076 > > LOG=N > > NOTRY=true > > NOPRESUBMIT=true > > NOTREECHECKS=true > > R=adamk@chromium.org, hablich@chromium.org > > > > Change-Id: Id0093c2bc69e5bc1d3b7147b7bbcc633ed625a45 > > Reviewed-on: https://chromium-review.googlesource.com/721919 > > Reviewed-by: Adam Klein <adamk@chromium.org> > > Commit-Queue: Jungshik Shin <jshin@chromium.org> > > Cr-Commit-Position: refs/branch-heads/6.3@{#7} > > Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} > > Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} > > TBR=adamk@chromium.org,hablich@chromium.org,jshin@chromium.org > > Change-Id: I8b30f8f9c63b93cb000facbf910ed111ca3f9ab2 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 , v8:6076 > Reviewed-on: https://chromium-review.googlesource.com/723324 > Reviewed-by: Michael Hablich <hablich@chromium.org> > Commit-Queue: Michael Hablich <hablich@chromium.org> > Cr-Commit-Position: refs/branch-heads/6.3@{#18} > Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} > Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} TBR=adamk@chromium.org,hablich@chromium.org,jshin@chromium.org Change-Id: I8f712f1e6eb1f14c703ffe9f1d63d23b4b4bb08e No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:612010 , chromium:769706 , chromium:771868 , v8:2137 , v8:6031 , v8:6076 Reviewed-on: https://chromium-review.googlesource.com/723962 Reviewed-by: Michael Hablich <hablich@chromium.org> Reviewed-by: Adam Klein <adamk@chromium.org> Commit-Queue: Jungshik Shin <jshin@chromium.org> Cr-Commit-Position: refs/branch-heads/6.3@{#21} Cr-Branched-From: 094a7c93dcdcd921de3883ba4674b7e1a0feffbe-refs/heads/6.3.292@{#1} Cr-Branched-From: 18b8fbb528a8021e04a029e06eafee50b918bce0-refs/heads/master@{#48432} [modify] https://crrev.com/9685d9c25a45f7902fe6250b64ca61abeea1e9f5/src/flag-definitions.h
,
Oct 20 2017
This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible! If all merges have been completed, please remove any remaining Merge-Approved labels from this issue. Thanks for your time! To disable nags, add the Disable-Nags label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Nov 10 2017
note to self: I had a fresh look at this issue. One promising place we can pass the Olson timezone id at the time fork (instead of at the time of the zygote process creation) is (not surprisingly) ZygoteCommunication:;ForkRequest ( https://cs.chromium.org/chromium/src/content/browser/zygote_host/zygote_communication_linux.cc?rcl=ea59ac93019e22b05026167b2b58265d9e7fca51&l=87 ). The receiving end is https://cs.chromium.org/chromium/src/content/zygote/zygote_linux.cc?rcl=b297d7f211af679da382b691cd0ebe286c0a7c65&l=270 . This is not ideal because tzid is sent down and set in a new render process even when there's no timezone change, but should work.
,
Nov 10 2017
An alternative is to use ZygoteHandle (ZygoteCommunication) via ZygoteHostImpl to send a tz update msg from TimezoneMonitor. This has an advantage of being run only on a timezone change. Hmm... TimezoneMonitor is now in service/devices and does not depend on content/ . OTOH, one advantage of the approach in comment 14 is that it can respect TZ environment variable (as used by some embedders / headless Blink). Adding +dats@ for that.
,
Nov 10 2017
WIth a CL at https://chromium-review.googlesource.com/c/chromium/src/+/764036, the following works: * Launch chrome * Go to http://jungshik.github.io/cr/bugs/520783.html * Change the tz to a zone different from the current zone $ sudo timedatectl set-timezone Asia/Seoul * Press 'recheck' button in the page above to check a tz change is reflected. THis part already works without the CL above. * Make a new tab and go to http://jungshik.github.io/cr/bugs/520783.html * Check the timezone and the zone offset. They should be for a new timezone. This part did not work before. The CL above fixes it.
,
Nov 10 2017
$ sudo timedatectl set-timezone Asia/Seoul The above is for Ubuntu. On other Linux distros, changing a symlink target of /etc/localtime to a zonefile in /usr/share/timezone/ works, too. On CrOS, settings can be used to change the timezone to test.
,
Nov 11 2017
http://jungshik.github.io/cr/bugs/520783.html : Only lines 4 and 8 are relevant to this bug. Lines 1 and 2 are not unless icu-timezone-data is passed to v8 via --js-flags cmdline flag or bug v8:6031 is resolved (icu-timezone-data becomes enabled by default).
,
Nov 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ecc9a74e8a6642d68f20ced81bc515e7e32fc38d commit ecc9a74e8a6642d68f20ced81bc515e7e32fc38d Author: Jungshik Shin <jshin@chromium.org> Date: Tue Nov 14 07:25:06 2017 Pass the current timezone id to Zygote on fork On a timezone change, existing renderer processes are notified of the change, but the zygote process is not notified, which leads a new tab on Linux to hold on to the old timezone after a timezone change. To fix that, this CL passes the current timezone id (Olson) to the zygote process and lets it reset the ICU timezone before forking. Bug: 612010 Test: See comment 16 in the bug Change-Id: I0962e3d8c29ad5494fc3f9cd4f9d1d62588b7003 Reviewed-on: https://chromium-review.googlesource.com/764036 Commit-Queue: Jungshik Shin <jshin@chromium.org> Reviewed-by: Julien Tinnes <jln@chromium.org> Reviewed-by: Mark Mentovai <mark@chromium.org> Cr-Commit-Position: refs/heads/master@{#516222} [modify] https://crrev.com/ecc9a74e8a6642d68f20ced81bc515e7e32fc38d/content/browser/zygote_host/zygote_communication_linux.cc [modify] https://crrev.com/ecc9a74e8a6642d68f20ced81bc515e7e32fc38d/content/zygote/zygote_linux.cc
,
Nov 14 2017
,
Nov 15 2017
Tested the issue using #64.0.3269.0 on Linux Ubuntu 14.04 as per the steps mentioned in comment #0. Observed the Timezone is changing accrodingly. Note: Issue is still obserevd in #64.0.3265.0/10129.0.0 canary-channel kip. Please find the screencast for the same. Hence adding Verified labels for Linux. Thanks!!
,
Nov 17 2017
Thanks for verifying the fix.
,
Dec 12 2017
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by js...@chromium.org
, May 19 2016