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

Backtraces in errors #296

Closed
scsmithr opened this issue Nov 15, 2022 · 4 comments
Closed

Backtraces in errors #296

scsmithr opened this issue Nov 15, 2022 · 4 comments
Labels
chore ⚙️ DX, infra etc that's not build or CI related declined ➖ Declined represents an issue was closed because it was declined

Comments

@scsmithr
Copy link
Member

scsmithr commented Nov 15, 2022

Not having backtraces is insanely frustrating.

Two options:

  • Figure out how to make thiserror capture backtraces.
  • Switch to a crate that supports capturing backtraces.

Should start with a minimal example to ensure backtraces are actually be captured.

@RustomMS
Copy link
Contributor

RustomMS commented Nov 15, 2022

This rust playground is using the thiserror example for backtrace to show how it is produced. Still requires nightly along with two features

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8b753fb257c3ea36e5a8b3fef5f363e0

#![feature(provide_any)]
#![feature(error_generic_member_access)]

rust-lang/rust#96024
rust-lang/rust#99301

@RustomMS RustomMS self-assigned this Nov 15, 2022
@RustomMS
Copy link
Contributor

RustomMS commented Nov 16, 2022

https://mmapped.blog/posts/12-rust-error-handling.html
https://github.com/influxdata/influxdb_iox/blob/d84f05b2f5eca6a3f95fb7a21f7fe48046231d88/docs/style_guide.md

The above seem to suggest a different approach than what we were taking. I am going to prototype this in PersistenceError

Draft in https://github.com/GlareDB/glaredb/blob/125ebf20d75e4dbfe7a82b1fa92da99298459d54/crates/persistence/src/errors.rs

Though I couldn't get the actual backtrace to print within the crate.

@RustomMS RustomMS linked a pull request Nov 16, 2022 that will close this issue
@scsmithr scsmithr added chore ⚙️ DX, infra etc that's not build or CI related and removed enhancement labels Nov 20, 2022
@scsmithr
Copy link
Member Author

scsmithr commented Dec 5, 2022

In the meantime, do more logging, instrument functions.

@RustomMS RustomMS removed their assignment Dec 12, 2022
@greyscaled greyscaled added good first issue 🆕 Good issues for newcomers or new hires brain break 🧠 Quality of life and removed good first issue 🆕 Good issues for newcomers or new hires brain break 🧠 Quality of life labels Dec 12, 2022
@scsmithr scsmithr added the declined ➖ Declined represents an issue was closed because it was declined label Jan 3, 2023
@scsmithr
Copy link
Member Author

scsmithr commented Jan 3, 2023

2023-01-03T15:40:11.071990Z DEBUG  glaredb-thread-6 ThreadId(08) glaredb_connection{conn_id=a82225e3-058a-46d5-904f-3e18f27cb73c}: glaredb::server: crates/glaredb/src/server.rs:108: client disconnected with error e=Invalid argument error: column types must match schema types, expected Float32 but found Float64 at column index 10 client_addr=127.0.0.1:64426
2023-01-03T15:40:11.103548Z DEBUG  glaredb-thread-6 ThreadId(08) glaredb_connection{conn_id=a82225e3-058a-46d5-904f-3e18f27cb73c}:pg_protocol_message{name="query"}:Connection{peer=Client}: h2::codec::framed_write: /Users/sean/.cargo/registry/src/github.com-1ecc6299db9ec823/h2-0.3.15/src/codec/framed_write.rs:232: send frame=GoAway { error_code: NO_ERROR, last_stream_id: StreamId(0) }

Closing because we have spans per connection and protocol message.

@scsmithr scsmithr closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore ⚙️ DX, infra etc that's not build or CI related declined ➖ Declined represents an issue was closed because it was declined
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants