Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1614720 - 1.11.2 → 1.11.5 breaks pygit2 on ppc64/s390x
Summary: 1.11.2 → 1.11.5 breaks pygit2 on ppc64/s390x
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cffi
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Smith
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker 1731545
TreeView+ depends on / blocked
 
Reported: 2018-08-10 09:50 UTC by Igor Raits
Modified: 2019-11-27 23:05 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1626587 (view as bug list)
Environment:
Last Closed: 2019-11-27 23:05:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Igor Raits 2018-08-10 09:50:13 UTC
https://apps.fedoraproject.org/koschei/build/4807194

https://github.com/libgit2/pygit2/issues/811
https://github.com/libgit2/pygit2/issues/812

One of errors is that it gets some 'U' character and this happens only on aarc64. Second error makes some option to not pass correctly into libgit2 C code (because same test in C works fine).

Comment 1 Igor Raits 2018-08-10 10:17:18 UTC
# aarch64

======================================================================
FAIL: test_get_gpg_signature_when_signed (test.test_commit.GpgSignatureTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pygit2-0.27.1/test/test_commit.py", line 191, in test_get_gpg_signature_when_signed
    assert payload == expected_payload
AssertionError
----------------------------------------------------------------------

# ppc64

======================================================================
FAIL: test_no_context_lines (test.test_patch.PatchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pygit2-0.27.1/test/test_patch.py", line 192, in test_no_context_lines
    self.assertEqual(context_count, 0)
AssertionError: 1 != 0
----------------------------------------------------------------------

# s390x

======================================================================
FAIL: test_no_context_lines (test.test_patch.PatchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/pygit2-0.27.1/test/test_patch.py", line 192, in test_no_context_lines
    self.assertEqual(context_count, 0)
AssertionError: 1 != 0
----------------------------------------------------------------------

Comment 2 Igor Raits 2018-08-10 10:20:03 UTC
Unfortunately that doesn't help but quick analyses gives something like:

# aarch64

        expected_payload = (
            'tree c36c20831e43e5984c672a714661870b67ab1d95\nauthor Mark Adams '
            '<madams> 1517510299 -0600\ncommitter Mark Adams <ma'
            'dams> 1517510441 -0600\n\nMaking a GPG signed commi'
            't\n'
        ).encode('ascii')

But the payload, pygit2 gives contains extra 'U' at the end of this line.

# ppc64/s390x

        patch = pygit2.Patch.create_from(
            old_blob,
            new_blob,
            old_as_path=BLOB_OLD_PATH,
            new_as_path=BLOB_NEW_PATH,
            context_lines=0,
        )

        context_count = (
            len([line for line in patch.patch.splitlines() if line.startswith(" ")])
        )

        self.assertEqual(context_count, 0)

Inspecting patch.patch, it seems to ignore context_lines=0 ENTIRELY.

Comment 3 Peter Robinson 2018-08-10 10:33:54 UTC
jlinton: can you possibly take a look at this please?

Comment 4 Jan Kurik 2018-08-14 08:37:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 5 Igor Raits 2018-09-02 15:56:44 UTC
ping?

Comment 6 Jeremy Linton 2018-09-04 16:01:10 UTC
Oh, I just saw this. I guess the expectation here is that it zlib related again?

I will take a look at it.

Comment 7 Jeremy Linton 2018-09-06 21:33:55 UTC
On aarch64 its definitly the optimization patch, and this problem is similar to the one in git itself. Basically the buffer is being allocated with calloc(), and zlib is poisoning unused portions of the buffer. A small tweak to force a null termination at the end of the buffer in packfile_unpack_compressed()

	obj->type = type;
	obj->len = size;
	obj->data = buffer;
	if (buf_size>size)
	{
		buffer[size]='\0';
	}
	return 0;

fixes the problem.

As this is aarch64 specific, should I split this defect from the PPC one?

Comment 8 Peter Robinson 2018-09-06 21:59:38 UTC
> As this is aarch64 specific, should I split this defect from the PPC one?

Yes, it's a different issue so should be split.

Comment 9 Jeremy Linton 2018-09-07 17:09:54 UTC
Leaving this one for PPC, the aarch64 bug is #1626587

Comment 10 Ben Cotton 2019-10-31 19:01:18 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2019-11-27 23:05:55 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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