git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sitsofe Wheeler <sitsofe@gmail.com>
To: git@vger.kernel.org
Subject: Periodic hang during git index-pack
Date: Wed, 19 Dec 2018 22:59:30 +0000	[thread overview]
Message-ID: <CALjAwxiB1uDfg4iPFjh2dNibEZa5mJ0RwhCzt0R2b87NTVqWfA@mail.gmail.com> (raw)

Hi,

While using trying to use git to clone a remote repository git
index-pack occasionally goes on to hang:

export GIT_TRACE=1
git clone -n remotehost:diffusion/LIBEDIT/libedit
22:43:48.948378 git.c:418               trace: built-in: git clone -n
remotehost:diffusion/LIBEDIT/libedit
Cloning into 'libedit'...
22:43:48.951196 run-command.c:643       trace: run_command: unset
GIT_DIR; ssh remotehost 'git-upload-pack
'\''diffusion/LIBEDIT/libedit'\'''
22:43:49.130517 run-command.c:643       trace: run_command: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13914 on machine'
--check-self-contained-and-connected
remote: Enumerating objects: 178, done.
22:43:49.132535 git.c:418               trace: built-in: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13914 on machine'
--check-self-contained-and-connected
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 178 (delta 95), reused 178 (delta 95)
Receiving objects: 100% (178/178), 539.36 KiB | 16.85 MiB/s, done.
Resolving deltas: 100% (95/95), done.
22:43:49.209193 run-command.c:643       trace: run_command: git
rev-list --objects --stdin --not --all --quiet '--progress=Checking
connectivity'
22:43:49.211276 git.c:418               trace: built-in: git rev-list
--objects --stdin --not --all --quiet '--progress=Checking
connectivity'
Wed 19 Dec 22:43:49 GMT 2018
Wed 19 Dec 22:43:49 GMT 2018
22:43:49.220996 git.c:418               trace: built-in: git clone -n
remotehost:diffusion/LIBEDIT/libedit
Cloning into 'libedit'...
22:43:49.223462 run-command.c:643       trace: run_command: unset
GIT_DIR; ssh remotehost 'git-upload-pack
'\''diffusion/LIBEDIT/libedit'\'''
22:43:49.491004 run-command.c:643       trace: run_command: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13925 on machine'
--check-self-contained-and-connected
remote: Enumerating objects: 178, done.
22:43:49.492988 git.c:418               trace: built-in: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13925 on machine'
--check-self-contained-and-connected
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (81/81), done.
remote: Total 178 (delta 95), reused 178 (delta 95)
Receiving objects: 100% (178/178), 539.36 KiB | 17.40 MiB/s, done.
Resolving deltas: 100% (95/95), done.
22:43:49.569331 run-command.c:643       trace: run_command: git
rev-list --objects --stdin --not --all --quiet '--progress=Checking
connectivity'
22:43:49.571431 git.c:418               trace: built-in: git rev-list
--objects --stdin --not --all --quiet '--progress=Checking
connectivity'
Wed 19 Dec 22:43:49 GMT 2018
Wed 19 Dec 22:43:49 GMT 2018
22:43:49.581282 git.c:418               trace: built-in: git clone -n
remotehost:diffusion/LIBEDIT/libedit
Cloning into 'libedit'...
22:43:49.584019 run-command.c:643       trace: run_command: unset
GIT_DIR; ssh remotehost 'git-upload-pack
'\''diffusion/LIBEDIT/libedit'\'''
22:43:49.818490 run-command.c:643       trace: run_command: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13936 on machine'
--check-self-contained-and-connected
remote: Enumerating objects: 178, done.
22:43:49.820477 git.c:418               trace: built-in: git
index-pack --stdin -v --fix-thin '--keep=fetch-pack 13936 on machine'
--check-self-contained-and-connected
remote: Counting objects: 100% (178/178), done.
remote: Compressing objects: 100% (81/81), done.
Receiving objects:  64% (114/178)

Most of the time cloning complets fine but every now and then it will
hang indefinitely in the receiving objects stage. This happens with
git version 2.17.1 from Ubuntu 18.04 and a hand compiled git version
2.20.1. The remote end is running through Phabricator sshd scripts
(both 2.17.1 and 2.20.1 have been tried on the remote end). ssh
multiplexing is on:

ControlMaster auto
ControlPersist 120
ControlPath /tmp/ssh-%r@%h:%p
ServerAliveInterval 60

Looking at where it is stuck, git is doing read of a pipe:

#0  0x00007fd1b845034e in __libc_read (fd=fd@entry=0,
buf=buf@entry=0x55ab81e19d40 <input_buffer>, nbytes=nbytes@entry=4096)
    at ../sysdeps/unix/sysv/linux/read.c:27
#1  0x000055ab81b51b23 in read (__nbytes=4096, __buf=0x55ab81e19d40
<input_buffer>, __fd=0)
    at /usr/include/x86_64-linux-gnu/bits/unistd.h:44
#2  xread (fd=0, buf=0x55ab81e19d40 <input_buffer>, len=4096) at wrapper.c:260
#3  0x000055ab819d1069 in fill (min=min@entry=1) at builtin/index-pack.c:255
#4  0x000055ab819d123a in unpack_entry_data (offset=268408,
size=size@entry=14675, type=<optimised out>,
oid=oid@entry=0x55ab837cff40)
    at builtin/index-pack.c:445
#5  0x000055ab819d1bc7 in unpack_raw_entry (oid=0x55ab837cff40,
ref_oid=0x7fffee137440, ofs_offset=0x55ab837ce350, obj=0x55ab837cff40)
    at builtin/index-pack.c:526
#6  parse_pack_objects (hash=0x7fffee1374f0 "\001") at builtin/index-pack.c:1113
#7  cmd_index_pack (argc=<optimised out>, argv=<optimised out>,
prefix=<optimised out>) at builtin/index-pack.c:1775
#8  0x000055ab819934e1 in run_builtin (argv=<optimised out>,
argc=<optimised out>, p=<optimised out>) at git.c:421
#9  handle_builtin (argc=<optimised out>, argv=<optimised out>) at git.c:647
#10 0x000055ab81994515 in run_argv (argv=0x7fffee137690,
argcp=0x7fffee13769c) at git.c:701
#11 cmd_main (argc=<optimised out>, argv=<optimised out>) at git.c:798
#12 0x000055ab8199318f in main (argc=7, argv=0x7fffee137908) at common-main.c:45

Does anyone know what might be wrong and/or how to debug this?

-- 
Sitsofe | http://sucs.org/~sits/

             reply	other threads:[~2018-12-19 23:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 22:59 Sitsofe Wheeler [this message]
2018-12-19 23:22 ` Periodic hang during git index-pack Jeff King
2018-12-20 10:03   ` Sitsofe Wheeler
2018-12-20 15:10     ` Jeff King
2018-12-20 16:48       ` Sitsofe Wheeler
2019-02-03  8:16         ` Sitsofe Wheeler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALjAwxiB1uDfg4iPFjh2dNibEZa5mJ0RwhCzt0R2b87NTVqWfA@mail.gmail.com \
    --to=sitsofe@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).