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

deps: backport 8d00c2c from v8 upstream #5024

Closed
wants to merge 1 commit into from

Conversation

gibfahn
Copy link
Member

@gibfahn gibfahn commented Feb 1, 2016

Original commit message:

Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}

This commit fixes an occasional crash on shutdown when the profiler is still enabled. This seems like a good candidate for backporting as the fix is very straightforward, and it otherwise won't get into Node for quite a while.

This crash affects the appmetrics npm module. Appmetrics Issue 44

I'm not 100% sure whether I got the process right, if anything looks wrong then let me know.

@bnoordhuis
Copy link
Member

LGTM but can you sign the commit with your real name?

CI: https://ci.nodejs.org/job/node-test-pull-request/1469/ (currently private)

@bnoordhuis bnoordhuis added v8 engine Issues and PRs related to the V8 dependency. lts-watch-v4.x labels Feb 1, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Feb 1, 2016

LGTM

Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{nodejs#32953}
```
@targos
Copy link
Member

targos commented Feb 1, 2016

LGTM

@gibfahn
Copy link
Member Author

gibfahn commented Feb 1, 2016

@bnoordhuis Sorry about that, I've amended user.name on my fork, so I think the PR should update automatically. Is there anything else I should do to get it into Node 4? I noticed that you marked it as lts-watch-v4.x.

bnoordhuis pushed a commit that referenced this pull request Feb 1, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}
```

PR-URL: #5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@bnoordhuis
Copy link
Member

Thanks Gibson, CI is green. Landed in d5d301f, it'll be in the next v4.x release.

@bnoordhuis bnoordhuis closed this Feb 1, 2016
rvagg pushed a commit that referenced this pull request Feb 8, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}
```

PR-URL: #5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}
```

PR-URL: #5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 18, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}
```

PR-URL: #5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Feb 18, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{#32953}
```

PR-URL: #5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Original commit message:

```
Stop profiler on isolate teardown if still running

If the profiler is started via the API and not stopped, V8 will
 intermittently crash during isolate teardown.

The fix is to run the DeleteAllProfiles function in Isolate::Deinit()
 if cpu_profiler_ still exists.

https://groups.google.com/forum/#!topic/v8-dev/WsIlpbaD4mo

TEST= Run in debug mode, if you start a profile and don't stop it,
 this assert should fail:

   Fatal error in ../src/profiler/cpu-profiler.cc, line 414
   Check failed: !is_profiling_.

Review URL: https://codereview.chromium.org/1526253005

Cr-Commit-Position: refs/heads/master@{nodejs#32953}
```

PR-URL: nodejs#5024
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@gibfahn gibfahn deleted the node-v8-backport branch December 16, 2016 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants