Your message dated Fri, 10 Jun 2011 10:18:24 +0000
with message-id <[email protected]>
and subject line Bug#609405: fixed in git 1:1.7.5.4-1
has caused the Debian Bug report #609405,
regarding git-daemon-run: sometimes binds to fewer addresses on restart (does 
not use SO_REUSEADDR)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
609405: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609405
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: git-daemon-run
Version: 1:1.7.2.3-2.2
Severity: important
Justification: bad behavior, especially re ipv6 support

Hi,

Was playing around with git-daemon-run to compare it with the proposed
sysvinit support.  See [1] for the war story.

Okay, finished?  The upshot is, as ip(7) explains,

        A TCP local socket address that has been bound is unavailable
        for some time  after  closing,  unless  the SO_REUSEADDR flag
        has been set.  Care should be taken when using this flag as it
        makes TCP less reliable.

More precisely:

1. server closes connection, for example by exiting.
2. kernel places connection in TIME-WAIT state.  The address is in use.
3. git-daemon gets EADDRINUSE when it tries to use that address, since
   the SO_REUSEADDR flag is not set.  If all (usually meaning "both")
   addresses to be bound to are "in use", the daemon dies with

        fatal: unable to allocate any listen sockets on port 9418

   and gets launched again by runit when an address is free.

   If only _some_ of the addresses to be bound to are "in use" in this
   way, the daemon does not get launched again, and it is bound only
   to the remaining ones.

Analysis:

 - The ideal would be to disallow connections _from the same client
   address and port_ until the TIME-WAIT state ends.  Is that easy to
   achieve?

 - A workaround, even though it violates the spirit of TCP, is to just
   forget about TIME-WAIT in the case of restarting the daemon.  I
   _suspect_ that this is what the git daemon --reuseaddr flag does
   but of course it is hard to check.

 - The fourth best behavior would be to convince git daemon that
   EADDRINUSE is fatal so runit keeps on trying to relaunch the daemon
   until all its addresses are available.

 - Of course better is to run separate daemons for ipv4 and ipv6.

Thoughts?
Jonathan

[1] In one terminal I start the daemon and clear its log:

        # sv stop git-daemon
        ok: down: git-daemon: 1s, normally up
        # sh -c '>/var/log/git-daemon/current'
        # sv start git-daemon
        ok: run: git-daemon: (pid 6070) 0s

Great.  Now in another terminal I start a connection:

        $ git clone git://localhost/git/git.git
        Cloning into git...
        remote: Counting objects: 113028, done.

Back in the first terminal, I brutally interrupt the daemon, to see
how the supervision copes.

        # killall -9 git-daemon

Great, it seems!  The clone continues unhindered (I think the process
actually transmitting data is git upload-pack).  The log informs me
that all is well.

        # cat /var/log/git-daemon/run
        2011-01-09_06:29:43.06660 git-daemon starting.
        2011-01-09_06:30:01.26329 [6074] Connection from [::1]:33407
        2011-01-09_06:30:01.26340 [6074] Extended attributes (16 bytes) exist 
<host=localhost>
        2011-01-09_06:30:01.26429 [6074] Request upload-pack for '/git/git.git'
        2011-01-09_06:30:05.41074 git-daemon starting.

Now again.

        $ rm -fr git; git clone git://localhost/git/git.git
        Cloning into git...
        localhost[0: ::1]: errno=Connection refused
        remote: Counting objects: 19469   

Interrupting the daemon:

        # killall -9 git-daemon

The clone continues unhindered.  Log:

        # sudo cat /var/log/git-daemon/current
        2011-01-09_06:29:43.06660 git-daemon starting.
        2011-01-09_06:30:01.26329 [6074] Connection from [::1]:33407
        2011-01-09_06:30:01.26340 [6074] Extended attributes (16 bytes) exist 
<host=localhost>
        2011-01-09_06:30:01.26429 [6074] Request upload-pack for '/git/git.git'
        2011-01-09_06:30:05.41074 git-daemon starting.
        2011-01-09_06:31:19.83078 [6091] Connection from 127.0.0.1:39196
        2011-01-09_06:31:19.83095 [6091] Extended attributes (16 bytes) exist 
<host=localhost>
        2011-01-09_06:31:19.83206 [6091] Request upload-pack for '/git/git.git'
        2011-01-09_06:31:29.42557 git-daemon starting.
        2011-01-09_06:31:29.43869 fatal: unable to allocate any listen sockets 
on port 9418
        2011-01-09_06:31:30.44277 git-daemon starting.
        2011-01-09_06:31:30.44796 fatal: unable to allocate any listen sockets 
on port 9418
        [3 more failures before it succeeds]



--- End Message ---
--- Begin Message ---
Source: git
Source-Version: 1:1.7.5.4-1

We believe that the bug you reported is fixed in the latest version of
git, which is due to be installed in the Debian FTP archive:

git-all_1.7.5.4-1_all.deb
  to main/g/git/git-all_1.7.5.4-1_all.deb
git-arch_1.7.5.4-1_all.deb
  to main/g/git/git-arch_1.7.5.4-1_all.deb
git-core_1.7.5.4-1_all.deb
  to main/g/git/git-core_1.7.5.4-1_all.deb
git-cvs_1.7.5.4-1_all.deb
  to main/g/git/git-cvs_1.7.5.4-1_all.deb
git-daemon-run_1.7.5.4-1_all.deb
  to main/g/git/git-daemon-run_1.7.5.4-1_all.deb
git-doc_1.7.5.4-1_all.deb
  to main/g/git/git-doc_1.7.5.4-1_all.deb
git-el_1.7.5.4-1_all.deb
  to main/g/git/git-el_1.7.5.4-1_all.deb
git-email_1.7.5.4-1_all.deb
  to main/g/git/git-email_1.7.5.4-1_all.deb
git-gui_1.7.5.4-1_all.deb
  to main/g/git/git-gui_1.7.5.4-1_all.deb
git-man_1.7.5.4-1_all.deb
  to main/g/git/git-man_1.7.5.4-1_all.deb
git-svn_1.7.5.4-1_all.deb
  to main/g/git/git-svn_1.7.5.4-1_all.deb
git_1.7.5.4-1.diff.gz
  to main/g/git/git_1.7.5.4-1.diff.gz
git_1.7.5.4-1.dsc
  to main/g/git/git_1.7.5.4-1.dsc
git_1.7.5.4.orig.tar.gz
  to main/g/git/git_1.7.5.4.orig.tar.gz
gitk_1.7.5.4-1_all.deb
  to main/g/git/gitk_1.7.5.4-1_all.deb
gitweb_1.7.5.4-1_all.deb
  to main/g/git/gitweb_1.7.5.4-1_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jonathan Nieder <[email protected]> (supplier of updated git package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 07 Jun 2011 13:23:58 -0500
Source: git
Binary: git git-man git-core git-doc git-arch git-cvs git-svn git-email 
git-daemon-run git-gui gitk git-el gitweb git-all
Architecture: all source
Version: 1:1.7.5.4-1
Distribution: unstable
Urgency: low
Maintainer: Gerrit Pape <[email protected]>
Changed-By: Jonathan Nieder <[email protected]>
Description: 
 git        - fast, scalable, distributed revision control system
 git-all    - fast, scalable, distributed revision control system (all subpacka
 git-arch   - fast, scalable, distributed revision control system (arch interop
 git-core   - fast, scalable, distributed revision control system (obsolete)
 git-cvs    - fast, scalable, distributed revision control system (cvs interope
 git-daemon-run - fast, scalable, distributed revision control system 
(git-daemon s
 git-doc    - fast, scalable, distributed revision control system (documentatio
 git-el     - fast, scalable, distributed revision control system (emacs suppor
 git-email  - fast, scalable, distributed revision control system (email add-on
 git-gui    - fast, scalable, distributed revision control system (GUI)
 git-man    - fast, scalable, distributed revision control system (manual pages
 git-svn    - fast, scalable, distributed revision control system (svn interope
 gitk       - fast, scalable, distributed revision control system (revision tre
 gitweb     - fast, scalable, distributed revision control system (web interfac
Closes: 609405 627314
Changes: 
 git (1:1.7.5.4-1) unstable; urgency=low
 .
   * new upstream point release.
 .
   [ Gerrit Pape ]
   * debian/changelog.upstream, debian/versions.upstream: update upstream
     changelog.
 .
   [ Jonathan Nieder ]
   * debian/changelog.upstream.sh: use set -e.
   * debian/git-daemon/run: use SO_REUSEADDR when binding the listening
     socket so the server can restart without waiting for old connections
     to time out (thx Daniel Kahn Gillmor; closes: #609405).
   * debian/git-daemon-run.postrm purge: terminate the git-daemon/log
     service, even if there is an active connection using it, before
     deleting logs and the gitlog user (thx Daniel Kahn Gillmor; closes:
     #627314).
Checksums-Sha1: 
 8e638e14dfd8d1a2ec1ab583a66d3527e5fe7395 1444 git_1.7.5.4-1.dsc
 20241d70d320aa34514f760d464e651e1f02eeae 3347228 git_1.7.5.4.orig.tar.gz
 1da6d47a3a95d2ed5bb873d42b9541ae46988e87 434084 git_1.7.5.4-1.diff.gz
 cb2165c79428b6ebb6e885d87407f036070945b3 1954862 git-doc_1.7.5.4-1_all.deb
 a3686afffa96dc8b4b6ed0a6da7b344d043347c8 414104 git-arch_1.7.5.4-1_all.deb
 0177b46d815227c323511e048ed5ab09944f91dc 483710 git-cvs_1.7.5.4-1_all.deb
 005df9f141f1e2dac8952e0cde99f29945285cb2 466062 git-svn_1.7.5.4-1_all.deb
 2b6aa871b6777a46f86e86439a09a8842d636ac8 401300 
git-daemon-run_1.7.5.4-1_all.deb
 16151b5de857223cc0d89e8aceaf7c34e9b7aede 419536 git-email_1.7.5.4-1_all.deb
 9f28ad51ab86dff269edc0a5d7006b6a035766ed 676296 git-gui_1.7.5.4-1_all.deb
 2ebdb076cf954d8487e3e2b5621eba2a572c9791 524918 gitk_1.7.5.4-1_all.deb
 fa8fa569292dd05f7e958abd66cace7c49bb8004 410918 gitweb_1.7.5.4-1_all.deb
 602920d99674cbbe9e0e8c13cc6444b9cde89b46 399568 git-all_1.7.5.4-1_all.deb
 a52e4aac26e5e5c418127d4c257a7bb1c70488a8 1328 git-core_1.7.5.4-1_all.deb
 6ca1fb69649fcf21d72cc0de51e3fe360af9fe5e 423560 git-el_1.7.5.4-1_all.deb
 13676891ee8f4314e2380b790732a95ba7989d6b 961330 git-man_1.7.5.4-1_all.deb
Checksums-Sha256: 
 1cb25b52e508068745184bbebd2bab3a1ee5a14b82cbb2966cf32fda800a4127 1444 
git_1.7.5.4-1.dsc
 540534be2c582352921ae4575b4f11e97af1f795034725ed308cd54c8737e46d 3347228 
git_1.7.5.4.orig.tar.gz
 9bec892e95dfb9b462e9ea13a15635b968bedfd248243df9ecc1bfc1ffcad3e5 434084 
git_1.7.5.4-1.diff.gz
 2623c0deec9221526222f447e927296465d9214881268b8fa97674c7b652d9cc 1954862 
git-doc_1.7.5.4-1_all.deb
 399d5d0bf6d0502a17817f3e5bb3deb733fcbf083838c2e3079ad9e7b6974d76 414104 
git-arch_1.7.5.4-1_all.deb
 4fd8ad85c098ce52ac1bdd25122b73b04a7be5e2116c168c494d45fa803cfeb7 483710 
git-cvs_1.7.5.4-1_all.deb
 d1d950665bb954aa3d69dd67b6f737907613cf5c2a05fed040ca3fb66507ebdc 466062 
git-svn_1.7.5.4-1_all.deb
 e0c5495f809c291d008dcb7e90278663e7cd8dba030502fd8345723db265e1aa 401300 
git-daemon-run_1.7.5.4-1_all.deb
 6a9214cc3366cae502520f113d2282860fbedbfda8d74bcde58f21fb947de68c 419536 
git-email_1.7.5.4-1_all.deb
 9a1aa9d83040ed45a223531412afc15b0ec2fc2f193bf0abe29ab0975c07cc6a 676296 
git-gui_1.7.5.4-1_all.deb
 8918f4d1513459a47fcc910bc49e041edff3c23a58f2ed142a25fc7a4772d674 524918 
gitk_1.7.5.4-1_all.deb
 96f75a174b413f92adc4742e934eb4e4c7e92725408ad33d56baa05c0cba5533 410918 
gitweb_1.7.5.4-1_all.deb
 7902d90e9606d65d46c4cb3395a4bc27ab43e179cfa16da218d1d090c0fcf68b 399568 
git-all_1.7.5.4-1_all.deb
 37e13159f33168dd85327dd2da4229a389cefacea686b01ebd636fbc0801bfda 1328 
git-core_1.7.5.4-1_all.deb
 bb4a4dcaaf3cf74a94ae52fb2e620cd2ad9d463a73a6fdebf1813f5fa35d3a13 423560 
git-el_1.7.5.4-1_all.deb
 b55feedb95ead750113a6a5d4943c7ed7a741653b5ff76e5ecbb6725903225a8 961330 
git-man_1.7.5.4-1_all.deb
Files: 
 4d20f0d065d63bb9c6589c4b80fc59e2 1444 vcs optional git_1.7.5.4-1.dsc
 75f14475fc91fc5c751e1e1bab738ab5 3347228 vcs optional git_1.7.5.4.orig.tar.gz
 cf48ca4bb92da269da328d051e08e7df 434084 vcs optional git_1.7.5.4-1.diff.gz
 c3706771149c077f2112cc048874af66 1954862 doc optional git-doc_1.7.5.4-1_all.deb
 98bfa18c20d6cd0f454dedbdfcf74ebd 414104 vcs optional git-arch_1.7.5.4-1_all.deb
 f72a72d9775139b246bc9dff451c8e9f 483710 vcs optional git-cvs_1.7.5.4-1_all.deb
 07d8bd6171df78d088456e5de023992e 466062 vcs optional git-svn_1.7.5.4-1_all.deb
 00cdabc13b13e8a3fe231161d1b5459b 401300 vcs optional 
git-daemon-run_1.7.5.4-1_all.deb
 277ee3a9f3dce74a03d3a76d6c3a6bc8 419536 vcs optional 
git-email_1.7.5.4-1_all.deb
 dfd7ae957ead01bffb670917991a213a 676296 vcs optional git-gui_1.7.5.4-1_all.deb
 a55eca0cc01913e967626ec9aa97bd88 524918 vcs optional gitk_1.7.5.4-1_all.deb
 2a5b9dc0dd5fe3fa4085beeee4c61aa9 410918 vcs optional gitweb_1.7.5.4-1_all.deb
 b2bc736ecbc286f9da77d0e8b916536c 399568 vcs optional git-all_1.7.5.4-1_all.deb
 56d483d04f88ac4439c143ef37c2c022 1328 vcs optional git-core_1.7.5.4-1_all.deb
 4055a2e12e8e564895e44e4f0031a4e2 423560 vcs optional git-el_1.7.5.4-1_all.deb
 27dcf16a8947be2cf15ad465e8fcee58 961330 doc optional git-man_1.7.5.4-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3x6l8ACgkQGJoyQbxwpv/+8wCgntX6UPCPubTfqathTc24HJC1
pYcAn0okOFwcA9s5/X8eLHRacVH6ASgc
=GHm0
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to