Return-Path: Errors-To: From: "Daryl Van Vorst" To: "'Marcel Holtmann'" Cc: "'BlueZ Mailing List'" Subject: RE: [Bluez-devel] Rfcomm use count Date: Mon, 13 Sep 2004 12:06:13 -0700 Message-ID: <000e01c499c4$bd4482c0$1a01010a@baked> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_000F_01C4998A.10E5AAC0" In-Reply-To: List-ID: This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C4998A.10E5AAC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Marcel, I have attached a log for you to look at if you have some time. If not, maybe just answer my question below. :) Here's what I see: One stray socket. I added the socket pointer to the proc output. Proc/bluetooth/rfcomm: sk 2C:02:5F:16:05:00 3A:A4:58:16:05:00 9 1 c3b69340 I have a setup where I kill my app after a random time interval while several devices are connecting, disconnecting, and transfering data, = etc. Here's a brief version of the log: 1. Program gets kill signal (time 15:09:30) 2. HCI devices get shut down 3. Some data remaining for transmission is sent. 4. One listen socket is closed (I think this is the one which is not = being used) 5. Some sockets/dlcs get closed 6. An incomming connection is received (rfcomm_connect_ind is called, = and a socket is created which matches the one in proc) 7. Some more sockets/dlcs get closed 8. The listen (probably the one which is being used) gets closed I don't see any lines from rfcomm_sock_accept after the = rfcomm_connect_ind line. And rfcomm_sock_release is never called for the new connection. My knowledge here is limited, and I may be mis-interpreting the log. But = it appears that a socket is allocated for the new connection as long as = there is room in the wait queue. And if that connection is never accepted, is = it the job of rfcomm_sock_cleanup_listen() to deal with it? That is, it is = not the kernel's duty (outside of the rfcomm module) to deal with the = allocated socket? So, I think, it appears that rfcomm_sock_cleanup_listen isn't working = right. Not sure if rfcomm_sock_accept is still looping or not while this is = going on. More digging needed... Thanks, -Daryl. > -----Original Message----- > From: Daryl Van Vorst [mailto:daryl@wideray.com]=20 > Sent: September 13, 2004 9:37 AM > To: 'Marcel Holtmann' > Subject: RE: [Bluez-devel] Rfcomm use count >=20 >=20 > Hi Marcel, >=20 > > I haven't had time to look at your problem in the last two weeks and > > dealing with ARM related stuff still not fits into my left=20 > > free time for > > the next weeks. Is this behaviour reproduceable on x86=20 > machines and do > > you have a small text program to trigger this effect? And=20 > > what I really > > care about, is this problem also available with a 2.6 kernel? >=20 > Thanks for the response. >=20 > I have not yet tried to reproduce it on an x86. And=20 > unfortunately I don't have a good way to trigger the effect.=20 > I have spent quite a lot of time trying to come up with a=20 > simple way (or any way) to reliably reproduce the problem.=20 > Depending on how the next while plays out, I may try to=20 > reproduce it on an x86. >=20 > I would like to be working with a 2.6 kernel, but time=20 > constraints have prevented moving to it (would require=20 > porting drivers). Maybe on an x86 if time permits. >=20 > I'm currently sifting through RFCOMM debug output. When I get=20 > something interesting I'll send it along. I should have=20 > something shortly. >=20 > -Daryl. >=20 >=20 ------=_NextPart_000_000F_01C4998A.10E5AAC0 Content-Type: application/x-gzip; name="messages.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="messages.gz" H4sICHFBQkEAA21lc3NhZ2VzAO1d247juBF936/gU5AEvQNdbFkSkEEW2QFmEcxmJ91AHgYLQ03R tmJZ8kpyX/L1IXWxZd0ssqhu9zRnH9bumT7FU6wqVpEl6ov3jIw50ueu5rjGAv3Xw9sftfIPSp/T MF5/CKJVjLb0k++iZIXj3W7ph3iZkoj+gH5C2PRmZDHT0C47IF3THRSSiH7QjB++CApIY7zNJezS tYvYNybFw8TXblDKvviGZhJNWIBi8A4Y4A2hFHAcRQRnQRy5TIg5m1n0lzIvI8gUht4nMSZpyjik VDn0I8WXD5881cA1837mGRW4jv5gChJXfw+FhhQwfPbUmN9q+HiFEf2aPC1xQvwgS5G5QNnpm26J my61quUq8Xakg1hpVguFrtDHuBy2XsLlalLkuhzmcTlbWPZjnGxJ4qLi/yiM4z0iDyTKkPYkrrC3 vwYpBoqBYqAYKAaKgapJBClcT00CSGXecG6s0N8Ouv0u0MWrNX4ZXNUaP7y8am28bJ5qjWPKxVbn 8QIEV2fFQDFQDBQDxUAx4BPA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