linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chris Clayton <chris2553@googlemail.com>
To: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: Chris Murphy <lists@colorremedies.com>,
	Bluetooth <linux-bluetooth@vger.kernel.org>,
	regressions@lists.linux.dev
Subject: Re: bug kernel 5.17, qualcom and intel adapters, unable to reliably connect to bluetooth devices
Date: Wed, 2 Mar 2022 09:59:23 +0000	[thread overview]
Message-ID: <7e8834f3-5f7d-4c14-a913-d036957bc81d@googlemail.com> (raw)
In-Reply-To: <CABBYNZJ_W-SsfBc2m-8dQkzbJ6KHoP_5YoAiED5JewVd17kUAQ@mail.gmail.com>

Hi Luiz,

Good news...

On 02/03/2022 06:55, Luiz Augusto von Dentz wrote:

<snip>
>>
>> Looks like I was able to reproduce but I still don't know the cause,
>> anyway the symptom is the following:
>>
>> [23412.856410] remove_uuid:2273: hci0: sock 0000000049dcd70a
>> [23412.856467] mgmt_class_complete:2174: hci0: err 0
>> [23412.856470] mgmt_cmd_complete:176: sock 00000000d63e046a
>>
>> It looks like the cmd->sk is wrong/corrupted, what is even more
>> strange is that the socket pointer does seem to match previously
>> connected MGMT clients and after a few attempts with btmgmt> power on
>> it does come back to life, very bizarre...
>>
>> Can you try to enable some kernel debugs before you start bluetoothd:
>>
>> echo "file net/bluetooth/mgmt.c +pfl" > /sys/kernel/debug/dynamic_debug/control
>> echo "file net/bluetooth/mgmt_util.c +pfl" >
>> /sys/kernel/debug/dynamic_debug/control
>>
>> Maybe that should give us a clue what triggers it.
> 
> Here is an attempt to fix the problem:
> 
> https://patchwork.kernel.org/project/bluetooth/patch/20220302064351.225212-1-luiz.dentz@gmail.com/
> 
> Also it probably make more sense to test with the following tree since
> we are using it to push regression fixes:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git/
> 

I've cloned bluetooth.git, applied the patch and installed the resultant kernel. I've booted into the kernel eight times
and on each occasion , my bluetooth devices connected successfully. Additionally, I've the latest updates from Linus'
tree into my local clone and applied your patch to that. That too has resulted in a working bluetooth service.

Thanks and well done to you and your colleagues.

For the patch above:

Tested-by: Chris Clayton <chris2553@googlemail.com>

>>>>>>>
>>>>>>> --
>>>>>>> Luiz Augusto von Dentz
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Luiz Augusto von Dentz
>>>
>>>
>>>
>>> --
>>> Luiz Augusto von Dentz
>>
>>
>>
>> --
>> Luiz Augusto von Dentz
> 
> 
> 

  reply	other threads:[~2022-03-02  9:59 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-11  1:44 bug kernel 5.17, qualcom and intel adapters, unable to reliably connect to bluetooth devices Chris Murphy
2022-02-15 15:29 ` Chris Murphy
2022-02-15 15:38   ` Chris Murphy
2022-02-16  3:47     ` Chris Murphy
2022-02-16 23:49       ` Luiz Augusto von Dentz
2022-02-17  1:35         ` Chris Murphy
2022-02-17 23:36           ` Chris Murphy
2022-02-18  0:15             ` Luiz Augusto von Dentz
2022-02-18  3:49               ` Chris Murphy
2022-02-21 11:39                 ` Chris Clayton
2022-02-21 13:22                 ` Chris Clayton
2022-02-21 17:11                   ` Luiz Augusto von Dentz
2022-02-21 20:23                     ` Chris Clayton
2022-02-21 21:27                       ` Luiz Augusto von Dentz
2022-02-21 22:33                         ` Chris Clayton
2022-02-22 20:03                           ` Chris Clayton
2022-02-23 17:51                             ` Luiz Augusto von Dentz
2022-02-23 22:42                               ` Chris Clayton
2022-02-24  5:59                                 ` Chris Clayton
2022-02-24  8:16                                   ` Luiz Augusto von Dentz
2022-02-24 10:08                                     ` Chris Clayton
2022-02-24 15:16                                       ` Luiz Augusto von Dentz
2022-02-24 16:18                                         ` Thorsten Leemhuis
2022-02-26  8:04                                         ` Chris Clayton
2022-02-28 19:34                                           ` Luiz Augusto von Dentz
2022-02-28 21:02                                             ` Chris Clayton
2022-02-28 21:20                                               ` Luiz Augusto von Dentz
2022-03-01  9:26                                                 ` Chris Clayton
2022-03-01 18:34                                                   ` Luiz Augusto von Dentz
2022-03-01 18:56                                                     ` Chris Clayton
2022-03-01 18:57                                                     ` Luiz Augusto von Dentz
2022-03-01 19:40                                                       ` Chris Clayton
2022-03-01 22:40                                                         ` Luiz Augusto von Dentz
2022-03-01 22:47                                                           ` Luiz Augusto von Dentz
2022-03-02  2:31                                                             ` Luiz Augusto von Dentz
2022-03-02  6:55                                                               ` Luiz Augusto von Dentz
2022-03-02  9:59                                                                 ` Chris Clayton [this message]
2022-03-02  8:54                                                             ` Chris Clayton
2022-02-24  8:24                                   ` Chris Clayton
2022-02-21 17:12                 ` Luiz Augusto von Dentz
2022-02-21 17:18                   ` Luiz Augusto von Dentz
2022-02-24 10:26 ` Thorsten Leemhuis

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=7e8834f3-5f7d-4c14-a913-d036957bc81d@googlemail.com \
    --to=chris2553@googlemail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=luiz.dentz@gmail.com \
    --cc=regressions@lists.linux.dev \
    /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).