Linux 2.6.36: When everything freezes

This post was written by eli on November 2, 2010
Posted Under: Linux

There’s a bug in the kernel, which causes the Big TTY Mutex to be held for some 30 seconds every time certain TTY devices are closed. During these 30 seconds, no TTY operation is possible (including pseudo terminals), which practically means that most, if not all communication with the keyboard is stalled. Since GUI applications don’t expect simple TTY I/O to take time, they perform these operations in the main GUI loop, which causes GUI to freeze as well. In particular, this is evident on my Fedora 12: I can’t type in my password, but only after waiting a few minutes for something to get in order.

The kernel bug is being discussed as these lines are written, and it would be reasonable to expect that a patch will be out within a week or two. But first we need to find out exactly what went wrong.

In the meanwhile, it may be possible to work around the problem by disabling the application which causes these long closes. In my case, it is modem-manager which probes serial ports for cellular modems or whatever, which I don’t have.

It might be worthy to check out /usr/log/messages for entries like this:

Oct 27 18:16:35 ocho modem-manager: (ttyS2) opening serial device...
Oct 27 18:16:35 ocho modem-manager: (ttyS3) closing serial device...
Oct 27 18:17:05 ocho modem-manager: (ttyS3) opening serial device...
Oct 27 18:17:09 ocho modem-manager: (ttyS1) closing serial device...
Oct 27 18:17:39 ocho modem-manager: (ttyS2) closing serial device...

See the 30 seconds gap between closing a serial device and the next entry? That’s the time the kernel holds the close() call until timeout. It’s not clear whether the 30 seconds delay is correct behavior, but it is clear that a change in the locking schema in 2.6.36 causes all other TTY operations in the system to wait.

The immediate solution could be to turn off the NetworkManager service (which may remove some desirable features from your system), or configure it not to probe serial devices. I haven’t gotten into this further, since I need this on for debugging purposes.

If your issue is with the modem-manager, please leave a comment below. I’d like to contact you to acquire some information about your hardware. One of the possibilities is that the problem occurs due to a hardware issue.

As my dentist always says: It will be over in no time.

Reader Comments

I have exactly the same issue. I’m testing the MEPIS 11 alpha releases and have the same freezes that correspond with modem-manager closing ttyS1, S2 & S3

I’m runnning an XFX nforce 750 motherboard with an Athlon X2 5000 Black edition processor & 2gig ram.

[tim@TIM-8 ~]$ lspci
00:00.0 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a2)
00:01.0 ISA bridge: nVidia Corporation nForce 750a LPC Bridge (rev a2)
00:01.1 SMBus: nVidia Corporation MCP78S [GeForce 8200] SMBus (rev a1)
00:01.2 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a1)
00:01.3 Co-processor: nVidia Corporation MCP78S [GeForce 8200] Co-Processor (rev a2)
00:01.4 RAM memory: nVidia Corporation MCP78S [GeForce 8200] Memory Controller (rev a1)
00:02.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
00:02.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
00:04.0 USB Controller: nVidia Corporation MCP78S [GeForce 8200] OHCI USB 1.1 Controller (rev a1)
00:04.1 USB Controller: nVidia Corporation MCP78S [GeForce 8200] EHCI USB 2.0 Controller (rev a1)
00:06.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] IDE (rev a1)
00:07.0 Audio device: nVidia Corporation MCP72XE/MCP72P/MCP78U/MCP78S High Definition Audio (rev a1)
00:08.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
00:09.0 IDE interface: nVidia Corporation MCP78S [GeForce 8200] SATA Controller (non-AHCI mode) (rev a2)
00:0b.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Express Bridge (rev a1)
00:10.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Express Bridge (rev a1)
00:12.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Express Bridge (rev a1)
00:13.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
00:14.0 PCI bridge: nVidia Corporation MCP78S [GeForce 8200] PCI Bridge (rev a1)
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control
01:09.0 Modem: Smart Link Ltd. SmartLink SmartPCI562 56K Modem (rev 04)
02:00.0 VGA compatible controller: nVidia Corporation C77 [nForce 750a SLI] (rev a2)
05:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 14)
06:00.0 Multimedia video controller: Conexant Systems, Inc. CX23885 PCI Video and Audio Decoder (rev 03)

[tim@TIM-8 ~]$ lsusb
Bus 004 Device 002: ID 03f0:2f11 Hewlett-Packard PSC 1200
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 058f:6362 Alcor Micro Corp. Flash Card Reader/Writer
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

#1 
Written By Timothy Harris on January 6th, 2011 @ 00:16

Add a Comment

required, use real name
required, will not be published
optional, your blog address