aspect-cli icon indicating copy to clipboard operation
aspect-cli copied to clipboard

[Bug]: Plugin crash could be easier to diagnose

Open alexeagle opened this issue 3 years ago • 0 comments

What happened?

When the plugin crashes, the CLI just gets a gRPC hangup like

FAILED: Build did NOT complete successfully (2 packages loaded, 6 targets conf\
igured)
Error: failed to run build command: rpc error: code = Unavailable desc = error reading from server: EOF
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
Error: failed to run build command: rpc error: code = Unavailable desc = connection error: desc = "transport: error while dialing: dial unix /var/folders/8n/7cfngjb106sgwb8mr1tytx700000gn/T/plugin3667726817: connect: connection refused"
2022/11/21 11:58:26 [ERR] plugin: plugin acceptAndServe error: broker closed

then the CLI is hung and you have to hard-terminate it - it doesn't even respond to SIGTERM (ctrl-c)

To diagnose the crash, the user should increase logging of the plugin, but this crash doesn't help me know that.

Version

latest

How to reproduce

Make a plugin panic in a postbuildhook

Any other information?

No response

Fund our work

  • [ ] Sponsor our open source work by donating a bug bounty

alexeagle avatar Nov 21 '22 19:11 alexeagle