[go: up one dir, main page]

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

SIGABRT when using @google-cloud/resource-manager, with trace events, and doing a process.exit(0) #4384

Open
Stono opened this issue Jun 29, 2023 · 1 comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@Stono
Copy link
Stono commented Jun 29, 2023

Environment details

  • which product (packages/*): @google-cloud/resource-manager
  • OS: macosx
  • Node.js version: v18.14.2
  • npm version: 8
  • google-cloud-node version: 4.3.0

Steps to reproduce

If you use the google-cloud/resource-manager and then also implement shutdown hooks within your application that gracefully stop things like a webserver, before doing a process.exit(0); then you end up with a SIGABRT:

❯ NODE_OPTIONS="--trace-events-enabled --trace-event-categories v8" node test.js
hi
hi
hi
hi
hi
^C[1]    55453 abort      NODE_OPTIONS="--trace-events-enabled --trace-event-categories v8" node test.j

This code reproduces the issue:

const Crm = require('@google-cloud/resource-manager')
const client = new Crm.ProjectsClient()

const interval = setInterval(() => {
  console.log('hi')
}, 500)

const shutdown = () => {
  process.exit(0)
}
process.on('SIGINT', shutdown)
process.on('SIGTERM', shutdown)
@Stono
Copy link
Author
Stono commented Jun 29, 2023

I've also raised nodejs/node#48598; which could be related

@sofisl sofisl added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants
@Stono @sofisl and others