-
Notifications
You must be signed in to change notification settings - Fork 43
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
[Gtk GUI] User interface: dnfdragora freezes on start for a very long time #37
Comments
the indicator is the busy cursor, in addition the progress bar is used when dnf-daemon sends data for it. So if you can't understand that is working i need to know what is really happening, because i need to reproduce this problem and i seem not to here. |
That's the problem, I don't have reliable steps to reproduce. Often it is just
and this could take a while, I've seen more than 60 seconds once, without any progress bar or status text shown. |
you said libyui-gtk right? which which desktop? |
Yes. GNOME + Wayland. |
I will make some tests as soon as i configure a vm with gnome. Just a shot in the dark... could this problem be related to the update notifier? I mean dnfdragora does not have one, but i suppose fedora is still shipping its one, so maybe a conflicting dnf db access that is not managed as expected could be a reason... Are you able to make some tests for this? |
Yes, this could be the update notifier. I also notice this behavior if I use dnf as root from a command line, then dnfdragora also waits very long until it even starts showing the progress bar. Using the update notifier or dnf (as root) in parallel worked fine with yumex-dnf, at least until Fedora 25. |
So it seems a good catch after all :) I will investigate that first then comparing also the yumex-dnf code. Thanks |
my yumex-dnf has been slow for probably months by now, as is manually doing 'dnf update' & waiting for the 'updating metadata' to appear, during this time there is heavy drive activity so are we sure this has anything to do with the frontend? |
Last I recall, yumex-dnf UI doesn't freeze, only grey out a few stuff but still allow interacting while it does stuff. dnfdragora on the other hand just freeze and doesn't allow interacting, basically it's non-responsive in a lot of instance like startup, search, apply, Additionally, despite there being a blinking insert bar, typing doesn't do anything while it's doing stuff. |
dnf's commands are locked during this time though, it's busy dealing with metadata, same amount of waiting when you run it from terminal & wait for a response |
ah right, the settings but there's so little in them, making it a rare situation edit: compositing issue might be libyui's fault (unless it's somehow related to dragora temp freezing the ui until it's ready with the check?) |
@anaselli LIke I mention below the image, it's due to a non responsive ui. yumex-dnf grey options that aren't available during any background activity but doesn't become non responsive (thus doesn't end up like dnfdragora). dnfdragora can and should still process ui event while waiting for data, it shouldn't need any dnfdaemon data to open it's setting, resizing it's window or generally interacting in anyway with already available data (ie: expanding groups). |
so are you using groups? that is important. Because that part is not handled by dnfdaemon (i hope just for now and be in the future), if it is that then i can try to use a slower VM to reproduce the behavior and try to better manage that. But if you have such a behavior interacting with dnfdaemon, i think it isn't easy to reproduce it here... |
Adding a busy cursor doesn't cause it to redraw nor stop it from freezing. You need to call ether All UI stuff should be moved to it's own thread so that it doesn't freeze. |
it seems you know more than i thought... maybe you could provide a patch 👍 |
I was able to have a similar situation, yes frozen windows is very annoying. Busy cursor when is set does it jobs though, does not allow to use the window and at the same time does not freeze. The problem is that some tasks that normally requires little time or atomic operations (such as at start time dnfdaemon connection) are not always covered by busy cursor so in that case the windows is frozen. |
Expecting someone who doesn't know the code base to rewrite the main event loop might be a little bit much. Is there an IRC channel or something where it would be easier to ask/discuss about the code? |
Sure #manatools and #libyui |
I am just going to leave what I manage to do here: master...asl97:ui-threading It's mostly just a Proof of Concept, while it doesn't freeze while opening or a number of other places, it still freezes when the backend thread is (cpu) busy. If the maintainers feel it's good enough to be included as is, they can create the pull request and merge it. Base on this PoC, preventing freezing seem impossible using threads due to the GIL which I believe is the cause, |
Thanks you did a lot of work, i will take a look as soon as possible. I do hope, in any case you won't disappear :) |
are you sure you commited all? |
I did, |
my fault, sorry. anyway I think a change should be added in updater.py |
It seems like dnfdragora is freezing very often on start. Sometimes it does recover, sometimes it does not. This might be the result of some background operation going on, but since there is no busy indicator (except a spinning wheel) the ordinary user would not know if there is. After some time dnfdragora sometimes starts displaying information on the fact that it is updating repo metadata.
I'm running dnfdragora-1.0.1-1.fc26 with libyui-3.3.2-1.fc26 and dnfdaemon-0.3.17-1.fc26.
The text was updated successfully, but these errors were encountered: