From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 16 18:16:35 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 644E358B for ; Mon, 16 Jun 2014 18:16:35 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 310742D6B for ; Mon, 16 Jun 2014 18:16:35 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s5GIGZlU052172 for ; Mon, 16 Jun 2014 19:16:35 +0100 (BST) (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 191089] New: ports-mgmt/pkg: If the sshd process is killed before 'pkg ssh' quits pkg will not terminate and consume 100% CPU Date: Mon, 16 Jun 2014 18:16:35 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: dereks@lifeofadishwasher.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2014 18:16:35 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191089 Bug ID: 191089 Summary: ports-mgmt/pkg: If the sshd process is killed before 'pkg ssh' quits pkg will not terminate and consume 100% CPU Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: dereks@lifeofadishwasher.com When using an ssh://host/path repo location an ssh connection is created to the host and 'pkg ssh' is executed. If the sshd process is killed/timeouts/brokenpipe the pkg process on the host is not terminated and consumes 100% CPU. The below was tested by manually killing the sshd process however I've seen the same results when the connection was broken with a broken pipe message on the client. ################################################# Reproduce: Client: 1) Execute a pkg command that connects to the host and prompts the user for input (pkg upgrade) 2) On the host kill the sshd process related to the 'pkg ssh' process 3) See 'pkg ssh' didn't die and now consumes 100% CPU client$ pkg -v 1.2.7_3 client# pkg upgrade Updating repository catalogue .... The upgrade will require 4 MB more space 24 MB to be downloaded Proceed with upgrading packages [y/N]: ------------ Host: host$ pkg -v 1.2.7_3 host$ ps aux | grep pkgrepo ... pkgrepo 83886 0.0 0.0 65484 7336 - I 1:56PM 0:00.01 sshd: pkgrepo@notty (sshd) pkgrepo 83887 0.0 0.0 53032 7600 - Is 1:56PM 0:00.02 /usr/local/sbin/pkg ssh ... host# kill 83886 output from top: 83887 pkgrepo 1 94 0 53032K 7600K CPU0 0 0:14 75.98% /usr/local/sbin/pkg ssh ... 83887 pkgrepo 1 103 0 53032K 7600K CPU2 2 0:51 100.00% /usr/local/sbin/pkg ssh ... 83887 pkgrepo 1 103 0 53032K 7600K CPU2 2 1:03 100.00% /usr/local/sbin/pkg ssh ################################################# Expected: 'pkg ssh' process would terminate if the ssh connection is lost. -- You are receiving this mail because: You are the assignee for the bug.