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

Update to 1.7.1 #964

Merged
merged 5 commits into from
Sep 4, 2023
Merged

Update to 1.7.1 #964

merged 5 commits into from
Sep 4, 2023

Conversation

carlosmn
Copy link
Member

Unfortunately we segfault but I'm not sure if this is something in rugged or libgit2 or elsewhere. We still segfault even without the custom allocator setup so presumably it's not something inside rugged.

Deeper testing would have to go through building a custom ruby that uses the system allocator so valgrind or gdb can see what is going on. Running a single test doesn't trigger this so it seems to be something larger, and it fails with a NULL pointer dereference somewhere deep in fileutils during the helper, which is quite odd.

@carlosmn
Copy link
Member Author

Well some gdb paired with printf debugging shows that we seem to be double-deallocating the grafts. It looks like this might be due to git_repository__cleanup not dealing well with getting called twice wrt grafts. In rugged we call git_repository__cleanup in Repository::close which you can call to free up resources before the GC gets to them.

@dvzrv
Copy link

dvzrv commented Jul 22, 2023

Hi! Since we're currently blocked by ruby-rugged in our libgit2 1.7.0 rebuild on Arch Linux:
Do you know if applying libgit2/libgit2@9d4c550 on top of libgit2 1.7.0 is enough to make your changes to rugged work?

FWIW: applying a backported version to 1.6.3 seems to work fine for my use-case!

@carlosmn
Copy link
Member Author

@dvzrv it was enough to get it to work on my machine, and updating to 1.7.1 it does work, which shouldn't have anything else regarding segfaults.


Unfortunately now that 1.7.1 is out and I'm trying to update it, all of the macOS stuff fails but I don't know how much even has to do with libgit2 vs how it's built on macOS. And I'm not where my mac machine is so I can't dig deeper at the moment.

@ethomson
Copy link
Member

@carlosmn I have a Mac, how can I help?

@carlosmn
Copy link
Member Author

I'm now close to my mac, but it's packed up somewhere... basically in CI on macOS all the ssh tests fail for macOS and I've no idea if it's a macOS issue or if there's something that changed with GitHub or what.

@carlosmn
Copy link
Member Author

carlosmn commented Aug 25, 2023

Annoyingly it looks like the failing tests are those that test against the local ssh server. So that's more annoying to set up but at least it probably means it's something about how we set it up (but I only have old machines so I don't know how much I can update).

EDIT: it actually does fail locally for me on a mac but with a different error message, so I don't know if it's a different way of it to present a similar error or if it is a different issue on a different version.

@carlosmn
Copy link
Member Author

The problems I had locally ended up being just because we don't actually kill sshd so it was looking at the wrong checksum. The tests run fine on my now-up-to-date machine that's a patch version away from the runner.

So it looks like the issue might be something related to how the runners work on Actions and I've no idea how to debug that.

@carlosmn
Copy link
Member Author

Well as it happens, updating libssh2 to 1.11.0 from homebrew makes it fail locally like it does in CI. So maybe this should get merged as it doesn't seem like it's something that rugged has changed.

@carlosmn
Copy link
Member Author

In the logs from sshd it looks like there's too many auth failures, and it's tried none and publickey repeatedly. I don't know if we really now need to use a different scheme from the deprecated RSA or if it's something else.

@carlosmn carlosmn changed the title Update to 1.7.0 Update to 1.7.1 Sep 1, 2023
@carlosmn carlosmn marked this pull request as ready for review September 1, 2023 10:42
@carlosmn carlosmn merged commit 0b10975 into master Sep 4, 2023
10 checks passed
@carlosmn carlosmn deleted the cmn/bump-17 branch September 4, 2023 13:56
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

Successfully merging this pull request may close these issues.

3 participants