Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2580

svn+ssh SIGKILLs ssh processes (causing problems for OpenSSH connection multiplexing)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • trunk
    • 1.6.9
    • libsvn_ra_svn
    • None

    Description

      As discussed [1]:
      svn+ssh breaks with ControlSocket Quest (2005-11-04 21:52:58 CET)
      and here [2]:
      kill(pid_of_ssh, SIGKILL) is rude Alan Barrett (2006-03-21 16:34:40 CET)
      
      the subversion killing of the ssh process has the following deficiencies:
      - ssh fails to cleanup sockets [3]
      - further ssh commands will fail [4]
      
      The code in subversion/libsvn_ra_svn/client.c indicates:
         *   - Closing the pipes and waiting for the process to die
         *     was prone to mysterious hangs which are difficult to
         *     diagnose (e.g. svnserve dumps core due to unrelated bug;
         *     sshd goes into zombie state; ssh connection is never
         *     closed; ssh never terminates).
         *   - Killing the tunnel agent with SIGTERM leads to unsightly
         *     stderr output from ssh.
      
      The attach patch as suggested by Darren Tucker ([3] comment 10) and 
      impliemented bug Damien Miller ([3] comment 13) keeps the SIGTERM and adds 
      the -q option to ssh to keep the "unsightly stderr" from interfering with svn.
      
      I have tested this patch against the subversion-1.3.1 in Gentoo and it 
      functions correctly (as illistrated by attached straces).
      
      [1] Mentioned here http://svn.haxx.se/users/archive-2005-11/0186.shtml
      [2] Mentioned here http://svn.haxx.se/dev/archive-2006-03/0984.shtml
      [3] Incorrectly attributed ssh bug 
      https://bugzilla.mindrot.org/show_bug.cgi?id=1208
      [4] Debian Bug http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335528
      

      Original issue reported by danielblack

      Attachments

        1. 5_client.c-patch_v2
          4 kB
          Kyle J. McKay
        2. 4_client.c-patch
          4 kB
          Kyle J. McKay
        3. 3_svn1.strace.20572
          39 kB
          Subversion Importer
        4. 2_svn1.strace
          35 kB
          Subversion Importer
        5. 1_svn1.diff
          0.9 kB
          Subversion Importer

        Activity

          People

            Unassigned Unassigned
            subversion-importer Subversion Importer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: