Bug 36394 - Kernel oops when docking laptop while on virtual console
Summary: Kernel oops when docking laptop while on virtual console
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: XOrg git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 06:17 UTC by Frederik Himpe
Modified: 2017-07-24 23:05 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Full kernel log of the session (122.08 KB, text/plain)
2011-04-19 06:17 UTC, Frederik Himpe
no flags Details
Warn if called without mode_config lock (3.65 KB, patch)
2011-04-19 16:07 UTC, Chris Wilson
no flags Details | Splinter Review
dmesg output after udocking/docking (123.74 KB, text/plain)
2011-04-22 02:36 UTC, Frederik Himpe
no flags Details
Take mode config lock for hotplug probe (6.13 KB, patch)
2011-04-22 02:58 UTC, Chris Wilson
no flags Details | Splinter Review
Take mode config lock for hotplug probe (5.01 KB, patch)
2011-04-22 03:03 UTC, Chris Wilson
no flags Details | Splinter Review
dmesg after adding patch #45832 and patch #45936 (96.86 KB, text/plain)
2011-04-22 04:54 UTC, Frederik Himpe
no flags Details

Description Frederik Himpe 2011-04-19 06:17:21 UTC
Created attachment 45814 [details]
Full kernel log of the session

While I'm on a virtual console and put my Dell Latitude E6400 in the docking station, the kernel oopses:

Apr 19 14:42:59 defected kernel: [19849.844113] BUG: unable to handle kernel NULL pointer dereference at 0000000000000230
Apr 19 14:42:59 defected kernel: [19849.847020] IP: [<ffffffffa03bdddf>] intel_tv_detect_type+0xc6/0x27c [i915]
Apr 19 14:42:59 defected kernel: [19849.848012] PGD 1170eb067 PUD 1118b4067 PMD 0 
Apr 19 14:42:59 defected kernel: [19849.848012] Oops: 0000 [#1] SMP 
Apr 19 14:42:59 defected kernel: [19849.848012] last sysfs file: /sys/devices/virtual/backlight/acpi_video0/uevent
Apr 19 14:42:59 defected kernel: [19849.848012] CPU 0 
Apr 19 14:42:59 defected kernel: [19849.848012] Modules linked in: nls_utf8 isofs udf ip6table_filter ebtable_nat ebtables acpi_cpufreq mperf cpufreq_userspace cpufreq_conservative cpufreq_powersave cpufreq_stats cryptd aes_x86_64 aes_generic parport_pc ppdev lp parport cn sco bnep rfcomm l2cap kvm_intel kvm uinput microcode bridge stp xt_time xt_connlimit xt_realm iptable_raw xt_comment xt_recent xt_policy ipt_ULOG ipt_REJECT ipt_REDIRECT ipt_NETMAP ipt_MASQUERADE ipt_ECN ipt_ecn ipt_CLUSTERIP ipt_ah ipt_addrtype nf_nat_tftp nf_nat_snmp_basic nf_nat_sip nf_nat_pptp nf_nat_proto_gre nf_nat_irc nf_nat_h323 nf_nat_ftp nf_nat_amanda ts_kmp nf_conntrack_amanda nf_conntrack_sane nf_conntrack_tftp nf_conntrack_sip nf_conntrack_proto_sctp nf_conntrack_pptp nf_conntrack_proto_gre nf_conntrack_netlink nf_conntrack_netbios_ns nf_conntrack_irc nf_conntrack_h323 nf_conntrack_ftp xt_TPROXY nf_tproxy_core ip6_tables nf_defrag_ipv6 xt_tcpmss xt_pkttype xt_physdev xt_owner xt_NFQUEUE xt_NFLOG nfnetlink_log xt_multiport xt_mark xt
Apr 19 14:42:59 defected kernel: _mac xt_limit xt_length xt_iprange xt_helper xt_hashlimit xt_DSCP xt_dscp xt_dccp xt_conntrack xt_connmark xt_CLASSIFY ipt_LOG xt_tcpudp xt_state iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack iptable_mangle nfnetlink iptable_filter ip_tables x_tables fuse nfsd nfs lockd fscache nfs_acl auth_rpcgss sunrpc xfs exportfs vhost_net macvtap macvlan tun loop firewire_sbp2 btusb bluetooth snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel arc4 ecb snd_hda_codec snd_hwdep snd_pcm snd_seq snd_timer snd_seq_device i915 snd iwlagn tpm_tis drm_kms_helper tpm dell_laptop tpm_bios dcdbas joydev iwlcore drm soundcore i2c_algo_bit mac80211 i2c_i801 i2c_core snd_page_alloc pcmcia cfg80211 rfkill dell_wmi sparse_keymap psmouse yenta_socket evdev pcspkr serio_raw pcmcia_rsrc ac wmi processor video battery pcmcia_core power_supply button ext4 mbcache jbd2 crc16 dm_mod sg sr_mod sd_mod cdrom crc_t10dif usbhid hid uhci_hcd ahci libahci libata sdhci_pci sdhci ehci_hcd scsi_mod firewire_ohc
Apr 19 14:42:59 defected kernel: i mmc_core e1000e usbcore thermal firewire_core crc_itu_t thermal_sys nls_base [last unloaded: scsi_wait_scan]
Apr 19 14:42:59 defected kernel: [19849.878100] 
Apr 19 14:42:59 defected kernel: [19849.878100] Pid: 3022, comm: upowerd Not tainted 2.6.38-2-amd64 #1 Dell Inc. Latitude E6400                  /0RX493
Apr 19 14:42:59 defected kernel: [19849.878100] RIP: 0010:[<ffffffffa03bdddf>]  [<ffffffffa03bdddf>] intel_tv_detect_type+0xc6/0x27c [i915]
Apr 19 14:42:59 defected kernel: [19849.878100] RSP: 0018:ffff880037a43cf8  EFLAGS: 00010282
Apr 19 14:42:59 defected kernel: [19849.878100] RAX: 0000000000000000 RBX: ffff88011725a000 RCX: 0000000000000003
Apr 19 14:42:59 defected kernel: [19849.878100] RDX: 000000000f0000aa RSI: 0000000000068004 RDI: ffff88011834c000
Apr 19 14:42:59 defected kernel: [19849.878100] RBP: ffff8801191e2000 R08: ffff880037a42000 R09: 000000000000000a
Apr 19 14:42:59 defected kernel: [19849.878100] R10: ffff880118780d80 R11: ffffffffffffffff R12: ffff8801191e2800
Apr 19 14:42:59 defected kernel: [19849.878100] R13: 00000000000c00d0 R14: 00000000000c00d7 R15: 0000000070000000
Apr 19 14:42:59 defected kernel: [19849.878100] FS:  00007f8e3ec407a0(0000) GS:ffff8800dcc00000(0000) knlGS:0000000000000000
Apr 19 14:42:59 defected kernel: [19849.878100] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
Apr 19 14:42:59 defected kernel: [19849.878100] CR2: 0000000000000230 CR3: 0000000037a4b000 CR4: 00000000000006f0
Apr 19 14:42:59 defected kernel: [19849.878100] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
Apr 19 14:42:59 defected kernel: [19849.878100] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Apr 19 14:42:59 defected kernel: [19849.878100] Process upowerd (pid: 3022, threadinfo ffff880037a42000, task ffff880118780d80)
Apr 19 14:42:59 defected kernel: [19849.878100] Stack:
Apr 19 14:42:59 defected kernel: [19849.878100]  ffff88011834c800 ffff880100000000 ffff8801191e2000 ffff8801191e2800
Apr 19 14:42:59 defected kernel: [19849.878100]  ffff8801191e2000 ffff8801191e2801 ffff8800826dbba0 ffff8801191c3aa0
Apr 19 14:42:59 defected kernel: [19849.989813]  ffffffff81440e20 ffffffffa03be031 0000000000000002 0000000000000000
Apr 19 14:42:59 defected kernel: [19849.989813] Call Trace:
Apr 19 14:42:59 defected kernel: [19849.989813]  [<ffffffffa03be031>] ? intel_tv_detect+0x9c/0x156 [i915]
Apr 19 14:42:59 defected kernel: [19849.989813]  [<ffffffffa02f0e3b>] ? status_show+0x39/0x74 [drm]
Apr 19 14:42:59 defected kernel: [19849.989813]  [<ffffffff8123b309>] ? dev_attr_show+0x1e/0x45
Apr 19 14:42:59 defected kernel: [19849.989813]  [<ffffffff810ba82a>] ? __get_free_pages+0x9/0x47
Apr 19 14:42:59 defected kernel: [19850.018079]  [<ffffffff8114aeba>] ? sysfs_read_file+0xa8/0x12e
Apr 19 14:42:59 defected kernel: [19850.018079]  [<ffffffff810f82ef>] ? vfs_read+0xa1/0xfb
Apr 19 14:42:59 defected kernel: [19850.018079]  [<ffffffff810f83ff>] ? sys_read+0x45/0x6e
Apr 19 14:42:59 defected kernel: [19850.018079]  [<ffffffff81009952>] ? system_call_fastpath+0x16/0x1b
Apr 19 14:42:59 defected kernel: [19850.018079] Code: ff ff 8b 54 24 08 be 04 80 06 00 48 89 df 81 ca aa 00 00 0f e8 6a f7 ff ff 48 8b 43 18 8b 80 04 80 06 00 48 8b 45 30 48 8b 7d 00 <8b> b0 30 02 00 00 e8 29 e1 fe ff 48 8b 2d 8f aa 2c e1 bf 14 00 
Apr 19 14:42:59 defected kernel: [19850.018079] RIP  [<ffffffffa03bdddf>] intel_tv_detect_type+0xc6/0x27c [i915]
Apr 19 14:42:59 defected kernel: [19850.018079]  RSP <ffff880037a43cf8>
Apr 19 14:42:59 defected kernel: [19850.018079] CR2: 0000000000000230
Apr 19 14:42:59 defected kernel: [19850.065899] ---[ end trace 00a6ac6c05f76fb8 ]---

The system continues running when this oops happens. However, as soon as I try to switch back to X, the whole system hangs.

The bug is reproducible. I'm using Debian's 2.6.38-3 kernel, based on upstream 2.6.38.2, so it should include the "drm: Hold the mode mutex whilst probing for sysfs status" patch.

The last sysfs file is not always the same, this morning I had it with /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-SVIDEO-1/status
( http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620835#20 )

I'm using upower 0.9.9-2, which has PollDockDevices=false in /etc/UPower/UPower.conf
Comment 1 Chris Wilson 2011-04-19 16:07:11 UTC
Created attachment 45832 [details] [review]
Warn if called without mode_config lock
Comment 2 Frederik Himpe 2011-04-22 02:35:18 UTC
I tried this patch on top of 2.6.38.4. First of all, there was some fuzz in the first part of the patch, I do not know whether this is harmless or it is the cause of the following new problem. Now I get lots of new backtraces in the kernel log when docking the system:

[    7.644246] WARNING: at drivers/gpu/drm/i915/intel_crt.c:471 intel_crt_detect+0x3e/0x373 [i915]()
[    7.644248] Hardware name: Latitude E6400                  
[    7.644250] Modules linked in: ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan]
[    7.644303] Pid: 454, comm: modprobe Not tainted 2.6.38.4-custom.2 #8
[    7.644305] Call Trace:
[    7.644312]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
[    7.644330]  [<ffffffffa03f3e5c>] ? intel_crt_detect+0x3e/0x373 [i915]
[    7.644336]  [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
[    7.644340]  [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
[    7.644344]  [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper]
[    7.644349]  [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f
[    7.644353]  [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper]
[    7.644356]  [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb
[    7.644376]  [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915]
[    7.644390]  [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915]
[    7.644398]  [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm]
[    7.644406]  [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm]
[    7.644410]  [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d
[    7.644414]  [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e
[    7.644417]  [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6
[    7.644422]  [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d
[    7.644425]  [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142
[    7.644428]  [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f
[    7.644431]  [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f
[    7.644435]  [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72
[    7.644438]  [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2
[    7.644451]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.644455]  [<ffffffff8123b314>] ? driver_register+0x8d/0xf5
[    7.644467]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.644471]  [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb
[    7.644483]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.644487]  [<ffffffff81002173>] ? do_one_initcall+0x78/0x131
[    7.644491]  [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222
[    7.644494]  [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b
[    7.644497] ---[ end trace 4ab93381f5f8f265 ]---
[    7.649631] ieee80211 phy0: Selected rate control algorithm 'iwl-agn-rs'
[    7.695700] ------------[ cut here ]------------
[    7.695727] WARNING: at drivers/gpu/drm/i915/intel_hdmi.c:218 intel_hdmi_detect+0x3f/0xc3 [i915]()
[    7.695730] Hardware name: Latitude E6400                  
[    7.695732] Modules linked in: arc4 ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan]
[    7.695787] Pid: 454, comm: modprobe Tainted: G        W   2.6.38.4-custom.2 #8
[    7.695790] Call Trace:
[    7.695795]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
[    7.695815]  [<ffffffffa03f8155>] ? intel_hdmi_detect+0x3f/0xc3 [i915]
[    7.695820]  [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
[    7.695824]  [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
[    7.695829]  [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper]
[    7.695833]  [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f
[    7.695837]  [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper]
[    7.695840]  [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb
[    7.695860]  [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915]
[    7.695874]  [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915]
[    7.695882]  [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm]
[    7.695890]  [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm]
[    7.695894]  [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d
[    7.695898]  [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e
[    7.695901]  [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6
[    7.695906]  [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d
[    7.695909]  [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142
[    7.695912]  [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f
[    7.695916]  [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f
[    7.695919]  [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72
[    7.695922]  [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2
[    7.695935]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.695939]  [<ffffffff8123b314>] ? driver_register+0x8d/0xf5
[    7.695952]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.695955]  [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb
[    7.695968]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.695971]  [<ffffffff81002173>] ? do_one_initcall+0x78/0x131
[    7.695975]  [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222
[    7.695978]  [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b
[    7.695981] ---[ end trace 4ab93381f5f8f266 ]---
[    7.697949] ------------[ cut here ]------------
[    7.697969] WARNING: at drivers/gpu/drm/i915/intel_dp.c:1580 intel_dp_detect+0x35/0x1a8 [i915]()
[    7.697972] Hardware name: Latitude E6400                  
[    7.697974] Modules linked in: arc4 ecb snd_hda_codec i915(+) iwlagn snd_hwdep joydev drm_kms_helper snd_pcm drm iwlcore pcmcia snd_seq mac80211 snd_timer snd_seq_device cfg80211 snd dell_laptop i2c_i801 rfkill tpm_tis i2c_algo_bit soundcore yenta_socket i2c_core pcmcia_rsrc pcmcia_core dell_wmi sparse_keymap tpm evdev psmouse snd_page_alloc tpm_bios wmi video dcdbas serio_raw pcspkr battery ac power_supply button processor ext4 mbcache jbd2 crc16 dm_mod sg sd_mod sr_mod crc_t10dif cdrom usbhid hid uhci_hcd ahci libahci libata sdhci_pci ehci_hcd sdhci mmc_core scsi_mod firewire_ohci firewire_core usbcore crc_itu_t e1000e thermal thermal_sys nls_base [last unloaded: scsi_wait_scan]
[    7.698017] Pid: 454, comm: modprobe Tainted: G        W   2.6.38.4-custom.2 #8
[    7.698019] Call Trace:
[    7.698022]  [<ffffffff81046af5>] ? warn_slowpath_common+0x78/0x8c
[    7.698041]  [<ffffffffa03f73ef>] ? intel_dp_detect+0x35/0x1a8 [i915]
[    7.698045]  [<ffffffffa0355d49>] ? drm_helper_probe_single_connector_modes+0xbf/0x2af [drm_kms_helper]
[    7.698050]  [<ffffffffa03534d5>] ? drm_fb_helper_probe_connector_modes+0x39/0x4d [drm_kms_helper]
[    7.698054]  [<ffffffffa0354f4c>] ? drm_fb_helper_initial_config+0x491/0x4d3 [drm_kms_helper]
[    7.698057]  [<ffffffff810e9f0d>] ? get_partial_node+0x30/0x8f
[    7.698061]  [<ffffffffa035503e>] ? drm_fb_helper_init+0xb0/0x14d [drm_kms_helper]
[    7.698065]  [<ffffffff810ea609>] ? __kmalloc+0xd9/0xeb
[    7.698084]  [<ffffffffa03fd671>] ? intel_fbdev_init+0x78/0x86 [i915]
[    7.698098]  [<ffffffffa03d70ea>] ? i915_driver_load+0xca8/0xe12 [i915]
[    7.698105]  [<ffffffffa03668e8>] ? drm_get_minor+0x21f/0x27c [drm]
[    7.698112]  [<ffffffffa03684e0>] ? drm_get_pci_dev+0x154/0x25e [drm]
[    7.698115]  [<ffffffff8107058c>] ? arch_local_irq_save+0x14/0x1d
[    7.698119]  [<ffffffff811b23d8>] ? local_pci_probe+0x3c/0x6e
[    7.698122]  [<ffffffff811b2964>] ? pci_device_probe+0xc7/0xf6
[    7.698125]  [<ffffffff8123ad87>] ? driver_sysfs_add+0x66/0x8d
[    7.698129]  [<ffffffff8123b013>] ? driver_probe_device+0xb2/0x142
[    7.698132]  [<ffffffff8123b0f2>] ? __driver_attach+0x4f/0x6f
[    7.698135]  [<ffffffff8123b0a3>] ? __driver_attach+0x0/0x6f
[    7.698138]  [<ffffffff8123a301>] ? bus_for_each_dev+0x47/0x72
[    7.698142]  [<ffffffff8123a987>] ? bus_add_driver+0xa2/0x1f2
[    7.698154]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.698158]  [<ffffffff8123b314>] ? driver_register+0x8d/0xf5
[    7.698170]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.698174]  [<ffffffff811b2bb2>] ? __pci_register_driver+0x50/0xbb
[    7.698187]  [<ffffffffa0424000>] ? i915_init+0x0/0x8b [i915]
[    7.698190]  [<ffffffff81002173>] ? do_one_initcall+0x78/0x131
[    7.698193]  [<ffffffff81074eda>] ? sys_init_module+0xd8/0x222
[    7.698196]  [<ffffffff81009912>] ? system_call_fastpath+0x16/0x1b
[    7.698198] ---[ end trace 4ab93381f5f8f267 ]---
[    7.699198] ------------[ cut here ]------------
[...and much more...]
Comment 3 Frederik Himpe 2011-04-22 02:36:17 UTC
Created attachment 45932 [details]
dmesg output after udocking/docking
Comment 4 Chris Wilson 2011-04-22 02:58:12 UTC
Created attachment 45933 [details] [review]
Take mode config lock for hotplug probe

This should silence those (later) warnings. But I don't think this is the explanation for the upowerd BUG, yet. Care to run another test with this patch applied on top of the debugging patch and see what else happens?
Comment 5 Chris Wilson 2011-04-22 03:00:42 UTC
I've put this patch on top of drm-intel-staging, which also contains numerous bug fixes for intel_get_load_detect_pipe(). Those will also be interesting to test in connection with this bug.
Comment 6 Chris Wilson 2011-04-22 03:03:39 UTC
Created attachment 45936 [details] [review]
Take mode config lock for hotplug probe

Right patch this time...
Comment 7 Frederik Himpe 2011-04-22 04:54:13 UTC
Created attachment 45946 [details]
dmesg after adding patch #45832 and patch #45936

The oops triggered by upowerd when docking is not happening anymore. The warnings which appear in this kernel log, happen while booting the system while it's docked. At 64s I undock the system, and at around 98s I dock it again. Also after docking, the system does not hang anymore when switching back from tty1 to X, like was the case without those 2 patches.
Comment 8 Chris Wilson 2011-04-22 05:01:39 UTC
The initial warnings I still expected and are fortunately harmless for the time being.

Keep on running and see if it does eventually oops. Otherwise, we can mark this bug as fixed.
Comment 9 Frederik Himpe 2011-04-26 06:19:04 UTC
With this kernel, I experienced a totally blank screen when resuming from suspend during which there was a move from dual head to single head. It's different from bug #36082: in this case, virtual console also just showed a blank screen and even soft rebooting the machine (SSH was still working fine), did not fix the problem, even the BIOS messages were not shown anymore. There were no oopses or error messages in the kernel or X logs.

Only after a complete power down of the machine, the screen worked fine again.

I am not sure whether this might be caused by these patches, and I am currently unable to do any more tests.
Comment 10 Chris Wilson 2011-04-27 04:14:30 UTC
Hmm, that sounds deeply sinister. Have you checked 2.6.39-rc5 and drm-intel-staging to see if they exhibit the same symptoms?
Comment 11 Frederik Himpe 2011-05-02 02:35:49 UTC
I just tried drm-intel-staging, but two times my machine completely powered off, once shortly after resuming from suspend and the second time shortly after docking. I think there were kernel messages on the console mentioning some kind of loop related to ACPI. Sorry, this stuff is all too broken for me to spend any more time testing this.
Comment 12 Frederik Himpe 2011-05-10 04:52:10 UTC
I found some time to test this again. 2.6.39-rc6 still oopses when docking, however current drm-intel-staging does not. I tried suspending/resuming different times, and there was no problem now with drm-intel-staging. Maybe the sudden power off I experienced last time, was caused by a hardware problem or overheating, it's something which I experienced already a few times in the past too.

(It's also interesting to note that on the single time I tested suspend/resume with removal of the second monitor, bug #36082 did not appear with drm-intel-staging (I have not tested this yet with stock 2.6.39-rc6), so maybe that bug is fixed too. I will do some more tests for this bug later and I will add my experiences to bug #36082.)

I hope the patches can be added to 2.6.39 and maybe even 2.6.38.x too.
Comment 13 Jesse Barnes 2011-06-16 12:34:33 UTC
If this and #36082 are fixed in current 3.0-rc2 bits can you close them out?  If not, it would help to identify which patch in the drm-intel-staging tree you were using fixed the problem so we can get it queued up.
Comment 14 Frederik Himpe 2011-06-17 01:02:26 UTC
This one is fixed in 2.6.39. Bug #36082 is definitely still happening with 2.6.39.
Comment 15 Florian Mickler 2011-06-30 03:11:44 UTC
A patch referencing this bug report has been merged in Linux v3.0-rc1:

commit 7394371d85699a1d6d49b61f65583d6cd902a6a2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Fri Apr 22 11:03:57 2011 +0100

    drm: Take lock around probes for drm_fb_helper_hotplug_event


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.