You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just updated the provided linux binary (sqlpage github repository) from v0.32.1 to v0.33.0 and since then I can't run sqlpage anymore as it breaks with following error message:
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.18/src/lib.rs:418:13:
assertion `left == right` failed
This is on a really restricted linux system with heavily reduced access to the system environment and quite low memory/cpu resources (basically it's managed hosting with ssh access as a goodie). I wouldn't have posted a bug if it didn't work before as my expectancy for this to work there was originally quite low. To my surprise, it worked a lot better than expected, at least enough to experiment. For production, I'd use a different system with more resources and fewer restrictions. :)
Do you have an idea how we could reproduce this restricted environment locally ? That would help ! stacker is a popular crate in the rust ecosystem, with 17M downloads, so the issue probably affects much more than just sqlpage. Even on a restricted environment, crashing with a cryptic error message is not a desirable behavior.
Unfortunately, I don't know how to emulate this specific environment and I'm not really linux savvy. The hoster is netcup and the plan is Webhosting 2000 (https://www.netcup.com/en/hosting).
Unfortunately, the fixed binary you posted doesn't work because it doesn't seem to be statically linked to glibc:
./sqlpage.bin: /lib/libc.so.6: version `GLIBC_2.34' not found (required by ./sqlpage.bin)
Ok, the ENOENT (2) error code and your message put me on the right path, I can reproduce it now !
❯ sudo mount -t tmpfs none /proc
❯ ./sqlpage.bin
thread 'main' panicked at /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/stacker-0.1.18/src/lib.rs:418:13:
assertion `left == right` failed
left: 2
right: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted (core dumped)
In the same environment, sqlpage without the stacker dependency works fine. I reported the issue to stacker, so that they can hopefully fix it: rust-lang/stacker#115
In the meantime, you can use the following statically linked binary: sqlpage.bin.gz
Activity
lovasoa commentedon Feb 18, 2025
That's bad ! I cannot reproduce it. Can you run with
RUST_BACKTRACE=1and paste the backtrace here ?Disable stack growing in sqlparser
beingalink commentedon Feb 18, 2025
Output of
RUST_BACKTRACE=fullasRUST_BACKTRACE=1didn't contain any information:lovasoa commentedon Feb 18, 2025
It does contain the actual value returned by
pthread_attr_getstack: https://github.com/rust-lang/stacker/blob/04d334ca6ad8ef942fef80e173c6e34bbb905a6a/src/lib.rs#L418C30-L418C51A return value of 2 (ENOENT) is strange and really unexpected.
In the meantime, here is a build without the bug inducing dependency: sqlpage.bin.gz. Can you confirm it fixes the issue for you ?
But I'd like to get to the bottom of this.
beingalink commentedon Feb 18, 2025
This is on a really restricted linux system with heavily reduced access to the system environment and quite low memory/cpu resources (basically it's managed hosting with ssh access as a goodie). I wouldn't have posted a bug if it didn't work before as my expectancy for this to work there was originally quite low. To my surprise, it worked a lot better than expected, at least enough to experiment. For production, I'd use a different system with more resources and fewer restrictions. :)
lovasoa commentedon Feb 18, 2025
Do you have an idea how we could reproduce this restricted environment locally ? That would help ! stacker is a popular crate in the rust ecosystem, with 17M downloads, so the issue probably affects much more than just sqlpage. Even on a restricted environment, crashing with a cryptic error message is not a desirable behavior.
beingalink commentedon Feb 18, 2025
Unfortunately, I don't know how to emulate this specific environment and I'm not really linux savvy. The hoster is netcup and the plan is Webhosting 2000 (https://www.netcup.com/en/hosting).
Unfortunately, the fixed binary you posted doesn't work because it doesn't seem to be statically linked to glibc:
lovasoa commentedon Feb 18, 2025
Ok, the ENOENT (2) error code and your message put me on the right path, I can reproduce it now !
In the same environment, sqlpage without the stacker dependency works fine. I reported the issue to stacker, so that they can hopefully fix it: rust-lang/stacker#115
In the meantime, you can use the following statically linked binary: sqlpage.bin.gz
beingalink commentedon Feb 18, 2025
Thank you! This binary works fine. :)
improve error handling
Remove dependency to stacker, which crashes sqlpage (#815)
improve error handling (#116)