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 1952030 - git clone --bare segfaults (regression)
Summary: git clone --bare segfaults (regression)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 33
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Todd Zullinger
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-21 11:26 UTC by Mauro Carvalho Chehab
Modified: 2021-05-09 01:15 UTC (History)
9 users (show)

Fixed In Version: git-2.31.1-3.fc35 git-2.31.1-3.eln110 git-2.31.1-3.fc34 git-2.31.1-3.fc33
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-30 01:27:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mauro Carvalho Chehab 2021-04-21 11:26:44 UTC
Description of problem:

Git clone --bare is now segfaulting


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

git-core-2.30.2-1.fc33.x86_64

How reproducible:

Always.

Steps to Reproduce:

git clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Cloning into bare repository 'linux.git'...
Falha de segmentação (imagem do núcleo gravada)

The same happens when cloning with "-l" from a local tree.

Downgrading it to git-2.28.0-1.fc33.x86_64 solves the issue.

Additional info:

$ gdb git
GNU gdb (GDB) Fedora 10.1-4.fc33
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from git...
Reading symbols from .gnu_debugdata for /usr/bin/git...
(No debugging symbols found in .gnu_debugdata for /usr/bin/git)
Missing separate debuginfos, use: dnf debuginfo-install git-core-2.30.2-1.fc33.x86_64
(gdb) run clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Starting program: /usr/bin/git clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
fatal: destination path 'linux.git' already exists and is not an empty directory.
[Inferior 1 (process 377919) exited with code 0200]
(gdb) bt
No stack.
(gdb) run clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linus.git
Starting program: /usr/bin/git clone --bare git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linus.git
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Cloning into bare repository 'linus.git'...

Program received signal SIGSEGV, Segmentation fault.
0x00005555555e2c3b in init_db ()
(gdb) bt
#0  0x00005555555e2c3b in init_db ()
#1  0x00005555555a1130 in cmd_clone ()
#2  0x00005555555778ab in handle_builtin.lto_priv ()
#3  0x00005555555723db in main ()

Comment 1 Todd Zullinger 2021-04-21 13:36:08 UTC
Do you have clone.bare set to default in your global git config?

Such an issue was reported in https://lore.kernel.org/git/D99DD9AD-54E5-4357-BA50-8B9CAE23084E@amazon.com/ and a fix was committed https://github.com/git/git/commit/75555676ad.

Comment 2 Todd Zullinger 2021-04-21 17:13:11 UTC
If you want, I did a scratch build for f33 with the patch applied: https://koji.fedoraproject.org/koji/taskinfo?taskID=66423069

Or you can get 2.31.1 with the patch from my copr: https://copr.fedorainfracloud.org/coprs/tmz/git/

The simplest work-around is to remove core.bare=false from the global git config.  (At least until the next update is pushed out -- since a segfault is something which should be fixed.)

Comment 3 Mauro Carvalho Chehab 2021-04-22 13:52:46 UTC
(In reply to Todd Zullinger from comment #1)
> Do you have clone.bare set to default in your global git config?

Yes.

> If you want, I did a scratch build for f33 with the patch applied: https://koji.fedoraproject.org/koji/taskinfo?taskID=66423069

Worked, thanks!

$ git clone --bare  ~/linux-kernel
Cloning into bare repository 'linux-kernel.git'...
done.

Comment 4 Fedora Update System 2021-04-30 01:27:02 UTC
FEDORA-2021-a049e093dd has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Fedora Update System 2021-04-30 01:48:04 UTC
FEDORA-2021-9e151d1885 has been pushed to the Fedora ELN stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2021-04-30 14:08:43 UTC
FEDORA-2021-5f888bda5e has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-5f888bda5e

Comment 7 Fedora Update System 2021-05-01 02:05:21 UTC
FEDORA-2021-5f888bda5e has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-5f888bda5e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-5f888bda5e

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-05-01 13:54:56 UTC
FEDORA-2021-44e5c07612 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-44e5c07612

Comment 9 Fedora Update System 2021-05-02 01:10:20 UTC
FEDORA-2021-44e5c07612 has been pushed to the Fedora 33 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-44e5c07612`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-44e5c07612

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2021-05-06 01:01:25 UTC
FEDORA-2021-5f888bda5e has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-05-09 01:15:41 UTC
FEDORA-2021-44e5c07612 has been pushed to the Fedora 33 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.