Closed Ricky-Tigg closed 4 years ago
Something went wrong and the db is still locked. In my TODO is present the item "Let the user know when DB is locked on dnfdragora startup" , that i haven't implemented yet. Maybe you could enable logging with debug level, that could help because it could be a crash also by using dnfdragora update. The process could also be left active, but in some way a dnfdragora --exit should be run. I'm experiencing a crash during notification in dnfdragora-update and that using fedora rawhide, maybe the problem is present using f32 too, that's why enabling logging could help.
Hey. The redundant string are produced in an non-interrupted flow. Therefore no command can be inserted, which applies then to dnfdragora --exit
. The child process –which is at /usr/bin/python3 /usr/bin/dnfdragora – is dully ended when quitting the application.
This issue can be reproduced on demand. When the system is rebooted, the packages cache can be created once more along with those redundant strings. Though it could be as well twice while the system was disconnected from internet for the first time, both with options All and To update selected. The third time after internet connection was re-established the issue was permanent.
Here is troubleshooting protocol I adopted:
Check | eligibility to be run in GDB tool – dnfdragora is then not eligible. It is not in a supported executable format,
$ file `which dnfdragora`
/usr/bin/dnfdragora: Python script, ASCII text executable
Real time logging – I opened two terminal sessions as illustrated here. Then i executed in that orderjournalctl -f
and dnfdragora
. No log were at any time written to the journal.
concernig debugging thanks to think to it, if you're able to you can run it using python3
python3 -mpdb `which dnfdragora`
To enable logging just co to user preferences and fix your parameterres such as logging directory (that must exist and be writeable for your user) and check the debug level.
To run dnfdragora --exit you could run it in a different terminal the running process should at that point connect to dnfdaemon correctly, or kill dnfdragora run it with --exit and run it again normally.
I found a problem with dnfdragora-update if you run dnfdragora from its menu it exits badly cause of notifier, maybe it is that.
Today, be the internet connection established or not, and the application launched from its icon or terminal, the packages cache were created. Here is the interface of User preferences on my system; Options whose check-boxes could be checked were checked. Therefore neither Log options nor Debug level are checkable.
I may not be in an adequate situation to execute the suggested command, unless(Pdb)
expects a command.
$ python3 -mpdb `which dnfdragora`
> /usr/bin/dnfdragora(13)<module>()
-> import sys
(Pdb)
Odd Log Options should enable other sub option. Below a preview of next options presentation
Regarding debug you did right, if you write r it runs, help for helps and b or cl for adding or removing breakpoints. But i may suggest to look for manual if you're not familiar in debugging python.
Of course also testing from master is more than welcome, using virtualenv (python virtual environment) as described into the read me file you even don't need to install in the system but in your home, with an easy to remove directory to uninstall all. We usually call it venv for simplicity. Thank for your help
Just to be sure you don't have the same problem as in issue #149 In which you can find a workaround.
Moreover you can also change your configuration file ~/.config/dndragora.yaml outside dnfdragora an example is: https://github.com/manatools/dnfdragora/blob/2.0.4/dnfdragora.yaml.user_prefs.example
Configuration files locations in my system
$ rpm -ql dnfdragora | grep '.yaml'
/etc/dnfdragora/dnfdragora.yaml
/usr/share/doc/dnfdragora/dnfdragora.yaml.example
/usr/share/doc/dnfdragora/dnfdragora.yaml.user_prefs.example
/usr/share/man/man5/dnfdragora.yaml.5.g
Changes were applied to /etc/dnfdragora/dnfdragora.yaml by discommenting these lines:
log_filename: PATH/TO/dnfdragora.log
log_level_debug: True
Though it had no effect inside the application interface. The developer environment cannot be set on my system. See Red Hat Bugzilla – Bug 1869191.
Issue #149 illustrates an output that has at best the expression 'python3.8/site-packages
' in common with the output resulting from dnfdragora
in my system. I must lack knowledge to determine that it could be the same issue.
Supposed your home /home/ricky you could set that directory as PATH/TO... To see if you have the same problem just remove the ~/.config/dnfdragora.yaml and do same steps as described in that issue. If all starts well then it was.
Anyway when I'm back I will post a configuration example for enabling logging. The hope is to fix a rawhide crash to release new version of dnfdragora :)
Component dnfdragora-updater was not installed along with the installation of component dnfdragora;. Changelog_filename: /home/yk//dnfdragora.log
was applied to _/etc/dnfdragora/dnfdragora.yam_l:
Also modifying the extension name acts the same as 'rm ~/.config/dnfdragora.yaml
'. dnfdragora-updater &
did not launch the graphical application and froze at the last line of the output.
$ rm ~/.config/dnfdragora.yaml
$ killall dnfdragora-updater
$ sudo killall dnfdaemon-system
$ dnfdragora-updater &
[1] 20138
[yk@localhost ~]$ Try reading configuration file
From ./dnfdragora.yaml
Skipped exception: <[Errno 2] No such file or directory: './dnfdragora.yaml'>
From /etc/dnfdragora/dnfdragora.yaml
Finally read user settings from /home/yk/.config/dnfdragora.yaml
Skipped exception: <[Errno 2] No such file or directory: '/home/yk/.config/dnfdragora.yaml'>
Logging disabled
(dnfdragora-updater:20138): Gtk-CRITICAL **: 13:32:23.490: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
Here I am back on this subject, a minimal ~/.config/dnfdragora.yaml content that should work is (changing HOMENAME):
settings:
log:
directory: /home/HOMENAME/
enabled: true
level_debug: true
metadata:
last_update: 2020-08-22 22:30
update_interval: 48
search:
match_all: false
newest_only: false
view:
filter: all
show: groups
Below a script to create the config file by hands (just copy and paste for you, other users should change directory: /home/yk/logs line). Note that You must run it on a console using your user. Do not write it as root or using sudo Errors to create it should be resolved in newer releases.
mkdir -p ~/logs
echo "settings:" > ~/.config/dnfdragora.yaml
echo " log:" >> ~/.config/dnfdragora.yaml
echo " directory: /home/yk/logs" >> ~/.config/dnfdragora.yaml
echo " enabled: true" >> ~/.config/dnfdragora.yaml
echo " level_debug: true" >> ~/.config/dnfdragora.yaml
echo " metadata:" >> ~/.config/dnfdragora.yaml
echo " last_update: 2020-08-22 22:30" >> ~/.config/dnfdragora.yaml
echo " update_interval: 48" >> ~/.config/dnfdragora.yaml
echo " search:" >> ~/.config/dnfdragora.yaml
echo " match_all: false" >> ~/.config/dnfdragora.yaml
echo " newest_only: false" >> ~/.config/dnfdragora.yaml
echo "view:" >> ~/.config/dnfdragora.yaml
echo " filter: all" >> ~/.config/dnfdragora.yaml
echo " show: groups" >> ~/.config/dnfdragora.yaml
I have been able to run commands python3
, dnfdragora
and dnfdragora-updater
from Rawhde repository. The application's interface was then identical to the one from the stable repository. Not the version from your Master then.
I confirm that the configuration has the expected effect:
Regarding the debugging relying on Python3, the manual confused me enough to be unable to understand it Logs in a non-optimal environment were nevertheless created: dnfdragora.log
Seems to be working there, is all ok now?
The application works well enough assuming those observations:
Warning: Source ID 51 was not found when attempting to remove it return _yui.YDialog_waitForEvent(self, timeout_millisec)
Already fixed in libyui-gtk (2.49.0)
Get root backend. Locked (False)
Should not happen if dnfdaaemon is not locked, i.e. dnfdragora is already running or is crashed badly (workaround is running from console dnfdragora --exit) I maybe write it once, only on change status in future...
And Log Options has been fixed on master thanks to your report. I would close this bug if you agree, feel free to open a new one if there is anything else.
OS: Fedora; Component: dnfdragora.noarch 2.0.0-2.fc32. Tested on Wayland.
Steps to reproduce: Ensure that no dnfdragora session process is going on and an internet connection is established then execute in terminal
dnfdragora
.Results: The application is launched and unable to proceed the operation covering the update check. The following strings are endlessly produced till Quit is invoked which ends the session.
Here is the complete output with the redundant strings truncated which is indicated there by the mention
# (...)
.