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

test: detect all types of aborts in windows #12856

Closed

Conversation

gireeshpunathil
Copy link
Member

On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3

For background, please refer to #12823

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label May 5, 2017
@addaleax
Copy link
Member

addaleax commented May 5, 2017

It looks like this already needs a rebase 😄

@gireeshpunathil
Copy link
Member Author

@addaleax - I don't know what would have caused this (branch conflict), and how to resolve it. Any pointers please?

@addaleax
Copy link
Member

addaleax commented May 5, 2017

git fetch upstream (or whatever your remote that points to nodejs/node is called) and then git rebase upstream/master, fix whatever conflicts come up … let me know if that’s unclear, git is always tricky :)

On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3
@gireeshpunathil
Copy link
Member Author

@addaleax - thanks! I guess I did it right.

@refack
Copy link
Contributor

refack commented May 8, 2017

@gireeshpunathil could you write a few words about how come tests haven't been failing? And do we need a test that aborts with code 3?

@gireeshpunathil
Copy link
Member Author

@refack -

  if (exports.isWindows) {
     expectedExitCodes = [3221225477];
+    console.log('XXX');
+    console.trace();
  }

With this change I ran the entire unit tests (python tools\test.py --mode=release) and it hit only once - the new test case I added (parallel/test-http-parser-consume).

Looks like we never have a test case which aborts in Windows either through JS process.abort(), or through C++ Assert(FALSE), or through --abort-on-uncaught-exception

If you propose I can add one.

@refack
Copy link
Contributor

refack commented May 8, 2017

@gireeshpunathil thank you. IMHO adding a test would be great.

@jasnell
Copy link
Member

jasnell commented May 9, 2017

@addaleax addaleax added the windows Issues and PRs related to the Windows platform. label May 10, 2017
@addaleax
Copy link
Member

Lande in 6914aea

@addaleax addaleax closed this May 10, 2017
addaleax pushed a commit that referenced this pull request May 10, 2017
On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3

PR-URL: #12856
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
@gireeshpunathil
Copy link
Member Author

thanks all!

@refack
Copy link
Contributor

refack commented May 11, 2017

thanks all!

No, thank you 🥇

@gibfahn
Copy link
Member

gibfahn commented May 12, 2017

There seems to be a 6.10 branch in node now, which has 6914aea as the latest commit. Is this an accident (I guess maybe @addaleax, idk)?

@arturgvieira-zz
Copy link

arturgvieira-zz commented May 12, 2017

I was having Git tech difficulties the other day. It was after my first PR got merged I believe.

@addaleax
Copy link
Member

@gibfahn That wasn’t me, I just saw the ref in a git fetch upstream as a new branch myself. But anyway, I’ve deleted it now, it shouldn’t be there (maybe somebody who keeps IRC open knows why this happened?)

how could I have made a mistake without access rights I don't know

@arturgvieira You couldn’t, this is definitely not something you have caused. :) It’s not a big deal anyway.

@arturgvieira-zz
Copy link

@addaleax I see, thanks, I feel much better

@refack
Copy link
Contributor

refack commented May 12, 2017

two days ago (EDT time)
[19:15] -nodejs-gh:#node-dev- [node] eugeneo created 6.10 from master (+0 new commits): https://git.io/v9MrZ

anchnk pushed a commit to anchnk/node that referenced this pull request May 19, 2017
On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3

PR-URL: nodejs#12856
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
@jasnell jasnell mentioned this pull request May 28, 2017
@gibfahn gibfahn mentioned this pull request Jun 15, 2017
3 tasks
gibfahn pushed a commit that referenced this pull request Jun 20, 2017
On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3

PR-URL: #12856
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jul 11, 2017
On Windows, 'aborts' are of 2 types, depending on the context:
(i) Forced access violation, if --abort-on-uncaught-exception is on
which corresponds to exit code 3221225477 (0xC0000005)
(ii) raise(SIGABRT) or abort(), which lands up in CRT library calls
which corresponds to exit code 3

PR-URL: #12856
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Sakthipriyan Vairamani <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Jul 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants