[Bug 191089] New: ports-mgmt/pkg: If the sshd process is killed before 'pkg ssh' quits pkg will not terminate and consume 100% CPU

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 16 18:16:35 UTC 2014


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 at FreeBSD.org
          Reporter: dereks at 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 at 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.


More information about the freebsd-ports-bugs mailing list