Skip to content

src: add error message if we abort - #8634

Closed
fhinkel wants to merge 1 commit into
nodejs:masterfrom
fhinkel:i8555
Closed

src: add error message if we abort#8634
fhinkel wants to merge 1 commit into
nodejs:masterfrom
fhinkel:i8555

Conversation

@fhinkel

@fhinkelfhinkel commented Sep 17, 2016

Copy link
Copy Markdown
Member
Checklist
  • make -j4 test (UNIX) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

vm, watchdog

Description of change

Add an error message if we abort because uv_init_loop fails.

Fixes#8555

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 17, 2016
@fhinkelfhinkel changed the title src: better error message on uv_loop_init failureWatchdog: add error message if we abortSep 17, 2016
Comment threadsrc/node_watchdog.cc Outdated

@targostargosSep 17, 2016

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: I think indentation should be 2 spaces here

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it! I keep forgetting that ESlint doesn't complain about C++ formatting. Does anybody want to share their vimrc with me for correct auto formatting?

Comment threadsrc/node_watchdog.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: align with previous argument ?

Comment threadsrc/node_watchdog.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation looks off here.

Comment threadsrc/node_watchdog.cc Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the second part of this error message. If we can't say with certainty what the problem is, I don't think we should leave questions like this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could then check if the file limit was actually reached?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to make the message more helpful than just saying that the call failed. But I'm also OK with deleting the second part.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it say "initialize uv loop"? To give more context?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could then check if the file limit was actually reached?

That would be pretty nice. I’m not sure whether that’s feasible to do in a cross-platform way, but for POSIXes it probably would work.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think @addaleax is right that it may be difficult to do x-platform reliably. The message could be extended a bit with something like, Failed to initialize loop. This may be caused, for instance, by reaching the file limit.

Comment threadsrc/node_watchdog.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry to bother you, but indentation is still off by 1.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, my fault for being sloppy.

@fhinkel
fhinkelforce-pushed the i8555 branch 2 times, most recently from 892de33 to 7fe7b13CompareSeptember 17, 2016 17:32
@addaleaxaddaleax added the vm Issues and PRs related to the vm subsystem. label Sep 17, 2016
@imyller

Copy link
Copy Markdown
Member

@cjihrigcjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM pending CI

@imyllerimyller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imyller

Copy link
Copy Markdown
Member

Oh, @thealphanerd do you feel citgm should be run before landing this?

@addaleaxaddaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but the commit message should start with vm: or maybe src:?

(I don’t think CITGM is really necessary here, but if somebody wants to run it, sure)

Comment threadsrc/node_watchdog.cc Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line can be dropped.

Add an error message in watchdog if we abort because uv_loop_init fails.
Fixesnodejs#8555
@fhinkel

fhinkel commented Sep 20, 2016

Copy link
Copy Markdown
MemberAuthor

I fixed the formatting, error message, extra CHECK, and commit message.

CI again: https://ci.nodejs.org/view/All/job/node-test-pull-request/4146/

@fhinkelfhinkel changed the title Watchdog: add error message if we abortsrc: add error message if we abortSep 20, 2016
@jasnell

Copy link
Copy Markdown
Member

I don't believe it needs to be but should this be semver-major?

@cjihrig

Copy link
Copy Markdown
Contributor

I don't think this should be semver major since it's an abort. I'd go with patch.

@jasnelljasnell left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@imyller

Copy link
Copy Markdown
Member

@imyller

Copy link
Copy Markdown
Member

I'll start landing this:

  • Four LGTMs
  • No objections
  • Requested modifications have been made
  • CI tests passed (only known CI failures; unrelated to this PR)

imyller pushed a commit to imyller/node that referenced this pull request Sep 23, 2016
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: nodejs#8634Fixes: nodejs#8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@imyller

Copy link
Copy Markdown
Member

landed in fba5319

Thank you, @fhinkel

@imyllerimyller closed this Sep 23, 2016
@imyllerimyller removed their assignment Sep 23, 2016
jasnell pushed a commit that referenced this pull request Sep 29, 2016
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: #8634Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

@fhinkel do you think this should be backported?

Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: #8634Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins

Copy link
Copy Markdown
Contributor

ping @fhemberger

@fhemberger

Copy link
Copy Markdown
Contributor

I guess you wanted to ping @fhinkel. 😄

@MylesBorins

Copy link
Copy Markdown
Contributor

ping @fhinkel

@fhinkel

Copy link
Copy Markdown
MemberAuthor

If it lands cleanly, yes.

MylesBorins pushed a commit that referenced this pull request Jan 23, 2017
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: #8634Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
MylesBorins pushed a commit that referenced this pull request Jan 24, 2017
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: #8634Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Jan 24, 2017
MylesBorins pushed a commit that referenced this pull request Feb 1, 2017
Add an error message in watchdog if we abort because uv_loop_init fails.
PR-URL: #8634Fixes: #8555
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++Issues and PRs that require attention from people who are familiar with C++.vmIssues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vm: node crashes if timeout is set and nofile limit is reached

10 participants

@fhinkel@imyller@jasnell@cjihrig@MylesBorins@fhemberger@addaleax@Fishrock123@targos@nodejs-github-bot