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

Segfault message #1408

Closed
Yalman opened this issue Aug 29, 2021 · 4 comments
Closed

Segfault message #1408

Yalman opened this issue Aug 29, 2021 · 4 comments
Labels

Comments

@Yalman
Copy link

Yalman commented Aug 29, 2021

Hello,

i received a Segfault Message in Kernellog with dmesg. But the Program seems work.

onionshare-gui[8974]: segfault at 8f7320 ip 00000000008f7320 sp 00007fffb156b438 error 15 in python3.9[8f4000+47000]
[  +0,000046] Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 <1c> 00 00 00 00 00 00 00 a0 6d 90 00 00 00 00 00 00 00 00 00 00 00

$ uname -a
Linux HOSTNAME 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux

$ cat /etc/debian_version
11.0

$ dpkg -l |grep python|awk '{print $2,$3,$4}'|column -t

libpython2.7-minimal:amd64          2.7.18-8              amd64
libpython2.7-stdlib:amd64           2.7.18-8              amd64
libpython3-stdlib:amd64             3.9.2-3               amd64
libpython3.7-minimal:amd64          3.7.3-2+deb10u3       amd64
libpython3.9:amd64                  3.9.2-1               amd64
libpython3.9-minimal:amd64          3.9.2-1               amd64
libpython3.9-stdlib:amd64           3.9.2-1               amd64
libreoffice-script-provider-python  1:7.0.4-4             all
python                              2.7.16-1              amd64
python-apt-common                   2.2.1                 all
python-matplotlib2-data             2.2.3-6               all
python-pygments                     2.3.1+dfsg-1+deb10u2  all
python-tinycss2-common              1.0.2-1               all
python2.7                           2.7.18-8              amd64
python2.7-minimal                   2.7.18-8              amd64
python3                             3.9.2-3               amd64
python3-appdirs                     1.4.4-1               all
python3-apt                         2.2.1                 amd64
python3-arcus:amd64                 4.8-1+b1              amd64
python3-blinker                     1.4+dfsg1-0.3         all
python3-bs4                         4.9.3-1               all
python3-bsddb3                      6.2.9-1               amd64
python3-cairo:amd64                 1.16.2-4+b2           amd64
python3-cairocffi                   1.2.0-1               all
python3-cairosvg                    2.5.0-1.1             all
python3-certifi                     2020.6.20-1           all
python3-cffi                        1.14.5-1              all
python3-cffi-backend:amd64          1.14.5-1              amd64
python3-chardet                     4.0.0-1               all
python3-charon                      4.8-1                 all
python3-click                       7.1.2-1               all
python3-colorama                    0.4.4-1               all
python3-cryptography                3.3.2-1               amd64
python3-cssselect2                  0.3.0-1               all
python3-cups:amd64                  2.0.1-4+b1            amd64
python3-cupshelpers                 1.5.14-1              all
python3-dateutil                    2.8.1-6               all
python3-dbus                        1.2.16-5              amd64
python3-debconf                     1.5.77                all
python3-debian                      0.1.39                all
python3-debianbts                   3.1.0                 all
python3-decorator                   4.4.2-2               all
python3-defusedxml                  0.6.0-2               all
python3-distro                      1.5.0-1               all
python3-distro-info                 1.0                   all
python3-distutils                   3.9.2-1               all
python3-docopt                      0.6.2-3               all
python3-firewall                    0.9.3-2               all
python3-flask                       1.1.2-2               all
python3-flask-httpauth              3.2.4-3.1             all
python3-fuse                        2:1.0.2-1             amd64
python3-future                      0.18.2-5              all
python3-gdal                        3.2.2+dfsg-2          amd64
python3-gi                          3.38.0-2              amd64
python3-gi-cairo                    3.38.0-2              amd64
python3-gnucash                     1:4.4-1               amd64
python3-greenlet                    0.4.15-2              amd64
python3-html5lib                    1.1-3                 all
python3-httplib2                    0.18.1-3              all
python3-icu                         2.5-1+b2              amd64
python3-idna                        2.10-1                all
python3-ifaddr                      0.1.7-1               all
python3-itsdangerous                1.1.0-3               all
python3-jinja2                      2.11.3-1              all
python3-ldb                         2:2.2.0-3.1           amd64
python3-lib2to3                     3.9.2-1               all
python3-libvirt                     7.0.0-2               amd64
python3-libxml2:amd64               2.9.10+dfsg-6.7       amd64
python3-llfuse:amd64                1.3.8+dfsg-2          amd64
python3-lxml:amd64                  4.6.3+dfsg-0.1        amd64
python3-markupsafe                  1.1.1-1+b3            amd64
python3-minimal                     3.9.2-3               amd64
python3-mock                        4.0.3-1               all
python3-nftables                    0.9.8-3.1             amd64
python3-numpy                       1:1.19.5-1            amd64
python3-olefile                     0.46-3                all
python3-openshot                    0.2.5+dfsg1-4+b2      amd64
python3-openssl                     20.0.1-1              all
python3-pbr                         5.5.0-2               all
python3-pil:amd64                   8.1.2+dfsg-0.3        amd64
python3-pkg-resources               52.0.0-4              all
python3-ply                         3.11-4                all
python3-png                         0.0.20+ds-3           all
python3-psutil                      5.8.0-1               amd64
python3-pycparser                   2.20-3                all
python3-pycryptodome                3.9.7+dfsg1-1+b2      amd64
python3-pycurl                      7.43.0.6-5            amd64
python3-pyglet                      1.5.14-1              all
python3-pyinotify                   0.9.6-1.3             all
python3-pykwalify                   1.8.0-1               amd64
python3-pylibacl:amd64              0.6.0-1+b1            amd64
python3-pynest2d:amd64              4.8.0-2               amd64
python3-pyqt5                       5.15.2+dfsg-3         amd64
python3-pyqt5.qtmultimedia          5.15.2+dfsg-3         amd64
python3-pyqt5.qtopengl              5.15.2+dfsg-3         amd64
python3-pyqt5.qtpositioning         5.15.2+dfsg-3         amd64
python3-pyqt5.qtquick               5.15.2+dfsg-3         amd64
python3-pyqt5.qtsql                 5.15.2+dfsg-3         amd64
python3-pyqt5.qtsvg                 5.15.2+dfsg-3         amd64
python3-pyqt5.qtwebchannel          5.15.2+dfsg-3         amd64
python3-pyqt5.qtwebkit              5.15.2+dfsg-3         amd64
python3-pyqt5.qtwebsockets          5.15.2+dfsg-3         amd64
python3-pyqt5.qtxmlpatterns         5.15.2+dfsg-3         amd64
python3-pyqt5.sip                   12.8.1-1+b2           amd64
python3-pysimplesoap                1.16.2-3              all
python3-python-utils                2.3.0-2+b2            amd64
python3-pyxattr:amd64               0.7.2-1+b1            amd64
python3-qrtools                     2.0~bzr33-2           all
python3-qtpy                        1.9.0-3               all
python3-reportbug                   7.10.3                all
python3-requests                    2.25.1+dfsg-2         all
python3-ruamel.yaml                 0.16.12-2             all
python3-ruamel.yaml.clib:amd64      0.2.2-1+b2            amd64
python3-savitar:amd64               4.8-1+b1              amd64
python3-scipy                       1.6.0-2               amd64
python3-scour                       0.38.2-1              all
python3-selinux                     3.1-3                 amd64
python3-serial                      3.5~b0-1              all
python3-setuptools                  52.0.0-4              all
python3-shapely                     1.7.1-2               amd64
python3-simplejson                  3.17.2-1              amd64
python3-sip                         4.19.25+dfsg-1        amd64
python3-six                         1.16.0-2              all
python3-slip                        0.6.5-2               all
python3-slip-dbus                   0.6.5-2               all
python3-socks                       1.7.1+dfsg-1          all
python3-software-properties         0.96.20.2-2.1         all
python3-soupsieve                   2.2.1-1               all
python3-stem                        1.8.0-3               all
python3-stl                         2.9.0-1+b4            amd64
python3-talloc:amd64                2.3.1-2+b1            amd64
python3-tinycss2                    1.0.2-1               all
python3-tornado                     6.1.0-1+b1            amd64
python3-uno                         1:7.0.4-4             amd64
python3-uranium                     4.8-1                 all
python3-urllib3                     1.26.5-1~exp1         all
python3-webencodings                0.5.1-2               all
python3-werkzeug                    1.0.1+dfsg1-2         all
python3-wxgtk4.0                    4.0.7+dfsg-10         amd64
python3-xcffib                      0.8.1-0.8             amd64
python3-xdg                         0.27-2                all
python3-zbar:amd64                  0.23.90-1             amd64
python3-zeroconf                    0.26.1-1              all
python3-zmq                         20.0.0-1+b1           amd64
python3.7-minimal                   3.7.3-2+deb10u3       amd64
python3.9                           3.9.2-1               amd64
python3.9-minimal                   3.9.2-1               amd64

$ dpkg -l |grep onionshare
onionshare 2.2-3 all

apt show onionshare

Package: onionshare
Version: 2.2-3
Depends: obfs4proxy, python3-pycryptodome, python3-flask, python3-flask-httpauth, python3-pyqt5, python3-socks, python3-stem (>= 1.4.0), tor, python3:any
@mig5
Copy link
Collaborator

mig5 commented Aug 30, 2021

Hi,

Thanks for the report.

The version in Debian might be slightly old, so the issue might already be fixed upstream, or at least already be filed as an issue, but it's hard to be sure.

Can you try running onionshare-gui -v from a terminal, and see if you reproduce the segfault? That way there might be more debug information in the terminal output if it happens again.

Thanks!

@mig5 mig5 added the bug label Aug 30, 2021
@Yalman
Copy link
Author

Yalman commented Aug 30, 2021

dmesg -w

Aug 30 10:23:15 HOSTNAME kernel: onionshare-gui[6062]: segfault at 8f7320 ip 00000000008f7320 sp 00007ffc94263d08 error 15 in python3.9[8f4000+47000]
Aug 30 10:23:15 HOSTNAME kernel: Code: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
00 <1c> 00 00 00 00 00 00 00 a0 6d 90 00 00 00 00 00 00 00 00 00 00 00

