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

blueman crashes in fedora-38-xfce template #8161

Closed
marmarek opened this issue Apr 29, 2023 · 4 comments · Fixed by QubesOS/qubes-core-agent-linux#423
Closed

blueman crashes in fedora-38-xfce template #8161

marmarek opened this issue Apr 29, 2023 · 4 comments · Fixed by QubesOS/qubes-core-agent-linux#423
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: Bluetooth C: Fedora diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.

Comments

@marmarek
Copy link
Member

marmarek commented Apr 29, 2023

How to file a helpful issue

Qubes OS release

R4.1

Brief summary

https://openqa.qubes-os.org/tests/72214/video?filename=video.ogv&t=434.00

[2023-04-29 11:34:01] [   34.638232] python3[715]: detected unhandled Python exception in '/usr/bin/blueman-applet'
[2023-04-29 11:34:02] [   35.227066] abrt-server[796]: Deleting problem directory Python3-2023-04-29-11:34:00-715 (dup of Python3-2023-04-29-10:38:49-814)
[2023-04-29 11:34:02] [   35.803849] abrt-notification[816]: Process 814 (blueman-applet) of user 1000 encountered an uncaught gi.repository.GLib.GError exception

Steps to reproduce

Start fedora-38-xfce template

Expected behavior

No crash, maybe blueman-applet not even started if there are no bluetooth devices.

Actual behavior

Applet crashes.

BTW, the notification lacks override-redirect flag, so the window has normal decorations, and also grabs focus...

Part of #8069

@marmarek marmarek added T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists. P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. C: Fedora XFCE labels Apr 29, 2023
@marmarek marmarek added this to the Release 4.1 updates milestone Apr 29, 2023
@marmarek
Copy link
Member Author

Traceback (most recent call last):
  File "/usr/bin/blueman-applet", line 40, in <module>
    app = BluemanApplet()
          ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/blueman/main/Applet.py", line 44, in __init__
    self.Plugins.load_plugin()
  File "/usr/lib/python3.11/site-packages/blueman/main/PluginManager.py", line 125, in load_plugin
    self.__load_plugin(cls)
  File "/usr/lib/python3.11/site-packages/blueman/main/PluginManager.py", line 163, in __load_plugin
    inst._load()
  File "/usr/lib/python3.11/site-packages/blueman/plugins/AppletPlugin.py", line 51, in _load
    super()._load()
  File "/usr/lib/python3.11/site-packages/blueman/plugins/BasePlugin.py", line 77, in _load
    self.on_load()
  File "/usr/lib/python3.11/site-packages/blueman/plugins/applet/KillSwitch.py", line 61, in on_load
    channel = GLib.IOChannel.new_file("/dev/rfkill", "r")
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gi.repository.GLib.GError: g-file-error-quark: Permission denied (2)

Local variables in innermost frame:
self: <blueman.plugins.applet.KillSwitch.KillSwitch object at 0x72d71e25dbd0>

@marmarek
Copy link
Member Author

In fact, the same applies to fedora-37-xfce template.

@marmarek
Copy link
Member Author

It seems to be caused by /dev/rfkill file existing, but rfkill module not actually loaded. This means the kernel doesn't consider device present, so related udev rule did not got applied, so it's left at 0600 and root-owned. Loading rfkill module makes /dev/rfkill permissions correctly set (0664, plus ACL for the local user).

@DemiMarie
Copy link

IMO it would be much better for Blueman to not even be started, to save memory.

@andrewdavidwong andrewdavidwong added the diagnosed Technical diagnosis has been performed (see issue comments). label Apr 30, 2023
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 7, 2023
Add a generic wrapper that starts a given process only if specific
qvm-service is enabled. This can be used in desktop files for example
(in Exec= line). Note that systemd units have this functionality built
in (ConditionExists=).

QubesOS/qubes-issues#8161
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 7, 2023
It is useless without bluetooth controller (most qubes), and without
loaded rfkill module (also not useful in most cases) it crashes on
start. See linked issue for details.

It is still possible to enable it via 'blueman' qvm-service.

QubesOS/qubes-issues#8161
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 7, 2023
Add a generic wrapper that starts a given process only if specific
qvm-service is enabled. This can be used in desktop files for example
(in Exec= line). Note that systemd units have this functionality built
in (ConditionExists=).

QubesOS/qubes-issues#8161
marmarek added a commit to marmarek/qubes-core-agent-linux that referenced this issue May 7, 2023
It is useless without bluetooth controller (most qubes), and without
loaded rfkill module (also not useful in most cases) it crashes on
start. See linked issue for details.

It is still possible to enable it via 'blueman' qvm-service.

QubesOS/qubes-issues#8161
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue May 7, 2023
Add a generic wrapper that starts a given process only if specific
qvm-service is enabled. This can be used in desktop files for example
(in Exec= line). Note that systemd units have this functionality built
in (ConditionExists=).

QubesOS/qubes-issues#8161

(cherry picked from commit 5cf9c87)
marmarek added a commit to QubesOS/qubes-core-agent-linux that referenced this issue May 7, 2023
It is useless without bluetooth controller (most qubes), and without
loaded rfkill module (also not useful in most cases) it crashes on
start. See linked issue for details.

It is still possible to enable it via 'blueman' qvm-service.

QubesOS/qubes-issues#8161

(cherry picked from commit dc666a8)
@andrewdavidwong andrewdavidwong added the pr submitted A pull request has been submitted for this issue. label May 7, 2023
@andrewdavidwong andrewdavidwong added the affects-4.1 This issue affects Qubes OS 4.1. label Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-4.1 This issue affects Qubes OS 4.1. C: Bluetooth C: Fedora diagnosed Technical diagnosis has been performed (see issue comments). P: default Priority: default. Default priority for new issues, to be replaced given sufficient information. pr submitted A pull request has been submitted for this issue. T: bug Type: bug report. A problem or defect resulting in unintended behavior in something that exists.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants