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

Ubuntu 18.04 : Crash and desktop freeze #1055

Closed
zedalaye opened this issue May 26, 2018 · 63 comments
Closed

Ubuntu 18.04 : Crash and desktop freeze #1055

zedalaye opened this issue May 26, 2018 · 63 comments
Labels

Comments

@zedalaye
Copy link

Description

When I start Cozy Desktop app on my Ubuntu 18.04 box everything freezes and I have to hard reboot.

Steps to Reproduce

  1. Download .AppImage
  2. Start .AppImage

Expected behavior

Cozy Desktop show up and start syncing my files

Actual behavior

Its like the UI was beeing built (I saw something like a window shadow) then everything is frozen.

Informations

  • reproductible: always
  • OS: linux
  • version: 3.6.0
@sebn
Copy link
Contributor

sebn commented Jun 6, 2018

Thank you for reporting the issue!

We'll need more information to investigate this one.
There should be some logs in ~/.cozy-desktop/, we need at least the most recent one : logs.txt.
Please note logs include your filenames.

You can eventually install bunyan (needs Node.js) and run bunyan -o short -l error ~/.cozy-desktop/logs.txt to find out eventual error details.

In case that sounds a bit complicated, or you don't really have time to deal with this, you can also just upload the logs.txt file to https://send.firefox.com/ and share the download link with us through some private channel (Cozy contact email mentioning this issue, or IRC private message to me).

The app usually allows sending a support request directly from the UI (which automatically includes logs), but this won't help in your case since it crashes before even showing up.

Please tell me in case you need help for any of those steps.

@sebn sebn added the bug label Jun 6, 2018
@bristow
Copy link

bristow commented Jun 25, 2018

Same thing on my computer on Ubuntu 18.04 (laptop Lenovo X240). After sync, it's ok but laptop isn't useable during syncing.

Do you still need a log ?

@sebn
Copy link
Contributor

sebn commented Jun 27, 2018

Hello @bristow!
Logs would definitely be welcome as we couldn't reproduce it yet.

If you can access the UI, you can send a message directly from the app (in the Settings tab => Send us a message) and logs will be joined automatically (please note they contain your filenames).

@bristow
Copy link

bristow commented Jun 27, 2018

@sebn : I send you my last log.txt (only 24h), i haden't wifi active but my laptop was unuseable at startup.

https://framadrop.org/r/uKFMJE4Bzc#zSkW8wukdd0rqdKJ+RmKFxfimKLpQCIKIeEGEH0Qpr4=

@sebn
Copy link
Contributor

sebn commented Jun 27, 2018

@bristow logs received. We'll investigate as soon as possible. Thanks!

@bristow
Copy link

bristow commented Jul 8, 2018

@sebn some news ? I'd like to change my hubiC for cozy but i need a client for my professional laptop on Ubuntu 18.04.
Thanks !

@sebn
Copy link
Contributor

sebn commented Jul 14, 2018

@bristow Sorry, we're quite overwhelmed.

The app logs don't show any issue at all. We'll probably need to take a look at the kernel logs in this case, but their location/availability may vary from one distro to another, and I'm not sure where they are located on latest Ubuntu LTS (possibly /var/log/kern.log?). I'll try to take a look at it as soon as possible.

@bristow
Copy link

bristow commented Jul 14, 2018

@sebn : I don't understand...

I restart today and everything works fine, i made an update before...

@zedalaye could you test again ?

@bristow
Copy link

bristow commented Jul 18, 2018

@sebn forgot what i said... Same problem again...

You can find my kern.log here : https://framadrop.org/r/ts_cf6fT2w#LrqdM2W6IRwRKv5VwHCXFmrVpwyK42fePwFE/Aclu9E=

I made 2 reboots today, 18th july.

@sebn
Copy link
Contributor

sebn commented Jul 19, 2018

Same thing on my computer on Ubuntu 18.04 (laptop Lenovo X240). After sync, it's ok but laptop isn't useable during syncing.

Sorry, I misread, my bad.

The ressource consumption issue is known and not the same as the desktop crashing one.
For the former, we just need more app logs, ideally all the logs.txt* files.
Please note we're already investigating quite a few support requests, so it make take some time.

@bristow
Copy link

bristow commented Jul 19, 2018

@sebn : you can find logs.txt here : https://framadrop.org/r/48Yt6j4SYR#Zke940LA6MOIsbL9TsI37vDh4kE75FbtsmC9s6FVeCI=

250 MB for logs is too big, don't you think ?

@sebn
Copy link
Contributor

sebn commented Jul 19, 2018

you can find logs.txt here

Thanks!

250 MB for logs is too big, don't you think ?

Definitely, it may even get bigger... That's another known issue.

@Wenzel
Copy link

Wenzel commented Aug 9, 2018

Hi,
I just had the same issue on my desktop, Ubuntu 18.04 LTS, except that it freezes for 15 seconds, and then comes back, with the app remaining functional.

I can share logs if needed.

Image version: CozyDrive-3.9.0-x86_64.AppImage

@Wenzel
Copy link

Wenzel commented Aug 12, 2018

It looks like the problem is coming from Ubuntu's Gnome extension to get a system tray for legacy icons.

I removed the package responsible for this:
sudo apt purge gnome-shell-extension-appindicator
And CozyDrive doesn't crash anymore or freezes the desktop !

Although, the window cannot be displayed.

Switching to the Mate desktop is the solution..

@sebn
Copy link
Contributor

sebn commented Aug 17, 2018

Hello there, we'll be using Ubuntu 18.04 and testing it more extensively soon (including fixing the auto-launch that seems to break after an upgrade), we'll get back to you as soon as possible. We apologize for the delay.

@bristow
Copy link

bristow commented Aug 18, 2018

Thanks @Wenzel for your research and @sebn for your work !

@bristow
Copy link

bristow commented Sep 12, 2018

Some news @sebn for this bug ?

@sebn
Copy link
Contributor

sebn commented Sep 21, 2018

Sorry for the late answer.
I have no idea whether my teammate encountered the issue while testing on 18.04.
I hope to be able to upgrade one of our dependencies (electron) soon, which should hopefully fix this issue (and many other small ones). I'll give Ubuntu LTS a try myself while upgrading.

@Wenzel
Copy link

Wenzel commented Oct 25, 2018

Hi,
I just gave another try to your app this afternoon.
1 minute after i started it, my Mate desktop was frozen.
I can't say for sure that it comes from the app of course, but the coincidence raises some suspicions here... 🤔

After the reboot, i ran the app again, this time it doesn't crash the desktop but it remains unresponsive for a few minutes, and then it works as expected.

I think something is really wrong when you can crash the user's desktop.
This ticket should have a higher priority as it's not a simple bug in the app. 😐

version: 3.10.0

@nono
Copy link
Member

nono commented Oct 25, 2018

Hello @Wenzel,

can you send us a message from the application? It will send us the logs, and it will be really helpful to understand what it happened.

@Wenzel
Copy link

Wenzel commented Oct 25, 2018

@nono i have already been syncing thousands of files now that the app is running.

Should i still send you a report via the app ?

@nono
Copy link
Member

nono commented Oct 25, 2018

@Wenzel yes, we should still look if we see anything obviously wrong that may have provoked the OS crash.

@Wenzel
Copy link

Wenzel commented Oct 25, 2018

I tried to reproduce the bug in a fresh Ubuntu 18.04 LTS VM, and so i managed to completely crash the desktop.
I suspect that the system ran out of memory.
Sometimes the app is eating 1GB+ of RAM for no reason.

I recorded a video of one of my attempts, the app becomes unresponsive for a few minutes after initialization, and eats a lot of RAM:
https://drive.google.com/open?id=1n0108XX6jn4Br3zPbW7kO0SCAs0hgk2y

I hope that helps !

@nono
Copy link
Member

nono commented Oct 26, 2018

Thanks for the video. I have one question: did you already have files in the Cozy directory on your VM (from a previous run for example)?

@Wenzel
Copy link

Wenzel commented Oct 26, 2018

@nono yes, i already have thousands a files (21 000) uploaded on my Cozy.
That's why the app is maybe having a hard time to make the initial sync.
But it should remain responsive :)

@nono
Copy link
Member

nono commented Oct 26, 2018

@Wenzel my question was not about the files on the Cozy, but on the hard disk. If your local folder is clean when you start, the good news is that we are working to improve the initial Cozy to hard disk synchronization. But we also some performance issues for files on the local disk, and it will take more time to fix those issues.

@Wenzel
Copy link

Wenzel commented Oct 26, 2018

@nono ah yes, the local folder Cozy Drive was empty and created by Cozy Desktop.

Should i open a new issue to track those initial sync UI performance problems ?

@bristow
Copy link

bristow commented Oct 31, 2018

@sebn @nono
Some news about this big big bug ? All my colleagues are impacted and it's very complicated.

Do you need more informations ?

@Wenzel
Copy link

Wenzel commented Oct 31, 2018

@bristow can you watch the RAM usage when you launch the app ?

Are you running the default Ubuntu desktop ?

Does it crashes and restart or does it freezes ?

@whiver
Copy link

whiver commented Feb 4, 2019

The reason why I mentioned apport is about its CPU use, precisely because being a report tool, it shouldn't take so much resources.

My Ubuntu install is almost fresh too: Ubuntu 18.10, and I installed libappindicator-dev to get the notification icon working for Cozy.
Is there something I can do to help you get some telemetry or logs? The freeze repro each time I start Cozy.

@bristow
Copy link

bristow commented Feb 4, 2019

@nono i'm not agree with you. Gnome Shell works very well, i have only one problem, this is with Cozy :(

I can also help but get some logs is very difficult because we need to restart computer...

Thanks 👍

@nono
Copy link
Member

nono commented Feb 5, 2019

@whiver can you try to remove libappindicator-dev and use TopIcons Plus instead?

@bristow maybe you can try to reproduce the freeze/crash with another window manager. At least, we would know if it is really a gnome-shell bug (probably not in the gnome-shell codebase, maybe an extension, or my favorite guess, a bad combination with a graphic card driver).

@whiver
Copy link

whiver commented Feb 12, 2019

@nono I tried to use Topicons Plus and after a few days of use I didn't notice any freeze, so I guess the problem is solved. Thanks for your help! :)
Though this is quite odd that the native solution is causing freezes whereas the extension solution works.
Is there a plan to support the Gnome 3 systray without having to install this extension?

Thanks again 🙂

@bristow
Copy link

bristow commented Feb 13, 2019

Sorry @whiver but i am not so optimistic.

Indeed, i installed Top icons on my Ubuntu 18.04 up to date, and i have big freeze when i launch Cozy. I have the mouse' s pointer but i can't click, no effect. I had to halt my laptop with a long press on power button.

@gpronost
Copy link

gpronost commented Feb 19, 2019

