RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1740266 - Mercurial fails to clone on s390x
Summary: Mercurial fails to clone on s390x
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mercurial
Version: 7.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marcel Plch
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-12 14:37 UTC by Alex Scheel
Modified: 2020-03-31 20:09 UTC (History)
4 users (show)

Fixed In Version: mercurial-2.6.2-11.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 20:09:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1169 0 None None None 2020-03-31 20:09:11 UTC

Description Alex Scheel 2019-08-12 14:37:37 UTC
Description of problem:

I'm unable to clone repositories (with hg clone) when running on s390x. 


Version-Release number of selected component (if applicable):

[root@ibm-z-119 tmp]# rpm -qa | grep -i mercurial
mercurial-2.6.2-10.el7.s390x


How reproducible:

Very; happens on both Mozilla repositories (https://hg.mozilla.org/projects/nss) and on the tutorial repository (http://www.selenic.com/repo/hello from https://www.mercurial-scm.org/wiki/TutorialClone)

Steps to Reproduce:

1. Acquire a s390x machine.
2. Install mercurial.
3. Try to clone something (e.g., hg clone https://hg.mozilla.org/projects/nss).

Actual results:


$ hg --debug --traceback --verbose clone https://hg.mozilla.org/projects/nss
using https://hg.mozilla.org/projects/nss
sending capabilities command
hg.mozilla.org certificate successfully verified
destination directory: nss
query 1; heads
sending batch command
requesting all changes
sending getbundle command
adding changesets
changesets: 1 chunks
add changeset 9949429068ca
changesets: 2 chunks
add changeset 4550695818cd
transaction abort!
rollback completed
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 127, in _runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 808, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 579, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 899, in _runcommand
    return checkargs()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 870, in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 805, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1264, in clone
    branch=opts.get('branch'))
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 372, in clone
    destpeer.local().clone(srcpeer, heads=revs, stream=stream)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2562, in clone
    return self.pull(remote, heads)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 1696, in pull
    result = self.addchangegroup(cg, 'pull', remote.url())
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 58, in wrapper
    return orig(repo.unfiltered(), *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2285, in addchangegroup
    srccontent = cl.addgroup(source, csmap, trp)
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1244, in addgroup
    p1, p2, (baserev, delta), ifh, dfh)
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1114, in _addrevision
    text = buildtext()
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1057, in buildtext
    btext[0] = mdiff.patch(basetext, cachedelta[1])
  File "/usr/lib64/python2.7/site-packages/mercurial/mdiff.py", line 350, in patch
    return mpatch.patches(a, [bin])
mpatchError: patch cannot be decoded
** unknown exception encountered, please report by visiting
** http://mercurial.selenic.com/wiki/BugTracker
** Python 2.7.5 (default, Jun 11 2019, 10:35:11) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
** Mercurial Distributed SCM (version 2.6.2)
** Extensions loaded: 
Traceback (most recent call last):
  File "/usr/bin/hg", line 38, in <module>
    mercurial.dispatch.run()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 28, in run
    sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 69, in dispatch
    ret = _runcatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 127, in _runcatch
    return _dispatch(req)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 808, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 579, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 899, in _runcommand
    return checkargs()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 870, in checkargs
    return cmdfunc()
  File "/usr/lib64/python2.7/site-packages/mercurial/dispatch.py", line 805, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/usr/lib64/python2.7/site-packages/mercurial/util.py", line 506, in check
    return func(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/commands.py", line 1264, in clone
    branch=opts.get('branch'))
  File "/usr/lib64/python2.7/site-packages/mercurial/hg.py", line 372, in clone
    destpeer.local().clone(srcpeer, heads=revs, stream=stream)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2562, in clone
    return self.pull(remote, heads)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 1696, in pull
    result = self.addchangegroup(cg, 'pull', remote.url())
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 58, in wrapper
    return orig(repo.unfiltered(), *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/mercurial/localrepo.py", line 2285, in addchangegroup
    srccontent = cl.addgroup(source, csmap, trp)
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1244, in addgroup
    p1, p2, (baserev, delta), ifh, dfh)
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1114, in _addrevision
    text = buildtext()
  File "/usr/lib64/python2.7/site-packages/mercurial/revlog.py", line 1057, in buildtext
    btext[0] = mdiff.patch(basetext, cachedelta[1])
  File "/usr/lib64/python2.7/site-packages/mercurial/mdiff.py", line 350, in patch
    return mpatch.patches(a, [bin])
mpatch.mpatchError: patch cannot be decoded



Expected results:

A cloned nss tree. 


Additional info:

Cloning this repository works on x86_64. I have LANG=en_US.UTF-8 set in the environment, but LANG=C also fails.

Comment 6 Pavel Cahyna 2019-08-13 12:11:49 UTC
Alex: Version: should be 7.7 and not 7.0, right? Did it work in 7.6?

Comment 9 Alex Scheel 2019-08-13 13:49:43 UTC
Ah sorry folks. I must've ignored the Version field. Fixed.

Yes, 7.7 is what the beaker machine I have is running. 

I have no idea if it works in 7.6 -- I only recently requested a s390x instance to track down a NSS issue I was experiencing in Brew/Koji. I tried pulling NSS via mercurial to get a newer versions to see if its fixed upstream and ran into this. :-)

Comment 10 Lukáš Zachar 2019-08-13 14:04:13 UTC
It works on 7.6.EUS

Comment 11 Marcel Plch 2019-08-26 18:10:27 UTC
This is an issue on big-endian arches in general caused by shifting of an address of a variable in dependence on its length.

I am currently solving this upstream, for more info, see:
https://bz.mercurial-scm.org/show_bug.cgi?id=6191

Comment 13 Marcel Plch 2019-10-04 11:20:13 UTC
Upstream, this issue is already solved by calculating the pointer offset separately and adding the verified offset to the pointer.
Our backport calculates with the pointer directly, which passes wrong address on big endian architectures to the safe add function, which then adds billions instead of units.

This bug is high priority for me and the fix should be ready ASAP. (Next Monday at most.)

Comment 17 errata-xmlrpc 2020-03-31 20:09:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:1169


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