kernel freeze related to rfcomm and maybe tty

Bug #713837 reported by vlad
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Kernel freezes for ~2 seconds after trying to access /dev/rfcommX device.
Steps to reproduce:
1. Edit /etc/bluetooth/rfcomm.conf - uncomment default config, set "bind" to "yes".
2. Issue "sudo rfcomm bind all" to create /dev/rfcomm0 device node.
3. Issue "cat /dev/rfcomm0" to trigger a bug.
Everything freezes (at least GUI): cursor does not move, no response from keypresses, no gui redraw for 2~3 seconds.
Then cat displays expected error message "cat: /dev/rfcomm0: Host is down" and system starts to respond again.
What expected (and occurs with 2.6.35) : no freeze between cat and error message.
Things goes worse when device, mentioned in /etc/bluetooth/rfcomm.conf is in range and not paired - system displays pairing request and locks up for a longer time, maybe completely - I did not wait longer than ~30 seconds and turned off bluetooth device.
Bug may be introduced with recent changes to tty code to remove dependency on BKL. 2.6.36-rc1 shows this bug.
Will try development kernel with recent tty fixes and investigate further.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.38-1-generic 2.6.38-1.28
Regression: Yes
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.38-1.28-generic 2.6.38-rc2
Uname: Linux 2.6.38-1-generic i686
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: i386
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC272 Analog [ALC272 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: vlad 10147 F.... pulseaudio
CRDA: Error: [Errno 2] Нет такого файла или каталога
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf0340000 irq 43'
   Mixer name : 'Realtek ALC272'
   Components : 'HDA:10ec0272,144dca00,00100001'
   Controls : 19
   Simple ctrls : 11
Date: Sun Feb 6 01:25:29 2011
HibernationDevice: RESUME=UUID=bfb94be8-7bdf-433b-8efa-340064d00a36
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Alpha i386 (20110202)
MachineType: SAMSUNG ELECTRONICS CO., LTD. NC10
ProcEnviron:
 LANGUAGE=ru_RU.UTF-8:ru:en_GB:en
 LANG=ru_RU.UTF-8
 LC_MESSAGES=ru_RU.utf8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-1-generic root=UUID=d9cd70a9-5da9-47e7-8087-f9d08e9d7a10 ro quiet splash vt.handoff=7
RelatedPackageVersions:
 linux-restricted-modules-2.6.38-1-generic N/A
 linux-backports-modules-2.6.38-1-generic N/A
 linux-firmware 1.46
SourcePackage: linux
dmi.bios.date: 09/08/2009
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: 11CA.M015.20090908.RHU
dmi.board.name: NC10
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: Not Applicable
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvr11CA.M015.20090908.RHU:bd09/08/2009:svnSAMSUNGELECTRONICSCO.,LTD.:pnNC10:pvrNotApplicable:rvnSAMSUNGELECTRONICSCO.,LTD.:rnNC10:rvrNotApplicable:cvnSAMSUNGELECTRONICSCO.,LTD.:ct10:cvrN/A:
dmi.product.name: NC10
dmi.product.version: Not Applicable
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.

Revision history for this message
vlad (vladisslav) wrote :
Revision history for this message
vlad (vladisslav) wrote :

Attached patch fixes this bug.

Revision history for this message
vlad (vladisslav) wrote :

Patch sent upstread.

Changed in linux (Ubuntu):
status: New → Fix Committed
Revision history for this message
Andy Whitcroft (apw) wrote :

Just checked, as of v2.6.38-rc5 this patch is not yet in the mainline kernel. Moving back to Triaged as the fix is not committed in any of our trees.

Changed in linux (Ubuntu):
status: Fix Committed → Triaged
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok I have found the patch submission upstream. The patch does look correct and upstream seems amenable to taking it. They are however asking for a git format patch with your signed-off-by: attached. Could you follow up with them please:

    http://www.spinics.net/lists/linux-bluetooth/msg10694.html

tags: removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
vlad (vladisslav) wrote :

Correct patch was sent to Gustavo F. Padovan and he told me that he has commited it via e-mail. But as I see, he has not yet merged his trees and pushed changes to linux-next.
Correct patch attached.

Revision history for this message
vlad (vladisslav) wrote :
Revision history for this message
Andy Whitcroft (apw) wrote :

Ok thanks. I've pulled in the git version above for the next Natty upload. Thanks for finding the bug and fixing. This fix should be replaced by upstream fixes as and when they arrive.

Changed in linux (Ubuntu):
status: Incomplete → In Progress
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 2.6.38-4.31

---------------
linux (2.6.38-4.31) natty; urgency=low

  [ Andy Whitcroft ]

  * add in bugs closed by upstream patches pulled in by rebases
  * rebase to 795abaf1e4e188c4171e3cd3dbb11a9fcacaf505
  * [Config] enable CONFIG_VSX to allow use of vector instuctions
  * resync with maverick 98defa1c5773a3d7e4c524967eb01d5bae035816
  * rebase to mainline v2.6.38-rc5
  * SAUCE: ecryptfs: read on a directory should return EISDIR if not
    supported
    - LP: #719691

  [ Colin Ian King ]

  * SAUCE: Dell All-In-One: Remove need for Dell module alias

  [ Manoj Iyer ]

  * SAUCE: (drop after 2.6.38) add ricoh 0xe823 pci id.
    - LP: #717435

  [ Tim Gardner ]

  * [Config] CONFIG_CRYPTO_CRC32C_INTEL=y

  [ Upstream Kernel Changes ]

  * Quirk to fix suspend/resume on Lenovo Edge 11,13,14,15
    - LP: #702434
  * vfs: fix BUG_ON() in fs/namei.c:1461

  [ Vladislav P ]

  * SAUCE: Release BTM while sleeping to avoid deadlock.
    - LP: #713837

  [ Major Kernel Changes ]

  * rebase from v2.6.38-rc4 to v2.6.38-rc5
    - LP: #579276
    - LP: #715877
    - LP: #713769
  * resync with Maverick Ubuntu-2.6.35-27.47
 -- Andy Whitcroft <email address hidden> Fri, 11 Feb 2011 17:24:09 +0000

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.