bugsnag / bugsnag-go

Automatic panic monitoring for Go and Go web frameworks, like negroni, gin, and revel
https://docs.bugsnag.com/platforms/go
MIT License
204 stars 69 forks source link

panicwrap breaks Windows Service applications #177

Closed iamacarpet closed 3 years ago

iamacarpet commented 3 years ago

Describe the bug

panicwrap's process forking, which appears to happen using an init() function, is causing Windows Service applications to fail to start.

This is because they check for the parent process executable name == "services.exe"

Steps to reproduce

  1. Start with the windows service example.
  2. Add in bugsnag
  3. Build & drop onto a Windows box
  4. Run with "install" then "start" on the CLI and see the service fails to start.

Environment

mattdyoung commented 3 years ago

Hi @iamacarpet

Are you using v2.x of bugsnag-go? If you are using v1.x, there is an upgrade guide and revised documentation: https://docs.bugsnag.com/platforms/go/

In v2.x you can generally use panic-monitor to report unhandled panics, which doesn't fork the process: https://docs.bugsnag.com/platforms/go/other/#reporting-unhandled-panics

mattdyoung commented 3 years ago

Closing this for now but if this doesn't solve your issue then please provide further details and we can look into this further.