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
Kellnr calculates wrong checksum [CRITICAL] #311
Comments
Hi @alexthe2! Thanks for reporting the issue. Does this happen only with one specific crate or under specific circumstances? I'll try to reproduce the issue. |
It happens with two crates for us (from what I can see right now), called v12-data and v12-terra_converters, |
Can you provide logs from Kellnr in the "trace" mode, when the issue occurs? I try to replicate the wrongly computed hash, but so far without any success. |
should I set |
KELLNR_LOG__LEVEL should be enough. |
it's not producing any logs 😢 , I verfied that the level is really set to trace (updated helm chart, and deleted pod to force restart) |
I still try to debug the issue but have no idea why the sha256 is computed wrong. Can you try to disable the cache, so I know that it is not a caching issue? KELLNR_REGISTRY_CACHE_SIZE=0 |
Hi @secana, we are experiencing the same issue. I could provide one more data point. Compare the sha256sum of a corrupted crate in the db and the actual value: And I am already running with KELLNR_REGISTRY__CACHE_SIZE=0 I am running Kellnr 5.2.2 with the released docker image. Thanks! |
If I delete the corrupted version from the web ui as admin user, restart the docker container, and then publish the same crate again, it could fix the problem. |
Fun story for us, if you hand fix the cksum in SQLite, it might solve the
problem for the next version.
The reason I say might is it solved it for one crate but not for all of them
…On Sat, May 11, 2024, 12:18 AM Chao Gu ***@***.***> wrote:
If I delete the corrupted version from the web ui as admin user, restart
the docker container, and then publish the same crate again, it could fix
the problem.
—
Reply to this email directly, view it on GitHub
<#311 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIBZJB247NNNPAJFMTXG2BTZBVBSNAVCNFSM6AAAAABHDRHCLWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBVGMZTMNJZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks for the input. So far, the issue seems to be the computation of the sha256, as the crate itself seems to be fine on disk. I released a debug version of kellnr with much more debug output for the specific issue. Would you be so kind and try to run it and provide the logs here? Kellnr version: 5.2.3-debug-311 All logs are in the level |
Thanks @secana! I have deployed this test version with logs enabled. I tried to publish a test crate 10 times (with slight modification each time) and the logs looks good to me. My team will continue to use this version and I will show the logs here if the issue happens again. Thanks for the help! |
New version of Kellnr 5.3.2 is out with improved SHA256 computation. This error should be fixed with that version. |
Also a finishing update from our side, we got the debug version running two days ago, no issues yet, we'll now switch to the new 5.3.2 |
Hi @secana, my team have the debug version running for almost 10 days and we captured this issue again. Here is the log: It seems that the error is happenned when reading the crate saved to disk back into memory for sha256 calculation, it only reads 4096 bytes. |
Since last week (there was no particular event), kellnr started calculating the wrong checksums for the crates pushed to it.
This results in cargo not being able to verify checksums.
As an example crate:
The checksum here is not the checksum that would occur from running
sha256sum
, when we did aUPDATE crate_index ...
with the result of sha256, that particular crate started correctly working (with cargo).We're happy to help with resolving this issue asap, as it's a criticial bug for us, but would need some guidance as to where this issue could be originating from.
We're running the latest kellnr 5.2.1, with rust 1.77.2 on the buildserver (Jenkins) that pushes to kellnr, and locally 1.75+
The text was updated successfully, but these errors were encountered: