Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 730262 - sys-apps/portage: Add timeout configuration for sync-type = git
Summary: sys-apps/portage: Add timeout configuration for sync-type = git
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All All
: Normal normal with 1 vote (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 240187
  Show dependency tree
 
Reported: 2020-06-30 16:39 UTC by Zac Medico
Modified: 2020-12-27 02:58 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2020-06-30 16:39:22 UTC
Apparently it's possible for git fetch to hang forever:

> root      5540  0.2  0.0  11656  5468 ?        Ss   12:07   0:00 tmux
> root      5541  0.0  0.0  10144  3904 pts/1    Ss   12:07   0:00  \_ -bash
> root      5544  0.1  0.3 187912 32184 pts/1    S+   12:07   0:00  |   \_ /usr/bin/python3.8 -b /usr/lib/python-exec/python3.8/emerge --sync
> root      5605  0.0  0.3 114476 26872 pts/1    S+   12:08   0:00  |       \_ /usr/bin/python3.8 -b /usr/lib/python-exec/python3.8/emerge --sync
> root      5617  0.0  0.0  12384  4376 pts/1    S+   12:08   0:00  |       |   \_ /usr/bin/git fetch origin
> root      5620  0.0  0.0  12232  5408 pts/1    S+   12:08   0:00  |       |       \_ /usr/bin/ssh git@github.com git-upload-pack 'Whissi/gentoo-overlay.git'
> root      5606  0.0  0.3 114708 27384 pts/1    S+   12:08   0:00  |       \_ /usr/bin/python3.8 -b /usr/lib/python-exec/python3.8/emerge --sync
Comment 1 Zac Medico gentoo-dev 2020-12-27 02:58:17 UTC
I've checked to see if git fetch has some kind of timeout optio, but didn't find one. As a quick and dirty workaround, I guess it would be possible to use sync-git-pull-env to override GIT_SSH_COMMAND, and wrap the ssh command with a timeout command. However, we should add an option for an overall sync timeout, and this option can be independent the sync protocol. We have a somewhat related PORTAGE_RSYNC_INITIAL_TIMEOUT variable that was added for bug 180009.