From: Peter Hurley <peter@hurleysoftware.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Scott James Remnant <keybuk@chromium.org>
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: rctest -c "Can't connect: Device or resource busy (16)"
Date: Tue, 11 Mar 2014 23:01:23 -0400 [thread overview]
Message-ID: <531FCE03.4080704@hurleysoftware.com> (raw)
In-Reply-To: <15A2D205-97BC-4790-A998-52AD8941DB3F@holtmann.org>
On 03/11/2014 10:14 PM, Marcel Holtmann wrote:
> Hi Scott,
>
>> 3.10 with bluetooth-next applied - btmon of both sides attached
>
> I am seeing the same with bluetooth-next on a 3.13 kernel. It even has a weird pattern for me.
>
> rctest[52844]: Connected [handle 11, class 0x000000, priority 0]
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Device or resource busy (16)
> rctest[52844]: Can't connect: Connection refused (111)
> rctest[52844]: Can't connect: Connection reset by peer (104)
> rctest[52844]: Can't connect: Connection reset by peer (104)
> rctest[52844]: Connected [handle 11, class 0x000000, priority 0]
>
> Unfortunately I currently have no idea on why this happens. When using
> SO_LINGER of 60 seconds with rctest -L 60 -c <bdaddr> I am getting some
> really odd tracing behavior.
>
>> ACL Data RX: Handle 11 flags 0x02 dlen 14
> L2CAP: Command Reject (0x01) ident 7 len 6
> Reason: Invalid CID in request (0x0002)
> Destination CID: 64
> Source CID: 0
>
> This should never happen and makes me wonder if something is
> even screwed up one down in L2CAP. Do you happen to have time
> to bisect this and figure out which patch introduced this behavior.
Marcel,
I'm looking into this on the assumption I broke something in
the refactor of __rfcomm_dlc_close.
I can reproduce this and looking at the kernel trace shows
that that UA reply of the dlc DISC is not being processed, because
the rfcomm thread is not getting scheduled, but I'm not sure where
that was supposed to happen.
IOW,
rctest -r | rctest -c xx:xx:....
| ...
| rfcomm_sock_shutdown
| __rfcomm_sock_close
| rfcomm_dlc_close dlci 20
| __rfcomm_dlc_close
| rfcomm_send_disc dlci 20
rfcomm_recv_disc state 1 dlci 20 |
rfcomm_send_ua dlci 20 |
__rfcomm_dlc_close state 9 |
rfcomm_dlc_unlink |
... | UA never shows up here because
| rfcomm_process_sessions isn't run
| so rfcomm_recv_ua never happens
Regards,
Peter Hurley
next prev parent reply other threads:[~2014-03-12 3:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 21:44 rctest -c "Can't connect: Device or resource busy (16)" Scott James Remnant
2014-03-11 23:03 ` Marcel Holtmann
2014-03-11 23:37 ` Scott James Remnant
2014-03-12 2:14 ` Marcel Holtmann
2014-03-12 3:01 ` Peter Hurley [this message]
2014-03-12 3:27 ` Peter Hurley
2014-03-12 4:27 ` Peter Hurley
2014-03-12 17:18 ` Peter Hurley
2014-03-28 17:49 ` Scott James Remnant
2014-03-13 16:43 ` [PATCH 0/3] Fix RFCOMM connect/disconn races Peter Hurley
2014-03-13 16:43 ` [PATCH 1/3] bluetooth: rfcomm: Reply with DM after dlc disconnect Peter Hurley
2014-03-13 16:43 ` [PATCH 2/3] bluetooth: rfcomm: Create new session if closing old session Peter Hurley
2014-03-13 16:43 ` [PATCH 3/3] bluetooth: rfcomm: Defer session teardown after last dlc Peter Hurley
2014-04-02 20:04 ` [PATCH 0/3] Fix RFCOMM connect/disconn races Marcel Holtmann
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=531FCE03.4080704@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=keybuk@chromium.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.