2009-03-14 14:35:03

by Frans Pop

[permalink] [raw]
Subject: DRM oops while starting second X.org session in chroot

I had the oops below today after I tried to start a second X.org session
in a chroot using 'startx -- :1'. I think the problem here is that the
driver was loaded, but that the corresponding device did not exist in
/dev in the chroot (forgot to bind mount it). If that is the cause,
it would be nice if it was handled more gracefully than this :-P

The oops also hung my primary X session. I could no longer switch consoles.
Sysrq did still work.

The first 3 messages are almost certainly from starting X in the main
X session, but I've left them in to show that that did work.

The "drm:i915_get_vblank_counter" is an extremely annoying message that
I get with 2.6.29 whenever I suspend the system or start a session for
a second user. Before 2.6.29 I only very rarely saw it.

Kernel is 2.6.28-rc8 with selected patches on top. Only possibly relevant
extra patch is Venki's latest PAT fix [1]. I also have Rafael's "rework
suspend/resume ordering" series applied.

Cheers,
FJP

[1] http://lkml.org/lkml/2009/3/12/399

Mar 14 08:21:04 aragorn kernel: [drm] Initialized drm 1.1.0 20060810
Mar 14 08:21:05 aragorn kernel: pci 0000:00:02.0: irq 28 for MSI/MSI-X
Mar 14 08:21:05 aragorn kernel: [drm] Initialized i915 1.6.0 20080730 on minor 0
Mar 14 08:22:49 aragorn kernel: [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
Mar 14 08:22:52 aragorn kernel: ------------[ cut here ]------------
Mar 14 08:22:52 aragorn kernel: kernel BUG at /home/fjp/projects/kernel/linux-2.6/drivers/gpu/drm/drm_fops.c:146!
Mar 14 08:22:52 aragorn kernel: invalid opcode: 0000 [#1] SMP
Mar 14 08:22:52 aragorn kernel: last sysfs file: /sys/class/backlight/acpi_video0/brightness
Mar 14 08:22:52 aragorn kernel: CPU 1
Mar 14 08:22:52 aragorn kernel: Modules linked in: i915 drm i2c_algo_bit i2c_core ppdev parport_pc lp parport ipv6 nfsd exportfs nfs lockd
nfs_acl auth_rpcgss sunrpc ext2 coretemp hp_wmi acpi_cpufreq loop snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss
snd_mixer_oss snd_pcm arc4 snd_seq_dummy ecb snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event iwlagn iwlcore snd_seq snd_timer
rfkill snd_seq_device lib80211 mac80211 pcmcia snd joydev intel_agp psmouse iTCO_wdt serio_raw soundcore snd_page_alloc hp_accel cfg80211
yenta_socket rsrc_nonstatic pcmcia_core container pcspkr wmi video output battery ac button lis3lv02d evdev ext3 jbd mbcache
sha256_generic aes_x86_64 aes_generic cbc dm_crypt dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sg sr_mod cdrom sd_mod piix ata_piix
uhci_hcd ide_pci_generic ide_core pata_acpi ohci1394 sdhci_pci sdhci ricoh_mmc ieee1394 mmc_core led_class ata_generic ehci_hcd libata
scsi_mod e1000e thermal processor fan thermal_sys
Mar 14 08:22:52 aragorn kernel: Pid: 5487, comm: Xorg Not tainted 2.6.29-rc8-rjw #6 HP Compaq 2510p Notebook PC
Mar 14 08:22:52 aragorn kernel: RIP: 0010:[<ffffffffa04eff8b>] [<ffffffffa04eff8b>] drm_open+0x4b5/0x4ee [drm]
Mar 14 08:22:52 aragorn kernel: RSP: 0018:ffff8800605b7cd8 EFLAGS: 00010206
Mar 14 08:22:52 aragorn kernel: RAX: ffff88007bf295c8 RBX: ffff88007bc18038 RCX: 0000000000000000
Mar 14 08:22:52 aragorn kernel: RDX: ffff880058448528 RSI: ffff8800605b7cc8 RDI: ffff8800605b7c60
Mar 14 08:22:52 aragorn kernel: RBP: ffff8800605b7d18 R08: ffff88007bc18000 R09: ffff88007e038000
Mar 14 08:22:52 aragorn kernel: R10: ffff8800605b7e48 R11: 0000000000000007 R12: 0000000000000000
Mar 14 08:22:52 aragorn kernel: R13: ffff88007bc18000 R14: ffff88007bc18038 R15: ffff880065615f18
Mar 14 08:22:52 aragorn kernel: FS: 00007f5e523c26f0(0000) GS:ffff88007e002b00(0000) knlGS:0000000000000000
Mar 14 08:22:52 aragorn kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Mar 14 08:22:52 aragorn kernel: CR2: 00007f5e4f0d2e60 CR3: 000000007cc16000 CR4: 00000000000006e0
Mar 14 08:22:52 aragorn kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Mar 14 08:22:52 aragorn kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Mar 14 08:22:52 aragorn kernel: Process Xorg (pid: 5487, threadinfo ffff8800605b6000, task ffff8800605ac200)
Mar 14 08:22:52 aragorn kernel: Stack:
Mar 14 08:22:52 aragorn kernel: ffff88006c4b6b00 ffff880058448528 ffff88007c774c00 00000000ffffffed
Mar 14 08:22:52 aragorn kernel: ffffffffa04fe800 ffff88006c4b6b00 ffff880058448528 ffff880058448528
Mar 14 08:22:52 aragorn kernel: ffff8800605b7d48 ffffffffa04efa5a 0000000000000000 ffff88007c711900
Mar 14 08:22:52 aragorn kernel: Call Trace:
Mar 14 08:22:52 aragorn kernel: [<ffffffffa04efa5a>] drm_stub_open+0xd8/0x154 [drm]
Mar 14 08:22:52 aragorn kernel: [<ffffffff8029cc33>] chrdev_open+0x161/0x180
Mar 14 08:22:52 aragorn kernel: [<ffffffff8029cad2>] ? chrdev_open+0x0/0x180
Mar 14 08:22:52 aragorn kernel: [<ffffffff80298a01>] __dentry_open+0x157/0x273
Mar 14 08:22:52 aragorn kernel: [<ffffffff80298bea>] nameidata_to_filp+0x41/0x52
Mar 14 08:22:52 aragorn kernel: [<ffffffff802a3feb>] do_filp_open+0x3e9/0x7fb
Mar 14 08:22:52 aragorn kernel: [<ffffffff8044cd5a>] ? _spin_unlock+0x9/0xb
Mar 14 08:22:52 aragorn kernel: [<ffffffff802ad4cb>] ? alloc_fd+0x11d/0x12e
Mar 14 08:22:52 aragorn kernel: [<ffffffff802987e6>] do_sys_open+0x53/0xda
Mar 14 08:22:52 aragorn kernel: [<ffffffff80298896>] sys_open+0x1b/0x1d
Mar 14 08:22:52 aragorn kernel: [<ffffffff8020c25b>] system_call_fastpath+0x16/0x1b
Mar 14 08:22:52 aragorn kernel: Code: 48 89 df e8 20 bd f5 df 48 8b 45 d0 83 78 04 01 75 2f 49 8b 85 38 04 00 00 48 85 c0 74 11 48 8b 55
c8 48 3b 82 68 01 00 00 74 16 <0f> 0b eb fe 48 8b 55 c8 48 8b 82 68 01 00 00 49 89 85 38 04 00
Mar 14 08:22:52 aragorn kernel: RIP [<ffffffffa04eff8b>] drm_open+0x4b5/0x4ee [drm]
Mar 14 08:22:52 aragorn kernel: RSP <ffff8800605b7cd8>
Mar 14 08:22:52 aragorn kernel: ---[ end trace 41be7e0f42a73435 ]---


Attachments:
(No filename) (5.68 kB)
config-2.6.29-rc8-rjw (65.41 kB)
Download all attachments

2009-03-15 00:39:21

by Dave Airlie

[permalink] [raw]
Subject: Re: DRM oops while starting second X.org session in chroot

On Sun, Mar 15, 2009 at 12:34 AM, Frans Pop <[email protected]> wrote:
> I had the oops below today after I tried to start a second X.org session
> in a chroot using 'startx -- :1'. I think the problem here is that the
> driver was loaded, but that the corresponding device did not exist in
> /dev in the chroot (forgot to bind mount it). If that is the cause,
> it would be nice if it was handled more gracefully than this :-P

Its a bug in userspace we can't do anything about at this point,

The problem is we attach some information to the device inode and if you
starting using an alternate inode it screws up, I think Thomas had
suggested ways aruond
this. We could probably make it a WARN_ON and fail DRI setup.

Dave.

>
> The oops also hung my primary X session. I could no longer switch consoles.
> Sysrq did still work.
>
> The first 3 messages are almost certainly from starting X in the main
> X session, but I've left them in to show that that did work.
>
> The "drm:i915_get_vblank_counter" is an extremely annoying message that
> I get with 2.6.29 whenever I suspend the system or start a session for
> a second user. Before 2.6.29 I only very rarely saw it.
>
> Kernel is 2.6.28-rc8 with selected patches on top. Only possibly relevant
> extra patch is Venki's latest PAT fix [1]. I also have Rafael's "rework
> suspend/resume ordering" series applied.
>
> Cheers,
> FJP
>
> [1] http://lkml.org/lkml/2009/3/12/399
>
> Mar 14 08:21:04 aragorn kernel: [drm] Initialized drm 1.1.0 20060810
> Mar 14 08:21:05 aragorn kernel: pci 0000:00:02.0: irq 28 for MSI/MSI-X
> Mar 14 08:21:05 aragorn kernel: [drm] Initialized i915 1.6.0 20080730 on minor 0
> Mar 14 08:22:49 aragorn kernel: [drm:i915_get_vblank_counter] *ERROR* trying to get vblank count for disabled pipe 0
> Mar 14 08:22:52 aragorn kernel: ------------[ cut here ]------------
> Mar 14 08:22:52 aragorn kernel: kernel BUG at /home/fjp/projects/kernel/linux-2.6/drivers/gpu/drm/drm_fops.c:146!
> Mar 14 08:22:52 aragorn kernel: invalid opcode: 0000 [#1] SMP
> Mar 14 08:22:52 aragorn kernel: last sysfs file: /sys/class/backlight/acpi_video0/brightness
> Mar 14 08:22:52 aragorn kernel: CPU 1
> Mar 14 08:22:52 aragorn kernel: Modules linked in: i915 drm i2c_algo_bit i2c_core ppdev parport_pc lp parport ipv6 nfsd exportfs nfs lockd
> nfs_acl auth_rpcgss sunrpc ext2 coretemp hp_wmi acpi_cpufreq loop snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss
> snd_mixer_oss snd_pcm arc4 snd_seq_dummy ecb snd_seq_oss snd_seq_midi snd_rawmidi snd_seq_midi_event iwlagn iwlcore snd_seq snd_timer
> rfkill snd_seq_device lib80211 mac80211 pcmcia snd joydev intel_agp psmouse iTCO_wdt serio_raw soundcore snd_page_alloc hp_accel cfg80211
> yenta_socket rsrc_nonstatic pcmcia_core container pcspkr wmi video output battery ac button lis3lv02d evdev ext3 jbd mbcache
> sha256_generic aes_x86_64 aes_generic cbc dm_crypt dm_mirror dm_region_hash dm_log dm_snapshot dm_mod sg sr_mod cdrom sd_mod piix ata_piix
> uhci_hcd ide_pci_generic ide_core pata_acpi ohci1394 sdhci_pci sdhci ricoh_mmc ieee1394 mmc_core led_class ata_generic ehci_hcd libata
> scsi_mod e1000e thermal processor fan thermal_sys
> Mar 14 08:22:52 aragorn kernel: Pid: 5487, comm: Xorg Not tainted 2.6.29-rc8-rjw #6 HP Compaq 2510p Notebook PC
> Mar 14 08:22:52 aragorn kernel: RIP: 0010:[<ffffffffa04eff8b>] ?[<ffffffffa04eff8b>] drm_open+0x4b5/0x4ee [drm]
> Mar 14 08:22:52 aragorn kernel: RSP: 0018:ffff8800605b7cd8 ?EFLAGS: 00010206
> Mar 14 08:22:52 aragorn kernel: RAX: ffff88007bf295c8 RBX: ffff88007bc18038 RCX: 0000000000000000
> Mar 14 08:22:52 aragorn kernel: RDX: ffff880058448528 RSI: ffff8800605b7cc8 RDI: ffff8800605b7c60
> Mar 14 08:22:52 aragorn kernel: RBP: ffff8800605b7d18 R08: ffff88007bc18000 R09: ffff88007e038000
> Mar 14 08:22:52 aragorn kernel: R10: ffff8800605b7e48 R11: 0000000000000007 R12: 0000000000000000
> Mar 14 08:22:52 aragorn kernel: R13: ffff88007bc18000 R14: ffff88007bc18038 R15: ffff880065615f18
> Mar 14 08:22:52 aragorn kernel: FS: ?00007f5e523c26f0(0000) GS:ffff88007e002b00(0000) knlGS:0000000000000000
> Mar 14 08:22:52 aragorn kernel: CS: ?0010 DS: 0000 ES: 0000 CR0: 000000008005003b
> Mar 14 08:22:52 aragorn kernel: CR2: 00007f5e4f0d2e60 CR3: 000000007cc16000 CR4: 00000000000006e0
> Mar 14 08:22:52 aragorn kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> Mar 14 08:22:52 aragorn kernel: DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
> Mar 14 08:22:52 aragorn kernel: Process Xorg (pid: 5487, threadinfo ffff8800605b6000, task ffff8800605ac200)
> Mar 14 08:22:52 aragorn kernel: Stack:
> Mar 14 08:22:52 aragorn kernel: ?ffff88006c4b6b00 ffff880058448528 ffff88007c774c00 00000000ffffffed
> Mar 14 08:22:52 aragorn kernel: ?ffffffffa04fe800 ffff88006c4b6b00 ffff880058448528 ffff880058448528
> Mar 14 08:22:52 aragorn kernel: ?ffff8800605b7d48 ffffffffa04efa5a 0000000000000000 ffff88007c711900
> Mar 14 08:22:52 aragorn kernel: Call Trace:
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffffa04efa5a>] drm_stub_open+0xd8/0x154 [drm]
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff8029cc33>] chrdev_open+0x161/0x180
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff8029cad2>] ? chrdev_open+0x0/0x180
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff80298a01>] __dentry_open+0x157/0x273
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff80298bea>] nameidata_to_filp+0x41/0x52
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff802a3feb>] do_filp_open+0x3e9/0x7fb
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff8044cd5a>] ? _spin_unlock+0x9/0xb
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff802ad4cb>] ? alloc_fd+0x11d/0x12e
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff802987e6>] do_sys_open+0x53/0xda
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff80298896>] sys_open+0x1b/0x1d
> Mar 14 08:22:52 aragorn kernel: ?[<ffffffff8020c25b>] system_call_fastpath+0x16/0x1b
> Mar 14 08:22:52 aragorn kernel: Code: 48 89 df e8 20 bd f5 df 48 8b 45 d0 83 78 04 01 75 2f 49 8b 85 38 04 00 00 48 85 c0 74 11 48 8b 55
> c8 48 3b 82 68 01 00 00 74 16 <0f> 0b eb fe 48 8b 55 c8 48 8b 82 68 01 00 00 49 89 85 38 04 00
> Mar 14 08:22:52 aragorn kernel: RIP ?[<ffffffffa04eff8b>] drm_open+0x4b5/0x4ee [drm]
> Mar 14 08:22:52 aragorn kernel: ?RSP <ffff8800605b7cd8>
> Mar 14 08:22:52 aragorn kernel: ---[ end trace 41be7e0f42a73435 ]---
>
>

2009-03-15 06:50:52

by Frans Pop

[permalink] [raw]
Subject: Re: DRM oops while starting second X.org session in chroot

On Sunday 15 March 2009, Dave Airlie wrote:
> On Sun, Mar 15, 2009 at 12:34 AM, Frans Pop <[email protected]> wrote:
> > I had the oops below today after I tried to start a second X.org
> > session in a chroot using 'startx -- :1'. I think the problem here is
> > that the driver was loaded, but that the corresponding device did not
> > exist in /dev in the chroot (forgot to bind mount it). If that is the
> > cause, it would be nice if it was handled more gracefully than this
> > :-P
>
> Its a bug in userspace we can't do anything about at this point,
>
> The problem is we attach some information to the device inode and if
> you starting using an alternate inode it screws up, I think Thomas had
> suggested ways aruond this.
> We could probably make it a WARN_ON and fail DRI setup.

Yes, that's what I'd expect. At least not allow it to hang the primairy X
session. I understand that you cannot magically make DRI work in this
situation.

Note that I did start X.Org successfully in the chroot a bit earlier when
I did have /dev/ bind mounted to /<mychroot>/dev/.

2009-03-19 17:39:36

by Mariusz Kozlowski

[permalink] [raw]
Subject: Re: DRM oops while starting second X.org session in chroot

Dnia 2009-03-14, o godz. 15:34:42
Frans Pop <[email protected]> napisaƂ(a):

> I had the oops below today after I tried to start a second X.org
> session in a chroot using 'startx -- :1'. I think the problem here is
> that the driver was loaded, but that the corresponding device did not
> exist in /dev in the chroot (forgot to bind mount it). If that is the
> cause, it would be nice if it was handled more gracefully than
> this :-P
>
> The oops also hung my primary X session. I could no longer switch
> consoles. Sysrq did still work.

FYI, I run into this today as well. I'm using regular ubuntu
installation. The only major change is that I use 2.6.29-rc8 at the
moment. I did not do anything different than usual. I started my x61s,
kernel was booting and when it came to start X the screen went black.
sysrq still worked etc. but I coulnd switch back to console - reboot was
needed so I don't think its related to your chroot etcetra. BTW it is not
easily reproducible - it just happens sometimes.

Mariusz


kernel BUG at drivers/gpu/drm/drm_fops.c:146!
invalid opcode: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/virtual/backlight/thinkpad_screen/brightness
Modules linked in: i915 drm i2c_algo_bit i2c_core binfmt_misc kvm_intel kvm ppdev acpi_cpufreq cpufreq_stats cpufreq_powersave cpufreq_userspace cpufreq_conservative cpufreq_ondemand freq_table fan sbs sbshc container pci_slot iptable_filter ip_tables x_tables sbp2 parport_pc parport fuse snd_hda_codec_analog snd_hda_intel snd_hda_codec snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy pcmcia arc4 ecb snd_seq_oss snd_seq_midi_event snd_seq thinkpad_acpi iwl3945 snd_timer snd_seq_device rfkill mac80211 nvram evdev led_class ohci1394 psmouse snd lib80211 serio_raw ieee1394 pcspkr thermal yenta_socket rsrc_nonstatic pcmcia_core ac battery soundcore cfg80211 intel_agp sg ehci_hcd uhci_hcd button processor agpgart snd_page_alloc e1000e usbcore [last unloaded: lp]

Pid: 3797, comm: Xorg Not tainted (2.6.29-rc8 #9) 7667Y24
EIP: 0060:[<f87d7558>] EFLAGS: 00213202 CPU: 1
EIP is at drm_open+0x3f8/0x500 [drm]
EAX: f61ba808 EBX: 00000000 ECX: f87fc8c0 EDX: f6186000
ESI: f60a8c00 EDI: f6082220 EBP: f61bfe38 ESP: f61bfe00
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process Xorg (pid: 3797, ti=f61be000 task=f6158000 task.ti=f61be000)
Stack:
f61bfe10 f6bc0480 f61bfe14 c02412f2 f6186000 f60a8c14 f61ac200 f6082220
f6504660 00000000 f6504674 ffffffed f61ac200 f6082220 f61bfe64 f87d777f
f7024000 000000ff f60a8c00 00000001 f61bfe60 f87e5520 00000000 f6bc0480
Call Trace:
[<c02412f2>] ? kobject_get+0x12/0x20
[<f87d777f>] ? drm_stub_open+0x11f/0x200 [drm]
[<c01a4e82>] ? chrdev_open+0x102/0x1f0
[<c019ff31>] ? __dentry_open+0xf1/0x2c0
[<c01a995c>] ? inode_permission+0x8c/0xc0
[<c01a01f3>] ? nameidata_to_filp+0x53/0x60
[<c01a4d80>] ? chrdev_open+0x0/0x1f0
[<c01ad041>] ? do_filp_open+0x1c1/0x7a0
[<c01b819d>] ? mntput_no_expire+0x1d/0x130
[<c038ca13>] ? _spin_unlock+0x13/0x30
[<c01b6a68>] ? alloc_fd+0xe8/0x100
[<c019fcf9>] ? do_sys_open+0x59/0xf0
[<c019fdf9>] ? sys_open+0x29/0x40
[<c01035a7>] ? sysenter_do_call+0x12/0x33
[<c0380000>] ? msi_ht_cap_enabled+0x73/0xaa
Code: 46 34 00 00 00 00 89 f0 e8 c6 e7 ff ff 89 c3 85 c0 0f 89 ae fe ff ff e9 83 fc ff ff 8b 7d e4 3b 87 a4 00 00 00 0f 84 85 fc ff ff <0f> 0b eb fe 8d 74 26 00 8b 45 e8 e8 58 5c 9c c7 8b 7d e0 8d 46
EIP: [<f87d7558>] drm_open+0x3f8/0x500 [drm] SS:ESP 0068:f61bfe00