Brew: Brew hangs

Created on 20 Sep 2018  路  8Comments  路  Source: Homebrew/brew

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • [x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
  • [x] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new/choose. If it's a brew cask problem please file this issue at https://github.com/Homebrew/homebrew-cask/issues/new/choose. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
  • [x] ran brew update and can still reproduce the problem?
  • [x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [x] ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

  • What you were trying to do (and why)
    tried to update my installed packages with brew upgrade
  • What happened (include command output)
    brew started normally and then jus hagged
  • What you expected to happen
    Brew to run till completion and upgrade my packages
  • Step-by-step reproduction instructions (by running brew commands)

Brew is hanging for with with the either of the following commands:

brew upgrade
brew cleanup
brew doctor

I hooked onto the brew process using dtruss and found this error message continuously repeating:

dtrace: error on enabled probe ID 2188 (ID 990: syscall::pread_nocancel:return): invalid kernel access in action #12 at DIF offset 20

This is the output of brew config

HOMEBREW_VERSION: 1.7.5
ORIGIN: https://github.com/Homebrew/brew
HEAD: d639559c4de48faad79d3ecb1ec84dc851ea66f2
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 84b22c745c58fed15bc8d65320ce853cb58de1a8
Core tap last commit: 36 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GIT: git
HOMEBREW_VISUAL: vim
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.19.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 10.0.2
macOS: 10.13.6-x86_64
CLT: 10.0.0.0.1.1535735448
CLT headers: N/A
Xcode: N/A
XQuartz: N/A
outdated

Most helpful comment

I've left it for hours the first time I've ran into this problem.

mv /Users/ldavim/Library/Caches/Homebrew/linkage.db /Users/ldavim/Library/Caches/Homebrew/linkage.db.back

seems to have fixed the problem.

All 8 comments

This has been fixed and this will be fixed for you when 17.6 is released.

@MikeMcQuaid I've upgraded to 1.7.6 and I still have this issue.

$ brew config
HOMEBREW_VERSION: 1.7.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: f239b7a62790cfb4f33bda9aab7597d43f1b1e3b
Last commit: 13 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 4ba5999b3d4d02c415eaa9b382f0cd212cddab0e
Core tap last commit: 14 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GIT: git
HOMEBREW_MACOS_VERSION_NUMERIC: 101306
HOMEBREW_VISUAL: vim
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.19.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 10.0.2
macOS: 10.13.6-x86_64
CLT: 10.0.0.0.1.1535735448
CLT headers: N/A
Xcode: N/A
XQuartz: N/A
dtrace: error on enabled probe ID 2188 (ID 990: syscall::pread_nocancel:return): invalid kernel access in action #12 at DIF offset 20

@luisdavim Instead of dtrace can I see the output of brew doctor --verbose --debug?

@luisdavim How long does it hang there for? Can you wait for at least 5 minutes and see if it unfreezes at all? Please also run pkill -9 ruby before you do so. Thanks!

I've left it for hours the first time I've ran into this problem.

mv /Users/ldavim/Library/Caches/Homebrew/linkage.db /Users/ldavim/Library/Caches/Homebrew/linkage.db.back

seems to have fixed the problem.

@luisdavim I'm interested in you leaving it now rather than the first time (as the Homebrew code has changed). Glad you have the problem fixed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MikeMcQuaid picture MikeMcQuaid  路  3Comments

hktalent picture hktalent  路  4Comments

rtobrien picture rtobrien  路  3Comments

fxcoudert picture fxcoudert  路  3Comments

paanvaannd picture paanvaannd  路  4Comments