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

Tribler crashes when a segmentation fault on Ubuntu 21.10 #6701

Closed
pdftk opened this issue Jan 3, 2022 · 12 comments · Fixed by #6734
Closed

Tribler crashes when a segmentation fault on Ubuntu 21.10 #6701

pdftk opened this issue Jan 3, 2022 · 12 comments · Fixed by #6734
Assignees
Milestone

Comments

@pdftk
Copy link

pdftk commented Jan 3, 2022

Describe the bug
Tribler does not start. The terminal tells me Speicherzugriffsfehler (Speicherabzug geschrieben). Google translates this to Memory access error (memory dumped)

To Reproduce
Steps to reproduce the behavior:
1.Try starting Tribler in a terminal.
2. See error message

Expected behavior
Start tribler up.

Screenshot
Is attached.

Desktop (please complete the following information):

  • OS: Xubuntu 21.10
  • Tribler's version: 7.11.0

Additional context
Using sudo does not work either.
Bildschirmfoto_2022-01-03_17-00-16

@pdftk pdftk added the type: bug label Jan 3, 2022
@devos50
Copy link
Contributor

devos50 commented Jan 3, 2022

Thanks for your report! On Linux systems, we are logging the output of Tribler to a file in the /tmp directory. Do you see any logs in there with tribler in the name, and if so, could you please share these logs by either posting them here or by sending them to us by email? They might help us to further debug this issue.

@pdftk
Copy link
Author

pdftk commented Jan 3, 2022

marko-tribler-ANiJMCrR.log
Of course.

@devos50
Copy link
Contributor

devos50 commented Jan 4, 2022

I don't see anything suspicious in the logs. I guess that Tribler crashes when it loads the 'core' component since it looks like the GUI manages to (partially) start. I'm not sure if we have tested Tribler on Ubuntu 21.10 but if not, we should and further investigate this. 👍

@devos50
Copy link
Contributor

devos50 commented Jan 4, 2022

I just created a VM with Ubuntu 21.10 and Tribler indeed crashes with a segmentation fault. The stack trace:

Schermafbeelding 2022-01-04 om 10 24 30

@devos50 devos50 changed the title Speicherzugriffsfehler - Segmentation fault Tribler crashes when a segmentation fault on Ubuntu 21.10 Jan 4, 2022
@scribblemaniac
Copy link

I have this issue as well. Wanted to add that while I had this issue with v7.11.0 installed from the deb package, I do not have this issue directly running src/tribler.sh from the v7.11.0 tag. I can't build the package myself so I can't say if that would make a difference.

@devos50
Copy link
Contributor

devos50 commented Jan 14, 2022

@scribblemaniac good to know that running Tribler from source seems to work. Maybe pyinstaller is causing issues, or we are bundling a wrong version of PyQt5. Could you please report the version of Qt5 that you do have installed? You can find this version by running dpkg-query -l | grep -I qt5 in the command line 👍

@xoriole xoriole self-assigned this Jan 14, 2022
@Fuzzillogic
Copy link

Since I have the same issue (but on Kubuntu 21.10), here's my output of dpkg-query -l | grep -I qt5:
qt5-packages.txt

@scribblemaniac
Copy link

Mine has some differences:
qt5-packages.txt

@xoriole
Copy link
Contributor

xoriole commented Jan 19, 2022

Running the core with startup fixes resulted in the following underlying issue on Ubuntu 21.10.

undefined symbol: g_tls_channel_binding_error_quark

Screenshot 2022-01-19 at 11 48 21

tribler
Screenshot from 2022-01-24 15-42-58

@xoriole
Copy link
Contributor

xoriole commented Jan 25, 2022

Updates:

  1. The segmentation fault occurs running the core only (with --core flag) which implies the issue lies on the core and might not be PyQt related.
  2. Tried building a frozen tribler with ipv8 service as starter instead of run_tribler.py, the executable runs fine, see below. This excludes ipv8 as possible cause of the segfault.

ipv8

  1. Next library to check is libtorrent

@xoriole
Copy link
Contributor

xoriole commented Jan 25, 2022

I tried an isolated libtorrent build, it worked fine. Since pyipv8 and libtorrent build both were running, I wondered why the core was failing when running with --core flag. To find that, I created a separate core build that executes the core only without going through run_tribler.py and --core flag. The independent core build actually worked without any segfault.

This implies the following:

  1. Our current mechanism of running core build still references the GUI components (eg. PyQt5) which we should fix.
  2. The segfault is not caused the core and the earlier observation was wrong.

Upon further investigation, I found out that the undefined symbol: g_tls_channel_binding_error_quark of libgiognutls is invoked by the GUI, QSocketNotifier. The cause actually being incomplete support for wayland (which exists on Ubuntu 21.04 +) on Qt build where our build only included support for QT_QPA_PLATFORM=xcb so far. So, fixing the support for wayland should fix the issue.

@drew2a
Copy link
Contributor

drew2a commented Jan 26, 2022

Our current mechanism of running core build still references the GUI components (eg. PyQt5) which we should fix.

I know two places that reference PyQt5:

  1. from PyQt5.QtWidgets import QApplication, QMessageBox
  2. from PyQt5.QtWidgets import QApplication, QMessageBox

Both of them use local import that triggers only in case of rare Tribler errors.

It is not clear what exactly should we fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

6 participants