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

nicotine-plus crashes on launch, potentially due to a libffi change breaking pygobject3 #84905

Closed
2 tasks done
ianh opened this issue Sep 9, 2021 · 5 comments
Closed
2 tasks done
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity

Comments

@ianh
Copy link

ianh commented Sep 9, 2021

brew gist-logs <formula> link OR brew config AND brew doctor output

`brew gist-logs` simply prints `Error: No logs.`, so here are the other commands:

brew config:

HOMEBREW_VERSION: 3.2.11
ORIGIN: https://github.com/Homebrew/brew
HEAD: 84f4fbf3cf5e83d33de0b28b2658fcb50aaa761e
Last commit: 2 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c922d9d577f4185da948a0961e43690ce35fa05d
Core tap last commit: 54 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.2IhNBVLQpT/org.xquartz:0
HOMEBREW_MAKE_JOBS: 8
HOMEBREW_NO_ANALYTICS: set
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 12.0.5 build 1205
Git: 2.30.1 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.3-arm64
CLT: 12.5.0.0.1.1617976050
Xcode: 12.5
Rosetta 2: false

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  ilmbase

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libcrypto.1.1.dylib
  /usr/local/lib/libonig.5.dylib
  /usr/local/lib/libssl.1.1.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/oniggnu.h
  /usr/local/include/oniguruma.h
  /usr/local/include/openssl/aes.h
  /usr/local/include/openssl/asn1.h
  /usr/local/include/openssl/asn1_mac.h
  /usr/local/include/openssl/asn1err.h
  /usr/local/include/openssl/asn1t.h
  /usr/local/include/openssl/async.h
  /usr/local/include/openssl/asyncerr.h
  /usr/local/include/openssl/bio.h
  /usr/local/include/openssl/bioerr.h
  /usr/local/include/openssl/blowfish.h
  /usr/local/include/openssl/bn.h
  /usr/local/include/openssl/bnerr.h
  /usr/local/include/openssl/buffer.h
  /usr/local/include/openssl/buffererr.h
  /usr/local/include/openssl/camellia.h
  /usr/local/include/openssl/cast.h
  /usr/local/include/openssl/cmac.h
  /usr/local/include/openssl/cms.h
  /usr/local/include/openssl/cmserr.h
  /usr/local/include/openssl/comp.h
  /usr/local/include/openssl/comperr.h
  /usr/local/include/openssl/conf.h
  /usr/local/include/openssl/conf_api.h
  /usr/local/include/openssl/conferr.h
  /usr/local/include/openssl/crypto.h
  /usr/local/include/openssl/cryptoerr.h
  /usr/local/include/openssl/ct.h
  /usr/local/include/openssl/cterr.h
  /usr/local/include/openssl/des.h
  /usr/local/include/openssl/dh.h
  /usr/local/include/openssl/dherr.h
  /usr/local/include/openssl/dsa.h
  /usr/local/include/openssl/dsaerr.h
  /usr/local/include/openssl/dtls1.h
  /usr/local/include/openssl/e_os2.h
  /usr/local/include/openssl/ebcdic.h
  /usr/local/include/openssl/ec.h
  /usr/local/include/openssl/ecdh.h
  /usr/local/include/openssl/ecdsa.h
  /usr/local/include/openssl/ecerr.h
  /usr/local/include/openssl/engine.h
  /usr/local/include/openssl/engineerr.h
  /usr/local/include/openssl/err.h
  /usr/local/include/openssl/evp.h
  /usr/local/include/openssl/evperr.h
  /usr/local/include/openssl/hmac.h
  /usr/local/include/openssl/idea.h
  /usr/local/include/openssl/kdf.h
  /usr/local/include/openssl/kdferr.h
  /usr/local/include/openssl/lhash.h
  /usr/local/include/openssl/md2.h
  /usr/local/include/openssl/md4.h
  /usr/local/include/openssl/md5.h
  /usr/local/include/openssl/mdc2.h
  /usr/local/include/openssl/modes.h
  /usr/local/include/openssl/obj_mac.h
  /usr/local/include/openssl/objects.h
  /usr/local/include/openssl/objectserr.h
  /usr/local/include/openssl/ocsp.h
  /usr/local/include/openssl/ocsperr.h
  /usr/local/include/openssl/opensslconf.h
  /usr/local/include/openssl/opensslv.h
  /usr/local/include/openssl/ossl_typ.h
  /usr/local/include/openssl/pem.h
  /usr/local/include/openssl/pem2.h
  /usr/local/include/openssl/pemerr.h
  /usr/local/include/openssl/pkcs12.h
  /usr/local/include/openssl/pkcs12err.h
  /usr/local/include/openssl/pkcs7.h
  /usr/local/include/openssl/pkcs7err.h
  /usr/local/include/openssl/rand.h
  /usr/local/include/openssl/rand_drbg.h
  /usr/local/include/openssl/randerr.h
  /usr/local/include/openssl/rc2.h
  /usr/local/include/openssl/rc4.h
  /usr/local/include/openssl/rc5.h
  /usr/local/include/openssl/ripemd.h
  /usr/local/include/openssl/rsa.h
  /usr/local/include/openssl/rsaerr.h
  /usr/local/include/openssl/safestack.h
  /usr/local/include/openssl/seed.h
  /usr/local/include/openssl/sha.h
  /usr/local/include/openssl/srp.h
  /usr/local/include/openssl/srtp.h
  /usr/local/include/openssl/ssl.h
  /usr/local/include/openssl/ssl2.h
  /usr/local/include/openssl/ssl3.h
  /usr/local/include/openssl/sslerr.h
  /usr/local/include/openssl/stack.h
  /usr/local/include/openssl/store.h
  /usr/local/include/openssl/storeerr.h
  /usr/local/include/openssl/symhacks.h
  /usr/local/include/openssl/tls1.h
  /usr/local/include/openssl/ts.h
  /usr/local/include/openssl/tserr.h
  /usr/local/include/openssl/txt_db.h
  /usr/local/include/openssl/ui.h
  /usr/local/include/openssl/uierr.h
  /usr/local/include/openssl/whrlpool.h
  /usr/local/include/openssl/x509.h
  /usr/local/include/openssl/x509_vfy.h
  /usr/local/include/openssl/x509err.h
  /usr/local/include/openssl/x509v3.h
  /usr/local/include/openssl/x509v3err.h

Warning: Unbrewed '.la' files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.la' files:
  /usr/local/lib/libonig.la

Warning: Unbrewed '.pc' files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected '.pc' files:
  /usr/local/lib/pkgconfig/libcrypto.pc
  /usr/local/lib/pkgconfig/libssl.pc
  /usr/local/lib/pkgconfig/oniguruma.pc
  /usr/local/lib/pkgconfig/openssl.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libcrypto.a
  /usr/local/lib/libonig.a
  /usr/local/lib/libssl.a

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  imath
  openexr
  py3cairo

Warning: Homebrew's "sbin" was not found in your PATH but you have installed
formulae that put executables in /opt/homebrew/sbin.
Consider setting your PATH for example like so:
  echo 'export PATH="/opt/homebrew/sbin:$PATH"' >> ~/.zshrc

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

run the nicotine-plus package like this: brew install nicotine-plus && nicotine

What happened (include all command output)?

The command segfaults:
zsh: segmentation fault nicotine

Here is the full crash log: Python_2021-09-08-220734_Ians-MacBook-Air.crash.txt

Adding import faulthandler; faulthandler.enable() to a local checkout of the nicotine repository prints the following backtrace:

Current thread 0x0000000105197d40 (most recent call first):
  File "/opt/homebrew/lib/python3.9/site-packages/gi/overrides/Gtk.py", line 481 in connect_signals
  File "/Users/ianh/Desktop/nicotine-plus/pynicotine/gtkgui/utils.py", line 61 in load_ui_elements
  File "/Users/ianh/Desktop/nicotine-plus/pynicotine/gtkgui/frame.py", line 113 in __init__
  File "/Users/ianh/Desktop/nicotine-plus/pynicotine/gtkgui/frame.py", line 2727 in do_activate
  File "/opt/homebrew/lib/python3.9/site-packages/gi/overrides/Gio.py", line 42 in run
  File "/Users/ianh/Desktop/nicotine-plus/pynicotine/gtkgui/__init__.py", line 59 in run_gui
  File "/Users/ianh/Desktop/nicotine-plus/pynicotine/__init__.py", line 232 in run
  File "/Users/ianh/Desktop/nicotine-plus/./nicotine", line 26 in <module>

From searching the web for the crashing address, I found this bug report in pygobject: https://gitlab.gnome.org/GNOME/pygobject/-/issues/455 -- apparently the crash was caused by a change in libffi. The libffi project posted a workaround here libffi/libffi#647. It seems possible that this issue could be resolved by passing --disable-exec-static-tramp to configure for the libffi formula.

What did you expect to happen?

The program to launch successfully.

Step-by-step reproduction instructions (by running brew commands)

Run `brew install nicotine-plus && nicotine`.
@ianh ianh added the bug Reproducible Homebrew/homebrew-core bug label Sep 9, 2021
@ianh
Copy link
Author

ianh commented Sep 9, 2021

BTW, I apologize for checking the "I have resolved all warnings from brew doctor and that did not fix my problem." checkbox despite not doing this. If resolving the warnings really is required, please remove this issue and I will put my energy into working around the problem myself instead. Thanks for taking a look in any case.

@ianh
Copy link
Author

ianh commented Sep 9, 2021

Oh, actually, it looks like that issue was introduced in libffi 3.4, whereas homebrew has libffi 3.3. So I'm not sure why the exact same crash is happening here.

@ianh ianh changed the title nicotine-plus crashes on launch due to libffi change breaking pygobject3 nicotine-plus crashes on launch, potentially due to a libffi change breaking pygobject3 Sep 9, 2021
@carlocab
Copy link
Member

carlocab commented Sep 9, 2021

It seems possible that this issue could be resolved by passing --disable-exec-static-tramp to configure for the libffi formula.

Does rebuilding nicotine-plus with this flag fix the issue you're seeing?

Oh, actually, it looks like that issue was introduced in libffi 3.4, whereas homebrew has libffi 3.3. So I'm not sure why the exact same crash is happening here.

Asking upstream this might help.

@ianh
Copy link
Author

ianh commented Sep 9, 2021

Does rebuilding nicotine-plus with this flag fix the issue you're seeing?

I configured/installed libffi with that flag (by editing the formula and doing homebrew reinstall --build-from-source), but running nicotine still crashes. So it seems like it won't be that easy.

Asking upstream this might help.

Done: https://gitlab.gnome.org/GNOME/pygobject/-/issues/455#note_1266038

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Sep 30, 2021
@github-actions github-actions bot closed this as completed Oct 7, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 7, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Reproducible Homebrew/homebrew-core bug outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

2 participants