[hardy] key events are delayed under circumstances

Bug #218516 reported by Tom Jaeger
72
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Low
Tim Gardner
Hardy
Fix Released
Low
Tim Gardner
Intrepid
Fix Released
Low
Tim Gardner

Bug Description

Most of the discussion of this bug can be found in the report of bug #124406. Since several bugs with similar symptions are being discussed in that thread, I thought I'd separate this issue from the discussion for which we know what is going on and for which there is a fix upstream.

Steps to reproduce:
1. Type a command into a console window in X that involves sudo and will generate some processor and/or disk activity, e.g. 'sudo apt-get upgrade'
2. Press the Enter key and hold it down for about half a second, so that there is CPU/disk activity when the key is released.
The X server will not receive the key up event until after a few seconds later, so autorepeat will kick in and generate lots of 'Enter' events.
A surefire way to trigger this bug is by doing something like 'for ((;;)); do sudo apt-get upgrade; done' and then trying to type something in a different window, you'll notice that key presses are delayed.

This turns out to be a scheduler issue where a task's vruntime wouldn't be reset when the task was moved between groups. The (essentially two-line) fix is included in the upstream 2.6.25 release. Here's the relevant git commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=810b38179e9e4d4f57b4b733767bb08f8291a965

I've copied the debdiff fixing the issue on the ubuntu kernel from the other thread. It's causing absolutely ZERO new issues on my system.

Revision history for this message
Tom Jaeger (thjaeger) wrote :
Revision history for this message
Chris Jones (cmsj) wrote :

Absolutely confirmed, I regularly get a dozen or more blank lines after I hit enter to do a sudo apt-get operation (because the enter event is being repeated). It's extremely problematic because of being associated with sudo (e.g. I don't get to answer Y/n to apt-get, I get the default picked and if I'm lucky I can ctrl-c it before it actually happens, so I can review it).

Changed in linux:
status: New → Confirmed
Stefan Bader (smb)
Changed in linux:
assignee: nobody → stefan-bader-canonical
importance: Undecided → Low
milestone: none → ubuntu-8.04.1
status: Confirmed → In Progress
Revision history for this message
pauls (paulatgm) wrote :

confirmed here also on hardy, not gutsy

Stefan Bader (smb)
Changed in linux:
status: In Progress → Fix Committed
Revision history for this message
Savvas Radevic (medigeek) wrote :

Tom, does this fix the problem with the dozen lines *after* apt is done, or does it fix the problem that it overpasses the y/n/q prompt too?

Tim Gardner (timg-tpi)
Changed in linux:
assignee: stefan-bader-canonical → timg-tpi
Revision history for this message
Tim Gardner (timg-tpi) wrote :

SRU Justification:

Impact: Delayed and/or extra key strokes causing user confusion and annoyance.

Fix Description: Tasks would retain their old vruntime when moved between groups, this can cause funny lags. Re-set the vruntime on group move to fit within the new tree.

Patch: http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=commit;h=4b7c68904bf9ada8c4770ce5927e8ec71769ed92

TEST CASE: See the first description in this bug report.

Revision history for this message
Colin Watson (cjwatson) wrote :

Accepted into hardy-proposed.

Revision history for this message
Steve Langasek (vorlon) wrote :

Chris, can you confirm that 2.6.24-17 resolves this problem for you in the environment where you're seeing it?

Steve Langasek (vorlon)
Changed in linux:
assignee: nobody → timg-tpi
importance: Undecided → Low
milestone: none → ubuntu-8.04.1
status: New → Fix Committed
milestone: ubuntu-8.04.1 → none
Revision history for this message
Lars Ljung (larslj) wrote :

I can confirm that 2.6.24-17 resolves the problem on my system.

Revision history for this message
Martin Pitt (pitti) wrote :

linux 2.6.24-17.31 copied to hardy-updates.

Changed in linux:
status: Fix Committed → Fix Released
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

This is "Fix Released" for Intrepid as well.

Changed in linux:
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.