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

"Can't parse" error #219

Closed
magnusmanske opened this issue Dec 22, 2022 · 14 comments
Closed

"Can't parse" error #219

magnusmanske opened this issue Dec 22, 2022 · 14 comments

Comments

@magnusmanske
Copy link

Did a cargo update, now my pool get_conn throws these errors:

Io(Custom { kind: UnexpectedEof, error: "can't parse: buf doesn't have enough data" })

Reverted to the previous Cargo.toml, works fine. Not sure if it's mysql_async or a dependent package, but I can't debug it more fine-grained at the moment.

@magnusmanske
Copy link
Author

Here is the commit that broke things: magnusmanske/mixnmatch_rs@b0115ef

@magnusmanske
Copy link
Author

@blackbeam
Copy link
Owner

@magnusmanske, hi.

Did a cargo update, now my pool get_conn throws these errors

Could you please inspect Cargo.lock and give me old and new versions of updated mysql_* packages?

Here is the commit that broke things: magnusmanske/mixnmatch_rs@b0115ef

You meant that things goes OK if cargo update is performed but this commit is reverted?
Is it broken if Cargo.toml is reverted to the previous version an the commit is applyed?

@magnusmanske
Copy link
Author

Yes, so

name = "mysql_common"
version = "0.29.1"
version = "0.29.2"

breaks things. Again, not sure this specific package is the root cause.

@magnusmanske
Copy link
Author

0.29.1 works, 0.29.2 does not

@blackbeam
Copy link
Owner

Oh, forgot to ask your MySql version.

@magnusmanske
Copy link
Author

10.1.39-MariaDB

@blackbeam
Copy link
Owner

@magnusmanske, could you please patch your Cargo.toml and reproduce this?
I'm interested in the updated error message.

[patch.crates-io]
regex = { git = "https://github.com/blackbeam/rust_mysql_common.git", branch = "de-error" }

@magnusmanske
Copy link
Author

Am I doing something wrong?

> cargo update
    Updating git repository `https://github.com/blackbeam/rust_mysql_common.git`
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`

Caused by:
  patch for `regex` in `https://github.com/rust-lang/crates.io-index` failed to resolve

Caused by:
  The patch location `https://github.com/blackbeam/rust_mysql_common.git?branch=de-error` does not appear to contain any packages matching the name `regex`.

@blackbeam
Copy link
Owner

Oh, sorry. Copy-paste error.

[patch.crates-io]
mysql_common = { git = "https://github.com/blackbeam/rust_mysql_common.git", branch = "de-error" }

@magnusmanske
Copy link
Author

I get a warning but it runs:

warning: Patch `mysql_common v0.29.2 (https://github.com/blackbeam/rust_mysql_common.git?branch=de-error#bf1ba6df)` was not used in the crate graph.
Check that the patched package version and available features are compatible
with the dependency requirements. If the patch has a different version from
what is locked in the Cargo.lock file, run `cargo update` to use the new
version. This may also occur with an optional dependency that is not enabled.

Seems to work with that patch...

@blackbeam
Copy link
Owner

Seems like it suggests to run cargo update to apply the patch. I believe for now it works on mysql_common v0.29.1 from crates.io.

@blackbeam
Copy link
Owner

Sorry for bothering you, but I couldn't reproduce this myself – tried on MariaDb 10.1.39 with two pools connected to two distinct db instances in multi-threaded tokio runtime – no luck.

@magnusmanske
Copy link
Author

Update: I have run cargo update again today, now it seems to work. Maybe some odd incompatibility with another create. Anyway, seems to work now, thanks!

facebook-github-bot pushed a commit to facebookexperimental/rust-shed that referenced this issue Dec 2, 2023
Summary:
D50506429 upgraded mysql_async to v0.30. With that version of the crate, the asic license_monitor stopped working with the following error:

```
fbcode/asic/license/monitor/xdb/lib.rs:212] failed to update features: failed to update features for vendor synopsys
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: Caused by:
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 0: failed to delete existing features
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 1: failed to get MySQL connection
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 2: failed to get MySQL connection
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 3: Input/output error: Input/output error: can't parse: buf doesn't have enough data
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 4: Input/output error: can't parse: buf doesn't have enough data
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 5: can't parse: buf doesn't have enough data
```

Unfortunately, the change logs and issue tracker on github are not clear. [mysql_async v0.31.2](https://github.com/blackbeam/mysql_async/releases/tag/v0.31.2) addressed this [issue](blackbeam/mysql_async#219) despite what the comments say. Both that issue and the release refer to a  conversation on [glitter](https://matrix.to/#/!rVBiivVGEBsRPFFerK:gitter.im/$CkNiRgwTwUthqxdYM5khT12BJ3pLxfSZC0CCfbMANQo?via=gitter.im&via=matrix.org). Putting the pieces together, this issue was addressed by that release.

I tested the license_monitor with mysql_async v0.31.2 and the issue went away.

Reviewed By: boalinlai

Differential Revision: D51636756

fbshipit-source-id: 5eef00637a6ff1b573e4cf2aa1b7324db0262a63
facebook-github-bot pushed a commit to facebook/sapling that referenced this issue Dec 2, 2023
Summary:
D50506429 upgraded mysql_async to v0.30. With that version of the crate, the asic license_monitor stopped working with the following error:

```
fbcode/asic/license/monitor/xdb/lib.rs:212] failed to update features: failed to update features for vendor synopsys
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: Caused by:
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 0: failed to delete existing features
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 1: failed to get MySQL connection
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 2: failed to get MySQL connection
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 3: Input/output error: Input/output error: can't parse: buf doesn't have enough data
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 4: Input/output error: can't parse: buf doesn't have enough data
Nov 28 11:10:08 ash-edalic-arvr-snps01.thefacebook.com license_monitor[2041048]: 5: can't parse: buf doesn't have enough data
```

Unfortunately, the change logs and issue tracker on github are not clear. [mysql_async v0.31.2](https://github.com/blackbeam/mysql_async/releases/tag/v0.31.2) addressed this [issue](blackbeam/mysql_async#219) despite what the comments say. Both that issue and the release refer to a  conversation on [glitter](https://matrix.to/#/!rVBiivVGEBsRPFFerK:gitter.im/$CkNiRgwTwUthqxdYM5khT12BJ3pLxfSZC0CCfbMANQo?via=gitter.im&via=matrix.org). Putting the pieces together, this issue was addressed by that release.

I tested the license_monitor with mysql_async v0.31.2 and the issue went away.

Reviewed By: boalinlai

Differential Revision: D51636756

fbshipit-source-id: 5eef00637a6ff1b573e4cf2aa1b7324db0262a63
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

2 participants