Bug 1814897 - libgit2 crashes on F30 and F31 (but not F32)
Summary: libgit2 crashes on F30 and F31 (but not F32)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: http-parser
Version: 31
Hardware: All
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Pete Walter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-19 00:21 UTC by Jeroen
Modified: 2020-03-27 10:42 UTC (History)
8 users (show)

Fixed In Version: libgit2-0.28.4-3.fc31 libgit2-0.27.8-3.fc30
Clone Of:
Environment:
Last Closed: 2020-03-22 03:07:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jeroen 2020-03-19 00:21:13 UTC
Description of problem: As approx a month ago, libgit2 crashes when cloning https repositories. It happens in F30 and F31, but not F32.

Version-Release number of selected component (if applicable): libgit2-devel-0.28.4-2.fc31.x86_64

How reproducible: Every time

Steps to Reproduce: below an example program. 

#include <git2.h>
#include <stdlib.h>
#include <stdio.h>

int main(){
	git_libgit2_init();
	git_repository *repo = NULL;
	int err = git_clone(&repo, "https://github.com/ropensci/antiword", "antiword", NULL);
	if (err < 0) {
		const git_error *e = git_error_last();
		printf("Error %d/%d: %s\n", err, e->klass, e->message);
		exit(err);
	}
	return 0;
}


Compile with: gcc test.c -lgit2


Actual results: crash


Expected results: cloned repository


Additional info: gdb suggests the problem may be related to libhttp-parser. Backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00007fa6a629e9f8 in on_header_field () from /lib64/libgit2.so.28
Missing separate debuginfos, use: dnf debuginfo-install http-parser-2.9.3-1.fc31.x86_64 libgit2-0.28.4-2.fc31.x86_64 libssh2-1.9.0-3.fc31.x86_64 openssl-libs-1.1.1d-2.fc31.x86_64 zlib-1.2.11-20.fc31.x86_64
(gdb) bt
#0  0x00007fa6a629e9f8 in on_header_field () from /lib64/libgit2.so.28
#1  0x00007fa6a5c8b1a2 in http_parser_execute () from /lib64/libhttp_parser.so.2
#2  0x00007fa6a62a083a in http_stream_read () from /lib64/libgit2.so.28
#3  0x00007fa6a62a1f05 in git_smart.recv_cb () from /lib64/libgit2.so.28
#4  0x00007fa6a62a40d0 in git_smart.store_refs () from /lib64/libgit2.so.28
#5  0x00007fa6a62a2693 in git_smart.connect () from /lib64/libgit2.so.28
#6  0x00007fa6a62810b0 in git_remote.connect () from /lib64/libgit2.so.28
#7  0x00007fa6a6282a52 in git_remote_fetch () from /lib64/libgit2.so.28
#8  0x00007fa6a622188f in git_clone () from /lib64/libgit2.so.28
#9  0x000000000040119d in main (argc=1, argv=0x7ffca2e16378) at test.c:8

Comment 1 Pete Walter 2020-03-19 10:47:23 UTC
Moving to http-parser.

Comment 2 Pete Walter 2020-03-19 11:36:34 UTC
Turns out http-parser 2.9.3 silently changed ABI. Simply rebuilding libgit2 against http-parser 2.9.3 fixes it.

Comment 3 Fedora Update System 2020-03-19 11:50:25 UTC
FEDORA-2020-5abc1db666 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-5abc1db666

Comment 4 Fedora Update System 2020-03-20 03:08:25 UTC
libgit2-0.27.8-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-6dcbc5d22b

Comment 5 Fedora Update System 2020-03-20 03:12:25 UTC
libgit2-0.28.4-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5abc1db666

Comment 6 Fedora Update System 2020-03-22 03:07:57 UTC
libgit2-0.28.4-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Fedora Update System 2020-03-27 10:42:42 UTC
FEDORA-2020-6dcbc5d22b has been pushed to the Fedora 30 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.