This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 1060457

Summary: Bluetooth RFCOMM: Transport endpoint not connected (kernel regression)
Product: [Fedora] Fedora Reporter: Rob Riggs <rob+redhat>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 19CC: ecdpalma, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 14:56:54 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Rob Riggs 2014-02-01 16:59:14 EST
Description of problem:

With the latest 3.12.6 and 3.12.8 kernels, some Bluetooth RFCOMM connections fail with "Transport endpoint not connected" after a Bluetooth connection is established.  Rebooting into a 3.11.10 kernel makes the problem go away.

This is regression in the kernel Bluetooth support.

This occurs with avrdude and pyserial code that connects to an Arduino over Bluetooth HC-05 adapter.  Cutecom and Minicom work OK, but the connection takes many (3-5) seconds to establish, when in the past it was nearly instantaneous.  The same pyserial and avrdude code works on older kernels and on Windows.

Version-Release number of selected component (if applicable):
3.12.6, 3.12.8

How reproducible:
Always

Steps to Reproduce:
1. Pair an RFCOMM device
2. rfcomm bind 0
3. Run the following Python code (requires pyserial)

#!/usr/bin/env python

from serial import Serial, SerialException
import time

try:
    # Do or do not; there is no try (here we "do not" under 3.12.8)
    print "Connecting..."
    s = Serial("/dev/rfcomm0", 115200, timeout=.1)
    print "Writing..."
    s.write("foo")
    print "Reading..."
    s.read()
except SerialException, ex:
    print ex

try:
    # Repeat Yoda's words of wisdom
    print "Connecting..."
    s = Serial("/dev/rfcomm0", 115200, timeout=.1)
    time.sleep(5) # Magic kernel-3.12.8 RFCOMM incantation
    print "Writing..."
    s.write("foo")
    print "Reading..."
    s.read()
except SerialException, ex:
    print ex
 

Actual results:
First one fails, resulting in "write failed: [Errno 107] Transport endpoint is not connected"; the second one succeeds.

Expected results:
Both succeed.  The need for the 5 second sleep is bogus.  As soon as a file descriptor is returned, it should be immediately usable.

Additional info:
Comment 1 Rob Riggs 2014-02-04 20:38:25 EST
Please try the patch proposed in this thread:

http://comments.gmane.org/gmane.linux.bluez.kernel/42303

Patch here:
http://cache.gmane.org//gmane/linux/bluez/kernel/42336-001.bin
Comment 2 Justin M. Forbes 2014-03-10 10:50:20 EDT
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 19 kernel bugs.

Fedora 19 has now been rebased to 3.13.5-100.fc19.  Please test this kernel update and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you experience different issues, please open a new bug report for those.
Comment 3 Rob Riggs 2014-03-10 21:20:07 EDT
This is not a stale bug.  This problem still exists in the 3.13.5 kernel.  I still must use a 3.11 kernel if I wish to use Bluetooth SPP.
Comment 4 Rob Riggs 2014-03-23 12:48:30 EDT
Still exists in kernel-3.13.6-100.fc19.x86_64

Anyone else paying attention to this problem except for me?  Broken Bluetooth SPP/RFCOMM support for 2 months seems like it should be a bigger deal.

You cannot send ENOTCONN for a non-blocking call.  The proper response is EAGAIN or EWOULDBLOCK.
Comment 5 Justin M. Forbes 2014-05-21 15:30:31 EDT
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 19 kernel bugs.

Fedora 19 has now been rebased to 3.14.4-100.fc19.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 20, and are still experiencing this issue, please change the version to Fedora 20.

If you experience different issues, please open a new bug report for those.
Comment 6 Rob Riggs 2014-06-14 11:02:16 EDT
This appears to be fixed in 3.14.4-100.fc19.  Can someone point to a Kernel commit where this was fixed?  I've been following the Bluetooth kernel commits and do not see one explicitly for this.
Comment 7 Fedora End Of Life 2015-01-09 16:09:20 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2015-02-17 14:56:54 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.