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 on ubuntu 21.04 beta #3090

Closed
fulljackz opened this issue Apr 12, 2021 · 23 comments
Closed

Segfault on ubuntu 21.04 beta #3090

fulljackz opened this issue Apr 12, 2021 · 23 comments

Comments

@fulljackz
Copy link

Expected behaviour

Starting nextcloud-client at the boot, from app menu or from command-line.
Starting the client must start synchro check and add an icon on system tray.

Actual behaviour

  • At the boot step, nothing.
  • When trying to start nextcloud from cli, here is the output :
un@nu:~|⇒  nextcloud
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[1]    60762 segmentation fault (core dumped)  nextcloud
  • Applying warn tip :
un@nu:~|⇒  QT_QPA_PLATFORM=wayland nextcloud
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
[1]    60963 segmentation fault (core dumped)  QT_QPA_PLATFORM=wayland nextcloud

Steps to reproduce

  1. sudo add-apt-repository ppa:nextcloud-devs/client
  2. sudo apt update
  3. sudo apt install nextcloud-desktop

Client configuration

Client version:

Operating system: Ubuntu 21.04 (beta)

OS language: EN

Qt version used by client package (Linux only, see also Settings dialog): N/A

Client package (From Nextcloud or distro) (Linux only): Nextcloud ppa

Installation path of client:

Nextcloud version: 21.0.1

Storage backend (external storage): Directory

Logs

Please use Gist (https://gist.github.com/) or a similar code paster for longer
logs.

  1. Client logfile:
Apr 12 15:28:18 kernel: [89954.092779] nextcloud[60963]: segfault at 8 ip 00007fd48a36063f sp 00007ffeebe52ef0 error 4 in libQt5Core.so.5.15.2[7fd48a101000+30b000]
Apr 12 15:28:18 kernel: [89954.092793] Code: 48 89 50 18 48 89 cb eb a5 66 90 f3 0f 1e fa 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 81 ec a8 00 00 00 48 89 95 70 ff ff ff <4c> 8b 7f 08 64 48 8b 04 25 28 00 00 00 48 89 45 c8 31 c0 41 f6 47
@FlexW
Copy link

FlexW commented Apr 12, 2021

The QT_QPA_PLATFORM environment variable is probably unrelated to this. Is it possible that you post your core dump after the crash?

@fulljackz
Copy link
Author

Yep I can upload a coredump (26M).
Is there a better solution that github to upload binary files ?
I don't really know coredump and debug related files, are there some risks to expose on on the internet ?

Regards,

@FlexW
Copy link

FlexW commented Apr 12, 2021

Sure. You can upload it here https://cloud.nextcloud.com/s/gF7E326o5fPiXFi

@ShevT
Copy link

ShevT commented Apr 12, 2021

Kubuntu 21.04 beta (no wayland)
https://gist.github.com/ShevT/580f633fdb98a3cbbc599c7af4f77afb

@fulljackz
Copy link
Author

Sure. You can upload it here https://cloud.nextcloud.com/s/gF7E326o5fPiXFi

Done. Compressed.zip is it ok for you ?

@FlexW
Copy link

FlexW commented Apr 12, 2021

Sure. You can upload it here https://cloud.nextcloud.com/s/gF7E326o5fPiXFi

Done. Compressed.zip is it ok for you ?

Yes, thanks.

@jirislav
Copy link

jirislav commented Apr 12, 2021

I also have this issue. And I confirm that QT_QPA_PLATFORM is not related as this error message is not shown to me.

Version used: 3.2.0-20210410.072919.14fbf1b10-1.0~hirsute1

OS: Ubuntu Hirsute 21.04
Lang: EN
PPA used: yes


Also note that when I run the AppImage, it runs without any problem at all: https://github.com/nextcloud/desktop/releases/tag/v3.2.0-rc3

If you need to run Nextcloud as of right now, run this command for hotfix:

wget https://github.com/nextcloud/desktop/releases/download/v3.2.0-rc3/Nextcloud-3.2.0-rc3.AppImage
chmod +x Nextcloud-3.2.0-rc3.AppImage
sudo mv Nextcloud-3.2.0-rc3.AppImage /usr/bin/nextcloud

@bjo81
Copy link

bjo81 commented Apr 14, 2021

Same here on MATE without wayland.

@FlexW FlexW added bug and removed needs info labels Apr 15, 2021
@FlexW
Copy link

FlexW commented Apr 15, 2021

I looked into this and can confirm the crash but I'm unsure why it happens. If I compile the client myself, then it runs fine. I would suggest it's a problem with the ppa itself. @ivaradi what do you think?

@bjo81
Copy link

bjo81 commented Apr 15, 2021

The 3.1.1 client from the usual 21.04 repos also crashes, so it seems it's nothing special to the ppa.

@ivaradi
Copy link
Contributor

ivaradi commented Apr 15, 2021

The build is basically the same for Hirsute and, say, Groovy, except of course that the system libraries and the compiler, etc. are of different versions.

I use the Groovy version on my machine, and it does not crash, so I also think the issue is not specific to the PPA itself, but rather the Hirsute environment.

@jirislav
Copy link

My first guess is that the problem is exactly that you can run it on groovy.

You actually should not be able to run it there, but on hirsute itself.

So my thought is:

  • what OS distribution is used for the packaging?
  • it should be always the same as the target distro
  • if package for hirsute is built inside a groovy environment, that'd explain a lot

@matttbe
Copy link

matttbe commented Apr 18, 2021

Thank you for looking at the issue.

FYI, this issue is also tracked on Launchpad as it also affects the version packaged by the distribution: https://bugs.launchpad.net/ubuntu/+source/nextcloud-desktop/+bug/1923053

If the issue is in QT libs, it is possible to notify people maintaining these libs. Do you know which lib is causing that?

@matttbe
Copy link

matttbe commented Apr 18, 2021

it should be always the same as the target distro

@jirislav packages available on Launchpad and the "official" ones (distributed with Ubuntu in the official repo) ensure that.
In theory, if libs introduce some modifications that require a rebuild of apps depending on these libs, "official" packages are rebuilt. But here, even these packages have the issue.

@mgallien mgallien added the crash label Apr 20, 2021
@FlexW FlexW changed the title [wayland] Segfault on ubuntu 21.04 beta Segfault on ubuntu 21.04 beta Apr 22, 2021
@rikmills
Copy link

This appears to be due to building with LTO enabled, as per #2790

@drohhyn
Copy link

drohhyn commented Apr 22, 2021

Just to bump the urgency: Ubuntu 21.04 release is today.

@rikmills
Copy link

LTO can be disabled by

-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto

in debian/rules

@marukuru
Copy link

LTO can be disabled by

-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto

in debian/rules

Rebuild the PPA package locally with -lto and it works fine.

@jbouter
Copy link

jbouter commented Apr 22, 2021

I also have this issue. And I confirm that QT_QPA_PLATFORM is not related as this error message is not shown to me.

Version used: 3.2.0-20210410.072919.14fbf1b10-1.0~hirsute1

OS: Ubuntu Hirsute 21.04
Lang: EN
PPA used: yes

Also note that when I run the AppImage, it runs without any problem at all: https://github.com/nextcloud/desktop/releases/tag/v3.2.0-rc3

If you need to run Nextcloud as of right now, run this command for hotfix:

wget https://github.com/nextcloud/desktop/releases/download/v3.2.0-rc3/Nextcloud-3.2.0-rc3.AppImage
chmod +x Nextcloud-3.2.0-rc3.AppImage
sudo mv Nextcloud-3.2.0-rc3.AppImage /usr/bin/nextcloud

The appimage now has a segault for me as well (using Nextcloud-3.2.0-x86_64.AppImage). Ubuntu 21.04 regular. Both wayland and xorg session.

@ivaradi
Copy link
Contributor

ivaradi commented Apr 22, 2021

Thanks @rikmills and @marukuru, I have disabled the LTO build for Hirsute in the PPA and have rebuilt the 3.2.0 packages. They should work now.

@fulljackz
Copy link
Author

I confirm, it works now !
Thanks for your help !

@jbouter
Copy link

jbouter commented Apr 22, 2021

Can confirm as well - works fine indeed. Thanks @ivaradi !

@FlexW
Copy link

FlexW commented Apr 23, 2021

@ivaradi are you allowed to close the issue? If yes, please close it if it is resolved, otherwise tell me that it is resolved and then I will close it :)

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

No branches or pull requests