Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/cmd/goimports: infinite loop scanning standard library #31579

Closed
rsc opened this issue Apr 20, 2019 · 1 comment
Closed

x/tools/cmd/goimports: infinite loop scanning standard library #31579

rsc opened this issue Apr 20, 2019 · 1 comment
Milestone

Comments

@rsc
Copy link
Contributor

@rsc rsc commented Apr 20, 2019

Twice today I've seen a recently-compiled goimports spin off into using 1000+% CPU for minutes.
Specifically, I am using goimports from x/tools 4796d4b:

$ goversion -m $(which goimports)
/Users/rsc/bin/goimports devel +ad9692026b Fri Apr 12 10:24:28 2019 -0400
	path  golang.org/x/tools/cmd/goimports
	mod   golang.org/x/tools                v0.0.0-20190418235243-4796d4bd3df0
$ 

The first time I did kill -ABRT and found it was doing lots of file system scans,
which seemed not specific enough to file a report.
The second time I guessed it was the same and did lsof a few times.
It was scanning the standard library, repeatedly:

r$ lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc    8r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   20r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   26r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc    8r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   16r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   20r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   25r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   26r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc    8r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13                                                 vnode: FD unavailable
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   16r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   20r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24                                                 vnode: FD unavailable
goimports 59507  rsc   25r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   26r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   16r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   20r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc    8r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   16r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   20r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   25r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   26r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    8r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   16r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   20r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   25                                                 vnode: FD unavailable
goimports 59507  rsc   26r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc    8r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   16r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   20r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   25r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   26r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc    8r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   16r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   20r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
r$ !!
lsof -p 59507
!COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc    8r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   16r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   20r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   25                                                 vnode: FD unavailable
goimports 59507  rsc   26r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc    8r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   16                                                 vnode: FD unavailable
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   20r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24                                                 vnode: FD unavailable
goimports 59507  rsc   25r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   26r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc    8r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   16r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   20r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   25r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   26                                                 vnode: FD unavailable
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc    8r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13                                                 vnode: FD unavailable
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15                                                 vnode: FD unavailable
goimports 59507  rsc   16r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   20r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   26r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc    8r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   16r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   20r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   26r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4       2336  2014854 /Users/rsc/go/src
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc    8r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15                                                 vnode: FD unavailable
goimports 59507  rsc   16r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   20r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   26r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc    8r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   16r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   20r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   24r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   25                                                 vnode: FD unavailable
goimports 59507  rsc   26                                                 vnode: FD unavailable
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
r$ !!
lsof -p 59507
COMMAND     PID USER   FD     TYPE             DEVICE   SIZE/OFF     NODE NAME
goimports 59507  rsc  cwd      DIR                1,4       3712   691285 /Users/rsc
goimports 59507  rsc  txt      REG                1,4    7802624 22025659 /Users/rsc/bin/goimports
goimports 59507  rsc  txt      REG                1,4     841456   647449 /usr/lib/dyld
goimports 59507  rsc  txt      REG                1,4 1177030656 19448266 /private/var/db/dyld/dyld_shared_cache_x86_64h
goimports 59507  rsc    0r     CHR                3,2        0t0      308 /dev/null
goimports 59507  rsc    1     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    2     PIPE 0x951377e0143cea19      16384          ->0x951377e0143cf859
goimports 59507  rsc    3r     REG                1,4      16434 22048881 /Users/rsc/src/golang.org/x/exp/notary/internal/sumweb/client.go
goimports 59507  rsc    4r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    5u  KQUEUE                                        count=0, state=0xa
goimports 59507  rsc    6r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc    7r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc    8r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc    9r     DIR                1,4        512  2020954 /Users/rsc/go/src/strings
goimports 59507  rsc   10r     DIR                1,4        448  2018270 /Users/rsc/go/src/go
goimports 59507  rsc   11r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   12r     DIR                1,4       6240  2019147 /Users/rsc/go/src/net
goimports 59507  rsc   13r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   14r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   15r     DIR                1,4       2336  2014854 /Users/rsc/go/src
goimports 59507  rsc   16r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   17r     DIR                1,4        256  2015206 /Users/rsc/go/src/bufio
goimports 59507  rsc   18r     DIR                1,4        224  2018267 /Users/rsc/go/src/flag
goimports 59507  rsc   19r     DIR                1,4        704  2017875 /Users/rsc/go/src/crypto
goimports 59507  rsc   21r     DIR                1,4        256  2017874 /Users/rsc/go/src/context
goimports 59507  rsc   22r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   23r     DIR                1,4        832  2015210 /Users/rsc/go/src/cmd
goimports 59507  rsc   25r     DIR                1,4        256  2017504 /Users/rsc/go/src/compress
goimports 59507  rsc   26r     DIR                1,4        928  2020952 /Users/rsc/go/src/strconv
goimports 59507  rsc   27r     DIR                1,4        448  2019860 /Users/rsc/go/src/regexp
goimports 59507  rsc   28                                                 vnode: FD unavailable
r$ 

You can see all the file descriptors ≥ 7 are getting recycled quickly.

Then I sent it an ABRT and got this dump:

SIGABRT: abort
PC=0x7fff5bf44a16 m=0 sigcode=0

goroutine 0 [idle]:
runtime.pthread_cond_wait(0x159b768, 0x159b728, 0x7ffe00000000)
	/Users/rsc/go/src/runtime/sys_darwin.go:368 +0x39
runtime.semasleep(0xffffffffffffffff, 0x0)
	/Users/rsc/go/src/runtime/os_darwin.go:63 +0x85
runtime.notesleep(0x159b528)
	/Users/rsc/go/src/runtime/lock_sema.go:167 +0xe0
runtime.stopm()
	/Users/rsc/go/src/runtime/proc.go:1925 +0xc1
runtime.findrunnable(0xc000036f00, 0x0)
	/Users/rsc/go/src/runtime/proc.go:2388 +0x546
runtime.schedule()
	/Users/rsc/go/src/runtime/proc.go:2514 +0x21b
runtime.park_m(0xc0000c4900)
	/Users/rsc/go/src/runtime/proc.go:2594 +0xa1
runtime.mcall(0x1058a06)
	/Users/rsc/go/src/runtime/asm_amd64.s:312 +0x5b

goroutine 1 [runnable]:
golang.org/x/tools/internal/fastwalk.Walk(0xc0000de860, 0x11, 0xc0001f8310, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:93 +0x3c2
golang.org/x/tools/internal/gopathwalk.walkDir(0xc0000de860, 0x11, 0x1, 0xc0001fe600, 0x12e0100)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/gopathwalk/walk.go:83 +0x1e0
golang.org/x/tools/internal/gopathwalk.Walk(0xc0001fe5a0, 0x2, 0x2, 0xc0001fe600, 0x100)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/gopathwalk/walk.go:63 +0x88
golang.org/x/tools/imports.(*moduleResolver).scan(0xc0001e3860, 0xc0001e7f80, 0xc0001e3860, 0xc00019f9e0, 0x0, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/imports/mod.go:226 +0x348
golang.org/x/tools/imports.addExternalCandidates(0xc0000ca240, 0xc0001e7f80, 0x7ffeefbff822, 0x40, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/imports/fix.go:683 +0x73
golang.org/x/tools/imports.fixImportsDefault(0xc00015a080, 0xc000172a80, 0x7ffeefbff822, 0x40, 0xc000172000, 0x7e00, 0x157daa0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/imports/fix.go:504 +0x2f9
golang.org/x/tools/imports.process(0x7ffeefbff822, 0x40, 0xc00016a000, 0x3f61, 0x7e00, 0x157daa0, 0xc000172000, 0xc00016a000, 0x3f61, 0x7e00, ...)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/imports/imports.go:72 +0x739
golang.org/x/tools/imports.Process(0x7ffeefbff822, 0x40, 0xc00016a000, 0x3f61, 0x7e00, 0x157daa0, 0x0, 0x0, 0xc000000180, 0x200000003, ...)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/imports/imports.go:50 +0xcc
main.processFile(0x7ffeefbff822, 0x40, 0x0, 0x0, 0x138e700, 0xc000086008, 0x1, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/cmd/goimports/goimports.go:136 +0x13c
main.gofmtMain()
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/cmd/goimports/goimports.go:280 +0x230
main.main()
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/cmd/goimports/goimports.go:196 +0x33

goroutine 37 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x18, 0x0, 0x0, 0x4400000, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x18, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x17, 0xc00031fe18, 0x2000, 0x2000, 0xc00031fd68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x17, 0xc00031fe18, 0x2000, 0x2000, 0xc080000000, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e340, 0x15, 0xc000321e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e340, 0x15, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 38 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0xf, 0x0, 0x0, 0x67000a0, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0xf, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x1b, 0xc00032de18, 0x2000, 0x2000, 0xc00032dd68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x1b, 0xc00032de18, 0x2000, 0x2000, 0xc074548220, 0xc, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e4c0, 0x18, 0xc00032fe88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e4c0, 0x18, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 39 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x1a, 0x0, 0x0, 0x6500000, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x1a, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x4, 0xc000199e18, 0x2000, 0x2000, 0xc000199d68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x4, 0xc000199e18, 0x2000, 0x2000, 0xc074544555, 0x7, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc0000de860, 0x11, 0xc00019be88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc0000de860, 0x11, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 40 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x8, 0x0, 0x0, 0x6700000, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x8, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x6, 0xc000285e18, 0x2000, 0x2000, 0xc000285d68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x6, 0xc000285e18, 0x2000, 0x2000, 0xc080000000, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e3c0, 0x18, 0xc000287e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e3c0, 0x18, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 41 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x10, 0x0, 0x0, 0x1702810, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x10, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x16, 0xc000323e18, 0x2000, 0x2000, 0xc000323d68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x16, 0xc000323e18, 0x2000, 0x2000, 0xc080000000, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e3e0, 0x1a, 0xc000325e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e3e0, 0x1a, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 42 [runnable]:
syscall.syscall(0x10ba190, 0x6400000, 0xc0003118e0, 0xc000311cf8, 0x0, 0x20000000200, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:63 +0x2e
syscall.readdir_r(0x6400000, 0xc0003118e0, 0xc000311cf8, 0x0)
	/Users/rsc/go/src/syscall/zsyscall_darwin_amd64.go:1273 +0x68
syscall.Getdirentries(0x12, 0xc000311e38, 0x1fe0, 0x1fe0, 0xc000311d68, 0x20, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:397 +0x1a6
syscall.ReadDirent(0x12, 0xc000311e18, 0x2000, 0x2000, 0xc0744e1380, 0x15, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e400, 0x16, 0xc000313e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e400, 0x16, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 43 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0xd, 0x0, 0x0, 0x65000a0, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0xd, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x9, 0xc0002dfe18, 0x2000, 0x2000, 0xc0002dfd68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x9, 0xc0002dfe18, 0x2000, 0x2000, 0xc074544690, 0xf, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e440, 0x19, 0xc0002e1e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e440, 0x19, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 44 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x13, 0x0, 0x0, 0x6200000, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x13, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0xa, 0xc000281e18, 0x2000, 0x2000, 0xc000281d68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0xa, 0xc000281e18, 0x2000, 0x2000, 0xc080000000, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e480, 0x14, 0xc000283e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e480, 0x14, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 45 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x19, 0x0, 0x0, 0x65001e0, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x19, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0xe, 0xc0002f3e18, 0x2000, 0x2000, 0xc0002f3d68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0xe, 0xc0002f3e18, 0x2000, 0x2000, 0xc074548167, 0x3, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e420, 0x19, 0xc0002f5e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e420, 0x19, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 46 [runnable]:
syscall.syscallPtr(0x10b9fa0, 0x1c, 0x0, 0x0, 0x6300000, 0x0, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:96 +0x2e
syscall.fdopendir(0x1c, 0x1312035, 0x1, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin_amd64.go:62 +0x4d
syscall.Getdirentries(0x15, 0xc00030de18, 0x2000, 0x2000, 0xc00030dd68, 0x0, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:381 +0xb6
syscall.ReadDirent(0x15, 0xc00030de18, 0x2000, 0x2000, 0xc07453dfe0, 0x11, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e4a0, 0x19, 0xc00030fe88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e4a0, 0x19, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 47 [runnable]:
syscall.syscall(0x10ba190, 0x6600000, 0xc0002e38e0, 0xc0002e3cf8, 0x0, 0x610000006100, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:63 +0x2e
syscall.readdir_r(0x6600000, 0xc0002e38e0, 0xc0002e3cf8, 0x0)
	/Users/rsc/go/src/syscall/zsyscall_darwin_amd64.go:1273 +0x68
syscall.Getdirentries(0xc, 0xc0002e4e18, 0x1000, 0x1000, 0xc0002e3d68, 0x1000, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:397 +0x1a6
syscall.ReadDirent(0xc, 0xc0002e3e18, 0x2000, 0x2000, 0xc074540b20, 0x12, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e460, 0x15, 0xc0002e5e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e460, 0x15, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

goroutine 48 [runnable]:
syscall.syscall(0x10ba190, 0x64000a0, 0xc0002ef8e0, 0xc0002efcf8, 0x0, 0x50000000500, 0x0)
	/Users/rsc/go/src/runtime/sys_darwin.go:63 +0x2e
syscall.readdir_r(0x64000a0, 0xc0002ef8e0, 0xc0002efcf8, 0x0)
	/Users/rsc/go/src/syscall/zsyscall_darwin_amd64.go:1273 +0x68
syscall.Getdirentries(0x11, 0xc0002efea8, 0x1f70, 0x1f70, 0xc0002efd68, 0x90, 0x0, 0x0)
	/Users/rsc/go/src/syscall/syscall_darwin.go:397 +0x1a6
syscall.ReadDirent(0x11, 0xc0002efe18, 0x2000, 0x2000, 0xc0745445b0, 0xc, 0x0)
	/Users/rsc/go/src/syscall/syscall_bsd.go:71 +0x5c
golang.org/x/tools/internal/fastwalk.readDir(0xc00017e380, 0x17, 0xc0002f1e88, 0x0, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk_unix.go:38 +0x41b
golang.org/x/tools/internal/fastwalk.(*walker).walk(0xc0001fe630, 0xc00017e380, 0x17, 0x1, 0x1, 0x0)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:195 +0x6a
golang.org/x/tools/internal/fastwalk.(*walker).doWork(0xc0001fe630, 0xc00009b370)
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:134 +0x14d
created by golang.org/x/tools/internal/fastwalk.Walk
	/Users/rsc/pkg/mod/golang.org/x/tools@v0.0.0-20190418235243-4796d4bd3df0/internal/fastwalk/fastwalk.go:81 +0x21c

rax    0x104
rbx    0x7d79b00
rcx    0x7ffeefbff268
rdx    0x7d79b00
rdi    0x159b768
rsi    0x7d79b0107d79c00
rbp    0x7ffeefbff300
rsp    0x7ffeefbff268
r8     0x0
r9     0x60
r10    0x0
r11    0x202
r12    0x159b768
r13    0x7ffeefbff288
r14    0x1
r15    0x7fff94495380
rip    0x7fff5bf44a16
rflags 0x203
cs     0x7
fs     0x0
gs     0x0

I am not sure why it is scanning the standard library repeatedly in addExternalCandidates (as opposed to say addStdlibCandidates) but bugs are bugs.

/cc @ianthehat

@rsc rsc added this to the Go1.13 milestone Apr 20, 2019
@rsc
Copy link
Contributor Author

@rsc rsc commented Apr 20, 2019

Bug in package syscall (!!!). Duplicate of #31368. Fixed by recompiling with latest go tree.

@rsc rsc closed this Apr 20, 2019
@golang golang locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.