chvt hangs on ioctl

Bug #440657 reported by dkg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: kbd

I'm using ubuntu jaunty, and after a few sessions of the graphical interface, the video console goes dark. ctrl-alt-F1 does not switch to a textmode console. (a getty is listening on /dev/tty1)

i can ssh into the machine, but when i try to chvt 1 to get to the first virtual terminal, chvt hangs.

if i strace it, it is hanging here:

ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbff34363) = -1 EINVAL (Invalid argument)
close(3) = 0
open("/dev/tty", O_RDWR) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbff34363) = -1 EINVAL (Invalid argument)
close(3) = 0
open("/dev/tty0", O_RDWR) = 3
ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(3, KDGKBTYPE, 0xbff34363) = 0
ioctl(3, VIDIOC_G_COMP or VT_ACTIVATE, 0x1) = 0
ioctl(3, VIDIOC_S_COMP or VT_WAITACTIVE^C <unfinished ...>

I think that chvt probably shouldn't hang if it fails to switch over; maybe it should exit with a non-zero return code? i don't know if it's possible to detect the difference from the ioctl.

This might be a kernel or driver or hardware bug (feel free to reassign if you think chvt is not at fault), so here is a bunch of information about the system in question:

0 cat:~# uname -a
Linux cat 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686 GNU/Linux
0 cat:~# lspci -v
00:00.0 Host bridge: Intel Corporation 82845G/GL[Brookdale-G]/GE/PE DRAM Controller/Host-Hub Interface (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, fast devsel, latency 0
 Memory at f0000000 (32-bit, prefetchable) [size=128M]
 Capabilities: [e4] Vendor Specific Information <?>
 Kernel driver in use: agpgart-intel
 Kernel modules: intel-agp

00:02.0 VGA compatible controller: Intel Corporation 82845G/GL[Brookdale-G]/GE Chipset Integrated Graphics Device (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, fast devsel, latency 0, IRQ 16
 Memory at e8000000 (32-bit, prefetchable) [size=128M]
 Memory at ff680000 (32-bit, non-prefetchable) [size=512K]
 Capabilities: [d0] Power Management version 1
 Kernel modules: intelfb

00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 16
 I/O ports at ff80 [size=32]
 Kernel driver in use: uhci_hcd

00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 19
 I/O ports at ff60 [size=32]
 Kernel driver in use: uhci_hcd

00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 18
 I/O ports at ff40 [size=32]
 Kernel driver in use: uhci_hcd

00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01) (prog-if 20)
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 23
 Memory at ffa00800 (32-bit, non-prefetchable) [size=1K]
 Capabilities: [50] Power Management version 2
 Capabilities: [58] Debug port: BAR=1 offset=0080
 Kernel driver in use: ehci_hcd

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 81)
 Flags: bus master, fast devsel, latency 0
 Bus: primary=00, secondary=01, subordinate=01, sec-latency=32
 I/O behind bridge: 0000e000-0000efff
 Memory behind bridge: ff800000-ff9fffff
 Kernel modules: shpchp

00:1f.0 ISA bridge: Intel Corporation 82801DB/DBL (ICH4/ICH4-L) LPC Interface Bridge (rev 01)
 Flags: bus master, medium devsel, latency 0
 Kernel modules: iTCO_wdt, intel-rng

00:1f.1 IDE interface: Intel Corporation 82801DB (ICH4) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 18
 I/O ports at 01f0 [size=8]
 I/O ports at 03f4 [size=1]
 I/O ports at 0170 [size=8]
 I/O ports at 0374 [size=1]
 I/O ports at ffa0 [size=16]
 Memory at 40000000 (32-bit, non-prefetchable) [size=1K]
 Kernel driver in use: ata_piix

00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
 Subsystem: Dell Device 0126
 Flags: medium devsel, IRQ 11
 I/O ports at dc80 [size=32]
 Kernel modules: i2c-i801

00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
 Subsystem: Dell Device 0126
 Flags: bus master, medium devsel, latency 0, IRQ 17
 I/O ports at d800 [size=256]
 I/O ports at dc40 [size=64]
 Memory at ffa00400 (32-bit, non-prefetchable) [size=512]
 Memory at ffa00000 (32-bit, non-prefetchable) [size=256]
 Capabilities: [50] Power Management version 2
 Kernel driver in use: Intel ICH
 Kernel modules: snd-intel8x0

01:0c.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)
 Subsystem: Dell Device 002e
 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 18
 Memory at ff8e0000 (32-bit, non-prefetchable) [size=128K]
 I/O ports at ecc0 [size=64]
 Capabilities: [dc] Power Management version 2
 Capabilities: [e4] PCI-X non-bridge device
 Capabilities: [f0] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable-
 Kernel driver in use: e1000
 Kernel modules: e1000

0 cat:~# lsmod
Module Size Used by
nls_cp437 13696 0
cifs 267172 0
binfmt_misc 16776 1
i915 67844 2
drm 96424 3 i915
bridge 56212 0
stp 10500 1 bridge
bnep 20224 2
video 25360 0
output 11008 1 video
input_polldev 11912 0
lp 17156 0
snd_intel8x0 37532 0
snd_ac97_codec 112292 1 snd_intel8x0
ac97_bus 9856 1 snd_ac97_codec
ppdev 15620 0
snd_pcm_oss 46336 0
snd_mixer_oss 22656 1 snd_pcm_oss
snd_pcm 83076 3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy 10756 0
snd_seq_oss 37760 0
snd_seq_midi 14336 0
snd_rawmidi 29696 1 snd_seq_midi
dcdbas 15264 0
snd_seq_midi_event 15104 2 snd_seq_oss,snd_seq_midi
snd_seq 56880 6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 29704 2 snd_pcm,snd_seq
snd_seq_device 14988 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
pcspkr 10496 0
snd 62756 10 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
soundcore 15200 1 snd
snd_page_alloc 16904 2 snd_intel8x0,snd_pcm
iTCO_wdt 19108 0
iTCO_vendor_support 11652 1 iTCO_wdt
shpchp 40212 0
intel_agp 34108 1
agpgart 42696 3 drm,intel_agp
parport_pc 40100 1
parport 42220 3 lp,ppdev,parport_pc
usbhid 42336 0
e1000 130500 0
floppy 64324 0
fbcon 46112 0
tileblit 10752 1 fbcon
font 16384 1 fbcon
bitblit 13824 1 fbcon
softcursor 9984 1 bitblit
0 cat:~# dmesg | tail
[ 29.612408] e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
[ 29.621531] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 39.752018] eth0: no IPv6 routers present
[ 1114.769655] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 2872.323366] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 3987.869905] [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 1
[ 3987.873719] mtrr: no MTRR for e8000000,8000000 found
[ 3989.703585] [drm:i915_setparam] *ERROR* unknown parameter 4
[ 3989.703631] [drm:i915_getparam] *ERROR* Unknown parameter 6
[ 3990.390619] [drm:i915_getparam] *ERROR* Unknown parameter 6
0 cat:~# cat /var/log/gdm/\:0.log{,.1}

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-23-server i686 Ubuntu
Current Operating System: Linux cat 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686
Build Date: 09 April 2009 02:10:02AM
xorg-server 2:1.6.0-0ubuntu14 (<email address hidden>)
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
 (++) from command line, (!!) notice, (II) informational,
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 2 10:48:36 2009
(==) Using config file: "/etc/X11/xorg.conf"
get fences failed: -1
param: 6, val: 0
get fences failed: -1
param: 6, val: 0

X.Org X Server 1.6.0
Release Date: 2009-2-25
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.24-23-server i686 Ubuntu
Current Operating System: Linux cat 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 18:40:08 UTC 2009 i686
Build Date: 09 April 2009 02:10:02AM
xorg-server 2:1.6.0-0ubuntu14 (<email address hidden>)
 Before reporting problems, check http://wiki.x.org
 to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
 (++) from command line, (!!) notice, (II) informational,
 (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Oct 2 09:42:32 2009
(==) Using config file: "/etc/X11/xorg.conf"
get fences failed: -1
param: 6, val: 0
get fences failed: -1
param: 6, val: 0
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Duplicate shape name ""
> Using last definition
> Warning: Multiple doodads named ""
> Using first definition
> Warning: Multiple doodads named ""
> Using first definition
> Warning: Multiple doodads named ""
> Using first definition
> Warning: Multiple doodads named ""
> Using first definition
> Warning: Multiple doodads named ""
> Using first definition
> Warning: Multiple doodads named ""
> Using first definition
Errors from xkbcomp are not fatal to the X server
error setting MTRR (base = 0xe8000000, size = 0x08000000, type = 1) Invalid argument (22)
 ddxSigGiveUp: Closing log
0 cat:~#

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

If the ioctl's hanging, chvt can't do much about that - that's a kernel thing. It also can't reasonably skip calling that particular ioctl, since that's the documented way to wait for a VT to become active, which is expected behaviour from chvt. As such, I'm reassigning this to the kernel.

affects: kbd (Ubuntu) → linux (Ubuntu)
Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi dkg,

This bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? Can you try with the latest development release of Ubuntu? ISO CD images are available from http://cdimage.ubuntu.com/releases/ .

If it remains an issue, could you run the following command from a Terminal (Applications->Accessories->Terminal). It will automatically gather and attach updated debug information to this report.

apport-collect -p linux 440657

Also, if you could test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-kernel-logs
tags: added: needs-upstream-testing
tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
dkg (dkg0) wrote :

This machine is no longer exhibiting this behavior because i turned off hardware acceleration for X11 with the following /etc/X11/xorg.conf:

Section "Device"
        Identifier "Configured Video Device"
        Driver "intel"
        Option "NoAccel" "true"
EndSection

(i arrived at this thanks to https://bugs.launchpad.net/ubuntu/jaunty/+source/xserver-xorg-video-intel/+bug/304871/comments/42 )

as a result, graphics are a bit cruftier on the machine, but it continues to work at least.

I can't afford to upgrade this machine directly to lucid at the moment. when i do, i'll remove the xorg.conf and see if i can coax the problem to recur.

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

This bug report was marked as Incomplete and has not had any updated comments for quite some time. As a result this bug is being closed. Please reopen if this is still an issue in the current Ubuntu development release http://cdimage.ubuntu.com/daily-live/current/ . Also, please be sure to provide any requested information that may have been missing. To reopen the bug, click on the current status under the Status column and change the status back to "New". Thanks.

[This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-expired
Changed in linux (Ubuntu):
status: Incomplete → Expired
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.