Hi, actually I have the same troubles than @bristow, except that I don't need to halt my laptop. It recovers from the freeze after several minutes (usually 5).
It seems however, that gnome itself (or the x server) crashes, as the recovering always occur with a "refresh" of gnome (black screen and gnome's items reappearing one by one).

Note, in case it helps:

  • I tried Top icons (and Top icons plus)
  • I have 18.04, which is the main difference with @whiver
  • My laptop has a Nvidia graphic card (GTX 1050Ti)

@Wenzel
Copy link

Wenzel commented Feb 19, 2019

We should include Gnome developers here and get their opinion about this, as it seems related to Gnome desktop only.

Does anyone know a Gnome dev who could give some help ?

@nono
Copy link
Member

nono commented Feb 19, 2019

@Wenzel it is a good idea. Currently, our efforts are mostly on the local watcher (the integration with inotify and ReadDirectoryChangesW) that will improve cozy-desktop for a lot of people, and this issue is not on our priority list as we have few users on Ubuntu with gnome. If a gnome developer can help us, it would be a good way to advance on this topic. I don't know a gnome developer, but maybe someone else on this thread does.

@gpronost
Copy link

I tried to upgrade to 18.10 in order to see if it could solve the issue. So far, it doesn't. However, I got a trace in the syslog. Maybe it can help:

Feb 20 15:40:46 neutrino gnome-shell[2735]: message repeated 2 times: [ [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_4575]
Feb 20 15:40:46 neutrino gnome-shell[2735]: [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_4578
Feb 20 15:41:32 neutrino gnome-shell[2735]: message repeated 3611 times: [ [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_4578]
Feb 20 15:41:32 neutrino gnome-shell[2735]: ../../../../glib/gmem.c:135: failed to allocate 32 bytes
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: GNOME Shell crashed with signal 5
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: == Stack trace for context 0x55b19a6e3210 ==
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #0 7fff92c183f0 I /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:309 (7f6f5b632550 @ 680)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #1 7fff92c184d0 b resource:///org/gnome/gjs/modules/_legacy.js:82 (7f6f63cb0b80 @ 71)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #2 7fff92c18540 I /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:260 (7f6f5b6324c0 @ 115)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #3 7fff92c18620 b resource:///org/gnome/gjs/modules/_legacy.js:82 (7f6f63cb0b80 @ 71)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #4 7fff92c186c0 I /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:425 (7f6f5b632820 @ 960)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #5 7fff92c18790 b resource:///org/gnome/gjs/modules/_legacy.js:82 (7f6f63cb0b80 @ 71)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #6 7fff92c18800 I self-hosted:977 (7f6f63cf0280 @ 413)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #7 7fff92c18870 I self-hosted:977 (7f6f63cf0280 @ 413)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #8 7fff92c188f0 I resource:///org/gnome/gjs/modules/signals.js:128 (7f6f63cc18b0 @ 386)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #9 7fff92c18940 I /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:162 (7f6f5b6320d0 @ 96)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #10 7fff92c189d0 I self-hosted:261 (7f6f63cc1dc0 @ 223)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #11 7fff92c189d0 I /usr/share/gnome-shell/extensions/[email protected]/appIndicator.js:156 (7f6f5b632040 @ 65)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #12 7fff92c18ab0 b resource:///org/gnome/gjs/modules/_legacy.js:82 (7f6f63cb0b80 @ 71)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #13 7fff92c18b30 I self-hosted:981 (7f6f63cf0280 @ 474)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #14 7fff92c18bb0 I self-hosted:981 (7f6f63cf0280 @ 474)
Feb 20 15:41:32 neutrino org.gnome.Shell.desktop[2735]: #15 7fff92c19ca0 b /usr/share/gnome-shell/extensions/[email protected]/util.js:42 (7f6f5b63b670 @ 145)

@bristow
Copy link

bristow commented Feb 20, 2019

Good Job @gpronost

I found the same thing on my old syslog :

Feb 5 12:53:13 ThinkPad-X240 gnome-shell[5196]: [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_1997
Feb 5 12:54:59 ThinkPad-X240 gnome-shell[5196]: message repeated 331 times: [ [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_1997]

@Wenzel
Copy link

Wenzel commented Feb 20, 2019

@nono I propose that you send an email to the [email protected] mailing list, asking Gnome developers for advices regarding this issue.

I guess if it's someone representing CozyCloud, you would get more attention.

@bristow
Copy link

bristow commented Feb 21, 2019

I have opened an issue here : https://gitlab.gnome.org/GNOME/gnome-shell/issues/984

@bristow
Copy link

bristow commented Feb 21, 2019

I think Didier Roche, Canonical developper, has made good progress on this problem :

I think there are 3 bugs :

1 - CozyCloud is referencing an asset that doesn't exist, this is what caused the other improper behavior
2 - ubuntu-appindicators shouldn't try to load and reload in loop the invalid asset. This is filed as bug https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-appindicator/+bug/1817073 and tracked for release
3- GNOME Shell should be more resilient and don't crash when too many logs are repeatidly written.

The CozyCloud extension is what caused the 2 other components to misbehaved. We'll protect appindicators against it, but the 2 other bugs will remain.

@Wenzel
Copy link

Wenzel commented Feb 21, 2019

So, if I understand correctly, you could temporarily fix the bug by fixing the asset reference ?

@nono
Copy link
Member

nono commented Feb 21, 2019

If we have a missing asset reference and we found which one, we will fix the missing asset reference. But, for the moment, I don't see any missing asset reference. From the timing, I think it should be this asset: https://github.com/cozy-labs/cozy-desktop/blob/master/gui/images/tray-icon-linux/sync.png but I've checked, this file is included in our releases. I've tried some other things, but I haven't found yet what we are doing wrong.

@gpronost
Copy link

I'm not sure this is the asset AppIndicator is looking for. Looking at the code of AppIndicator, it send this message here:

        icon_info = icon_theme.lookup_icon(icon_name, icon_size,
                                           Gtk.IconLookupFlags.GENERIC_FALLBACK)

        // no icon? that's bad!
        if (icon_info === null) {
            Util.Logger.fatal("unable to lookup icon for "+icon_name);
        } else { // we have an icon
         `

The icon_name, according to the debug is "Cozy Drive1_XXXX" (with XXXX a number). Maybe there is an issue in the declaration of the icon name? I'm not familiar enough with electron and GNOME so maybe I'm saying non-sens, but if we can find where this "Cozy Drive1" is coming from, maybe we could understand what the issue is?

@gpronost
Copy link

gpronost commented Feb 22, 2019

Looking at the dbus monitoring I have the following:

    method call time=1550804988.791673 sender=:1.21 -> destination=:1.71 serial=55755 path=/org/ayatana/NotificationItem/Cozy_Drive1; interface=org.freedesktop.DBus.Properties; member=Get
            string "org.kde.StatusNotifierItem"
            string "IconPixmap"
    error time=1550804988.791837 sender=:1.71 -> destination=:1.21 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=55755
            string "No such property “IconPixmap”"
    method call time=1550804988.791947 sender=:1.21 -> destination=:1.71 serial=55756 path=/org/ayatana/NotificationItem/Cozy_Drive1; interface=org.freedesktop.DBus.Properties; member=Get
            string "org.kde.StatusNotifierItem"
            string "IconName"
    method return time=1550804988.792106 sender=:1.71 -> destination=:1.21 serial=91145 reply_serial=55756
            variant       string "Cozy Drive1_18224"
    method call time=1550804988.792256 sender=:1.21 -> destination=:1.71 serial=55757 path=/org/ayatana/NotificationItem/Cozy_Drive1; interface=org.freedesktop.DBus.Properties; member=Get
            string "org.kde.StatusNotifierItem"
            string "IconThemePath"
    method return time=1550804988.792465 sender=:1.71 -> destination=:1.21 serial=91146 reply_serial=55757
            variant       string "/tmp/.org.chromium.Chromium.wuM470"
    method call time=1550804988.792705 sender=:1.21 -> destination=:1.71 serial=55758 path=/org/ayatana/NotificationItem/Cozy_Drive1; interface=org.freedesktop.DBus.Properties; member=Get
            string "org.kde.StatusNotifierItem"
            string "IconPixmap"
    error time=1550804988.792827 sender=:1.71 -> destination=:1.21 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=55758
            string "No such property “IconPixmap”"
    method call time=1550804988.792836 sender=:1.21 -> destination=:1.71 serial=55759 path=/org/ayatana/NotificationItem/Cozy_Drive1; interface=org.freedesktop.DBus.Properties; member=Get
            string "org.kde.StatusNotifierItem"
            string "IconName"
    method return time=1550804988.792951 sender=:1.71 -> destination=:1.21 serial=91148 reply_serial=55759
            variant       string "Cozy Drive1_18224"

If I understand correctly, something ask for the IconName for Cozy Drive here, and the reply is "Cozy Drive1_18224". I quite don't understand why the reply to IconThemePath is something linked to chromium however (chromium is my browser).

Note that here Gnome was not freezing, and at the same time I got the following in the syslog:

    Feb 22 12:10:49 neutrino gnome-shell[2784]: [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_18224
    Feb 22 12:10:49 neutrino gnome-shell[2784]: [AppIndicatorSupport-FATAL] unable to lookup icon for Cozy Drive1_18224

Edit: Similar dbus messages can be found when Gnome freeze at the start of cozy drive, the only difference is that there are much more messages.

@nono
Copy link
Member

nono commented Feb 22, 2019

If I understand correctly, something ask for the IconName for Cozy Drive here, and the reply is "Cozy Drive1_18224".

I'd say so. 18224 is probably the PID (process identifier). And I think it is AppImage that sets the name to Cozy Drive 1_XXX.

I quite don't understand why the reply to IconThemePath is something linked to chromium however (chromium is my browser).

I don't think it is linked to your browser: Electron embeds a chromium in the application.

@gpronost
Copy link

gpronost commented Mar 5, 2019

Did someone test if the work-around solve the issue? (I can't test it)

@bristow
Copy link

bristow commented Mar 5, 2019

@nono how can we test this work-around ? Is there a new AppImage ?

@Wenzel
Copy link

Wenzel commented Mar 5, 2019

@bristow There are development artifacts available on each pull request apparenly:
#1463 (comment)

Edit: the artifacts are not available anymore.

@ghost
Copy link

ghost commented Apr 7, 2019

Just to share my personal experience, and perhaps help to solve this issue, here is what leaded me to stop having Gnome frozen at startup.

First, I was wondering if it was a question of Gnome version. I was on Ubuntu 18.04 and I upgraded to 18.10 and 19.04 on which I'm now. None of those upgrades solved the issue. Then I read once again the installation guidelines from Cozy's website where it is mentioned that we need to install TopIcons extension to see the icon on the top bar. As far as this extension doesn't work on Ubuntu Disco Dingo, I simply removed it. Until then, I was using TopIcons Plus extension which works on all versions and creates this startup freeze. Now that I have no TopIcons extension, there is no freeze.

Finally, the problem is here : TopIcons extensions create the freeze. So there might be something to seek in there.

Hope this helps...

@gpronost
Copy link

Hi guys, just to confirm that the issue seems to be fixed with the last release :)

@B-Galati
Copy link

B-Galati commented May 1, 2019

Same on my end, the issue looks fixed! Thanks :-)

@nono
Copy link
Member

nono commented May 6, 2019

Yeah!

@nono nono closed this as completed May 6, 2019
@bristow
Copy link

bristow commented May 6, 2019

Same thing here, desktop doesn't freeze anymore.

But, during about 5 minutes, CPU is very in use.
Thanks !

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

8 participants