USER@HOSTNAME:~$ onionshare-gui -v

OnionShare 2.2 | https://onionshare.org/
[Aug 30 2021 10:22:35] Onion.__init__
[Aug 30 2021 10:22:35] OnionShare.__init__
[Aug 30 2021 10:22:35] OnionShareGui.__init__
[Aug 30 2021 10:22:35] Settings.__init__
[Aug 30 2021 10:22:35] Settings.load
[Aug 30 2021 10:22:35] Settings.load: Trying to load /home/USER/.config/onionshare/onionshare.json
[Aug 30 2021 10:22:35] Web.__init__: is_gui=True, mode=share
[Aug 30 2021 10:22:35] Web.generate_static_url_path: new static_url_path is /static_sfaxzutgpjrvxscqwuevvrjjse
[Aug 30 2021 10:22:35] ShareModeWeb.init
[Aug 30 2021 10:22:35] ShareMode.update_primary_action
[Aug 30 2021 10:22:36] Web.__init__: is_gui=True, mode=receive
[Aug 30 2021 10:22:36] Web.generate_static_url_path: new static_url_path is /static_qc2ezloun6wpe6nscqkvuh3nmy
[Aug 30 2021 10:22:36] ReceiveModeWeb.__init__
[Aug 30 2021 10:22:36] Web.__init__: is_gui=True, mode=website
[Aug 30 2021 10:22:36] Web.generate_static_url_path: new static_url_path is /static_4ot7eqiso4qtmqy5awcerlj2cu
[Aug 30 2021 10:22:36] WebsiteMode.update_primary_action
[Aug 30 2021 10:22:36] TorConnectionDialog.__init__
[Aug 30 2021 10:22:36] TorConnectionDialog.start
[Aug 30 2021 10:22:36] TorConnectionThread.__init__
[Aug 30 2021 10:22:36] TorConnectionThread.run
[Aug 30 2021 10:22:36] Onion.connect
[Aug 30 2021 10:22:36] Onion.connect: tor_data_directory=/home/USER/.config/onionshare/tmpgkzm648t
Connecting to the Tor network: 100% - Done
[Aug 30 2021 10:22:45] Onion.connect: Connected to tor 0.4.5.9
[Aug 30 2021 10:22:45] TorConnectionDialog._connected_to_tor
[Aug 30 2021 10:23:15] OnionShareGui.closeEvent
[Aug 30 2021 10:23:15] Onion.cleanup
[Aug 30 2021 10:23:15] OnionShare.cleanup
Speicherzugriffsfehler

This failure becomes if i close onionshare.

@mig5
Copy link
Collaborator

mig5 commented Aug 30, 2021

Thank you!

I suspect this is the thread terminate() issue as in #1371:

Moreover, I even found that the remaining place where we use .terminate() - the process that tries to abort waiting for Tor circuits to end - also seems to sometimes trigger something close to a segfault or 'event trap' errors when you close OnionShare on macOS and Linux. This makes me feel like it's not something specific to OnionThread/WebThread but anywhere we use .terminate() on a thread in general.

It is kind of harmless indeed as it can only occur as part of the GUI app shutdown itself. But yes, we should try and fix it.

I'll try and reproduce it too and if it does look like that issue, I might mark this as a duplicate. But thanks for the report and the reminder that we need to fix it.

@Yalman
Copy link
Author

Yalman commented Aug 30, 2021

Thank You! For making things as great as this for all of us. :)

@Yalman Yalman closed this as completed Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants