gentoo / cargo-ebuild

[MIRROR] cargo extension that can generate ebuilds using the in-tree eclasses
https://gitweb.gentoo.org/proj/cargo-ebuild.git
Apache License 2.0
32 stars 10 forks source link

segfault at 0 ip 00007f0e90558f10 sp 00007fff6783e430 error 4 in libgit2.so.1.4.0[7f0e904ca000+d3000] #20

Closed stefson closed 2 years ago

stefson commented 2 years ago

hey everyone,

I'm using the cargo-ebuild-0.5.0 from gentoo tree to get a working ebuild for cargo-xbuild. Tried v.0.6.5 and v.0.5.35 from their repo at https://github.com/rust-osdev/cargo-xbuild

cargo-ebuild ebuild gives me a plain segfault, and dmesg is full of these:

[ 2137.252281] cargo-ebuild[6743]: segfault at 0 ip 00007fe931f9ff10 sp 00007ffd36958810 error 4 in libgit2.so.1.4.0[7fe931f11000+d3000]
[ 2137.252286] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 2170.621534] rsync (6550) used greatest stack depth: 12096 bytes left
[ 2444.842331] cargo-ebuild[11796]: segfault at 0 ip 00007fb943945f10 sp 00007fffa67557e0 error 4 in libgit2.so.1.4.0[7fb9438b7000+d3000]
[ 2444.842336] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 2550.576053] cargo-ebuild[31966]: segfault at 0 ip 00007f0e6cbe8f10 sp 00007ffef1945130 error 4 in libgit2.so.1.4.0[7f0e6cb5a000+d3000]
[ 2550.576058] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 2556.259708] cargo-ebuild[32142]: segfault at 0 ip 00007fe6b60fdf10 sp 00007ffdf196db10 error 4 in libgit2.so.1.4.0[7fe6b606f000+d3000]
[ 2556.259713] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 2811.261943] cargo-ebuild[32494]: segfault at 0 ip 00007fe4373b2f10 sp 00007fffa9425250 error 4 in libgit2.so.1.4.0[7fe437324000+d3000]
[ 2811.261947] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 2817.048280] cargo-ebuild[32501]: segfault at 0 ip 00007f0e90558f10 sp 00007fff6783e430 error 4 in libgit2.so.1.4.0[7f0e904ca000+d3000]
[ 2817.048284] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f
[ 3187.799107] cargo-ebuild[6505]: segfault at 0 ip 00007f8121a12f10 sp 00007fff048d93e0 error 4 in libgit2.so.1.4.0[7f8121984000+d3000]
[ 3187.799112] Code: 4c 24 08 48 85 c9 74 71 48 8b 80 b0 00 00 00 4c 89 6c 24 28 45 31 e4 48 8d 2d cc e9 07 00 49 89 c5 66 0f 1f 84 00 00 00 00 00 <4f> 8b 7c e5 00 be 0d 00 00 00 4c 89 ff e8 be 2c f7 ff 48 85 c0 0f

tried removing the linking against systems libssh2+libgit2 from the ebuild, to no effect.

r7l commented 2 years ago

I can confirm this issue. Having the same error when trying to create an ebuild for a different project.

stefson commented 2 years ago

can I throw the patch into /etc/portage/patches to test it?

r7l commented 2 years ago

I am not a Rust developer and for this reason i am pretty much stuck with this issue. But /etc/portage/patches is a great idea, if the PR you've provided is working.

Maybe it's a better idea to fill a bug in bugs.gentoo.org instead of here. This is just a Github mirror and i wonder if anyone is actually reading the issues submitted here.

stefson commented 2 years ago

if you're really stuck, there is a secret escape hatch called --noaudit

stefson commented 2 years ago

the patch revendors the crates, therefore its propably going to be a point release

r7l commented 2 years ago

I've figured what the patch is doing. Just wondered how long it might take to end up as an actual release in Portage. I'll try the --noaudit option or might even try to add a the patch to /etc/portage/patches. Thanks allot!

stefson commented 2 years ago

the patch revendors the crates, so you have to take the old ebuild and adapt it accordingly

r7l commented 2 years ago

I got it working. Thanks allot. But i still hope there'll be an updated version of this project soon.

stefson commented 2 years ago

you care to share your new ebuild here?

it should get fixed for the tree in the not to long future, cargo-ebuild is an official gentoo project after all

r7l commented 2 years ago

This is the Ebuild i've created. It's not for this project and i've just used --no-audit and it went through without any issues.

stefson commented 2 years ago

I meant to ask for the cargo-ebuild-0.5.0-r1.ebuild you used, with patch and updated crates to emerge it. Bumped it myself in the evening, now all is fine with the patch indeed.

r7l commented 2 years ago

I didn't change anything to cargo-ebuild and i don't have any Ebuild beside the default one in Portage. Just using --no-audit did the job for me for now.

gyakovlev commented 2 years ago

sorry I was not around, back now. release 0.5.1 will land to gentoo soon.

gyakovlev commented 2 years ago

added https://github.com/gentoo/gentoo/commit/2db900724d7549a2250f6266dcf670c30560a5f9