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

Crash instead of error message #85

Open
davidak opened this issue Dec 4, 2022 · 0 comments
Open

Crash instead of error message #85

davidak opened this issue Dec 4, 2022 · 0 comments

Comments

@davidak
Copy link
Contributor

davidak commented Dec 4, 2022

Trustix crash a lot, in any situation where it can't work. Wrong configuration, unreachable socket, wrong file permission -> CRASH!

Please create software that does not crash and show a useful error message instead.

Some examples:

Here trustix crash because of your certificate:

...
Dec 03 11:23:30 gaming trustix[8856]: time="2022-12-03T11:23:30+01:00" level=error msg="Error while getting logs from 'https://demo.trustix.dev': unavailable: x509: certificate is valid for r13y.trustix.dev, not demo.trustix.dev"
Dec 03 11:23:30 gaming trustix[8856]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 03 11:23:30 gaming trustix[8856]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa6f5d7]
Dec 03 11:23:30 gaming trustix[8856]: goroutine 23 [running]:
Dec 03 11:23:30 gaming trustix[8856]: github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial.func1()
Dec 03 11:23:30 gaming trustix[8856]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:225 +0x157
Dec 03 11:23:30 gaming trustix[8856]: created by github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial
Dec 03 11:23:30 gaming trustix[8856]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:218 +0xf8
Dec 03 11:23:30 gaming systemd[1]: trustix.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 03 11:23:30 gaming systemd[1]: trustix.service: Failed with result 'exit-code'.

I got the domain from https://nix-community.github.io/trustix/howto-nix/subscribing.html#configuring.

It does also not work with http:

Dec 03 11:46:03 gaming trustix[27556]: time="2022-12-03T11:46:03+01:00" level=error msg="Error while getting logs from 'http://demo.trustix.dev': unimplemented: 404 Not Found"
Dec 03 11:46:03 gaming trustix[27556]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 03 11:46:03 gaming trustix[27556]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa6f5d7]
Dec 03 11:46:03 gaming trustix[27556]: goroutine 13 [running]:
Dec 03 11:46:03 gaming trustix[27556]: github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial.func1()
Dec 03 11:46:03 gaming trustix[27556]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:225 +0x157
Dec 03 11:46:03 gaming trustix[27556]: created by github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial
Dec 03 11:46:03 gaming trustix[27556]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:218 +0xf8
Dec 03 11:46:03 gaming systemd[1]: trustix.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 03 11:46:03 gaming systemd[1]: trustix.service: Failed with result 'exit-code'.

But the other domain does also not work:

...
Dec 03 11:30:11 gaming trustix[12976]: time="2022-12-03T11:30:11+01:00" level=error msg="Error while getting logs from 'https://r13y.trustix.dev': unknown: 405 Method Not Allowed"
Dec 03 11:30:11 gaming trustix[12976]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 03 11:30:11 gaming trustix[12976]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa6f5d7]
Dec 03 11:30:11 gaming trustix[12976]: goroutine 23 [running]:
Dec 03 11:30:11 gaming trustix[12976]: github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial.func1()
Dec 03 11:30:11 gaming trustix[12976]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:225 +0x157
Dec 03 11:30:11 gaming trustix[12976]: created by github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial
Dec 03 11:30:11 gaming trustix[12976]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:218 +0xf8
Dec 03 11:30:11 gaming systemd[1]: trustix.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 03 11:30:11 gaming systemd[1]: trustix.service: Failed with result 'exit-code'.

When i configure "unix:///run/trustix-daemon.socket" as remote, trustix also crashes, because it does not exist before it is started. I guess it also does not make sense.

Dec 03 11:38:40 gaming trustix[23369]: time="2022-12-03T11:38:40+01:00" level=error msg="Error while getting logs from 'unix:///run/trustix-daemon.socket': unavailable: dial unix /run/trustix-daemon.sock: connect: no such file or directory"
Dec 03 11:38:40 gaming trustix[23369]: panic: runtime error: invalid memory address or nil pointer dereference
Dec 03 11:38:40 gaming trustix[23369]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0xa6f5d7]
Dec 03 11:38:40 gaming trustix[23369]: goroutine 7 [running]:
Dec 03 11:38:40 gaming trustix[23369]: github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial.func1()
Dec 03 11:38:40 gaming trustix[23369]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:225 +0x157
Dec 03 11:38:40 gaming trustix[23369]: created by github.com/nix-community/trustix/packages/trustix/internal/pool.(*ClientPool).Dial
Dec 03 11:38:40 gaming trustix[23369]:         github.com/nix-community/trustix/packages/trustix/internal/pool/pool.go:218 +0xf8
Dec 03 11:38:40 gaming systemd[1]: trustix.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Dec 03 11:38:40 gaming systemd[1]: trustix.service: Failed with result 'exit-code'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant