From: Dimitris <dimitris.on.linux@gmail.com>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ 1/1] Revert "device: Consider service state on device_is_connected"
Date: Wed, 3 Apr 2024 23:35:56 -0700 [thread overview]
Message-ID: <b7769335-3af4-469a-bf58-a3a51f03c842@gmail.com> (raw)
In-Reply-To: <06c64895-a99b-4705-8965-d8ea66eef74a@molgen.mpg.de>
Hi Paul,
> Please document the reason for the revert.
I've since done a narrower change; instead of the revert I'm only
factoring out the state check that avoids the busy loop at "rfkill block
bluetooth" time.
Updated cover letter and patch under the "V2" part of the thread:
https://lore.kernel.org/linux-bluetooth/20240404024521.120349-1-dimitris.on.linux@gmail.com/T/#u
Issue steps to reproduce from e.g.
https://github.com/bluez/bluez/issues/785 :
- Connect at least one device. Tried this with either one of: Logitech
MX Master 3, Google Pixel Buds Pro.
- Run rfkill block bluetooth
- bluetoothd takes a whole core, GNOME quick settings and status still
shows bluetooth as "active". I have to kill -9 the process to get the
block to really complete.
- Turning off the connected device does not break the loop.
Busy loop stack looks like:
> #0 adapter_remove_connection (adapter=0x55a17e6889d0, device=0x55a17e698d30, bdaddr_type=2 '\002') at src/adapter.c:7476
> #1 0x000055a17e55979f in adapter_stop (adapter=0x55a17e6889d0) at src/adapter.c:7527
> #2 settings_changed (settings=<optimized out>, adapter=0x55a17e6889d0) at src/adapter.c:622
> #3 new_settings_callback (index=<optimized out>, length=<optimized out>, param=<optimized out>, user_data=0x55a17e6889d0) at src/adapter.c:705
> #4 0x000055a17e59981e in queue_foreach (user_data=0x7ffe49a7ef20, function=0x55a17e591e60 <notify_handler>, queue=0x55a17e683280) at src/shared/queue.c:207
> #5 queue_foreach (user_data=0x7ffe49a7ef20, function=0x55a17e591e60 <notify_handler>, queue=0x55a17e683280) at src/shared/queue.c:190
> #6 process_notify (param=<optimized out>, length=<optimized out>, index=<optimized out>, event=<optimized out>, mgmt=0x55a17e682f30) at src/shared/mgmt.c:349
> #7 can_read_data (io=<optimized out>, user_data=0x55a17e682f30) at src/shared/mgmt.c:409
> #8 0x000055a17e5bb679 in watch_callback (channel=<optimized out>, cond=<optimized out>, user_data=<optimized out>) at src/shared/io-glib.c:157
> #9 0x00007f876edd4e5c in g_main_context_dispatch_unlocked.lto_priv () from target:/lib64/libglib-2.0.so.0
> #10 0x00007f876ee2ff18 in g_main_context_iterate_unlocked.isra () from target:/lib64/libglib-2.0.so.0
> #11 0x00007f876edd6447 in g_main_loop_run () from target:/lib64/libglib-2.0.so.0
> #12 0x000055a17e4f1d64 in mainloop_run () at src/shared/mainloop-glib.c:66
> #13 mainloop_run_with_signal (func=0x55a17e544740 <signal_callback>, user_data=0x0) at src/shared/mainloop-notify.c:188
> #14 main (argc=<optimized out>, argv=<optimized out>) at src/main.c:1455
First time submitter here, should I resubmit/start a new thread for this
"V2" approach?
Thanks
D.
next prev parent reply other threads:[~2024-04-04 6:35 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 20:52 [PATCH BlueZ 0/1] Fixes busy loop when disabling Dimitris
2024-04-03 20:52 ` [PATCH BlueZ 1/1] Revert "device: Consider service state on device_is_connected" Dimitris
2024-04-03 22:39 ` Fixes busy loop when disabling bluez.test.bot
2024-04-04 6:24 ` [PATCH BlueZ 1/1] Revert "device: Consider service state on device_is_connected" Paul Menzel
2024-04-04 6:35 ` Dimitris [this message]
2024-04-04 2:45 ` [PATCH BlueZ 0/1] V2: Fix busy loop when disabling BT Dimitris
2024-04-04 2:45 ` [PATCH BlueZ 1/1] Refactor btd_device_is_connected Dimitris
2024-04-04 4:40 ` V2: Fix busy loop when disabling BT bluez.test.bot
2024-04-04 14:59 ` [PATCH BlueZ 1/1] Refactor btd_device_is_connected Luiz Augusto von Dentz
2024-04-04 15:52 ` Dimitris
2024-04-04 16:16 ` Luiz Augusto von Dentz
2024-04-04 18:25 ` Dimitris
2024-04-04 18:30 ` [PATCH BlueZ 0/1] V3: Fix busy loop when disabling BT Dimitris
2024-04-04 18:30 ` [PATCH BlueZ 1/1] refactor bearer connected test Dimitris
2024-04-04 20:07 ` V3: Fix busy loop when disabling BT bluez.test.bot
2024-04-04 18:50 ` [PATCH BlueZ 0/1] " patchwork-bot+bluetooth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b7769335-3af4-469a-bf58-a3a51f03c842@gmail.com \
--to=dimitris.on.linux@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=pmenzel@molgen.mpg.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).