Linux 2.6.37-2, 2.14.0-4: BUG: unable to handle kernel NULL pointer dereference at 00000100; IP: [<e0c22019>] intel_tv_detect_type+0xa2/0x203 [i915]
Subsystems (2)
Dear Intel driver folks,
using Debian Sid/unstable with
linux-image-2.6.37-2-686 2.6.37-2 [1]
xserver-xorg-video-intel 2:2.14.0-4 [2]I noticed the following Linux kernel Oops today when shutting down the system.
Mar 15 03:43:23 hostname kernel: [ 1189.189626] BUG: unable to handle kernel NULL pointer dereference at 00000100
Mar 15 03:43:23 hostname kernel: [ 1189.189821] IP: [<e0c22019>] intel_tv_detect_type+0xa2/0x203 [i915]
Mar 15 03:43:23 hostname kernel: [ 1189.190020] *pde = 00000000
Mar 15 03:43:23 hostname kernel: [ 1189.190104] Oops: 0000 [#1] SMP
Mar 15 03:43:23 hostname kernel: [ 1189.190209] last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-SVIDEO-1/status
Mar 15 03:43:23 hostname kernel: [ 1189.190412] Modules linked in: mperf cpufreq_conservative cpufreq_userspace cpufreq_powersave cpufreq_stats decnet uinput fuse loop joydev snd_hd
a_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm i915 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq drm_kms_helper snd_timer uvcvideo d
rm snd_seq_device eeepc_laptop tpm_tis usbhid videodev i2c_algo_bit v4l1_compat snd sparse_keymap i2c_core hid serio_raw tpm psmouse evdev tpm_bios rfkill shpchp ac processor rng_c
ore battery video power_supply soundcore pci_hotplug button output snd_page_alloc usb_storage uas ext3 jbd mbcache sd_mod crc_t10dif ata_generic ahci libahci ata_piix libata uhci_h
cd ehci_hcd scsi_mod usbcore thermal atl2 thermal_sys nls_base [last unloaded: scsi_wait_scan]
Mar 15 03:43:23 hostname kernel: [ 1189.192007]
Mar 15 03:43:23 hostname kernel: [ 1189.192007] Pid: 1464, comm: upowerd Not tainted 2.6.37-2-686 #1 ASUSTeK Computer INC. 701/701
Mar 15 03:43:23 hostname kernel: [ 1189.192007] EIP: 0060:[<e0c22019>] EFLAGS: 00010246 CPU: 0
Mar 15 03:43:23 hostname kernel: [ 1189.192007] EIP is at intel_tv_detect_type+0xa2/0x203 [i915]
Mar 15 03:43:23 hostname kernel: [ 1189.192007] EAX: 00000000 EBX: dca74000 ECX: e0f68004 EDX: 00068004
Mar 15 03:43:23 hostname kernel: [ 1189.192007] ESI: dd110c00 EDI: 400c0c37 EBP: dca7429c ESP: de365e2c
Mar 15 03:43:23 hostname kernel: [ 1189.192007] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
Mar 15 03:43:23 hostname kernel: [ 1189.192007] Process upowerd (pid: 1464, ti=de364000 task=dcc8acb0 task.ti=de364000)
Mar 15 03:43:23 hostname kernel: [ 1189.192007] Stack:
Mar 15 03:43:23 hostname kernel: [ 1189.192007] e0c2cda4 70000000 400c0c30 00000000 dd111000 de365e54 de365f24 dd110c00
Mar 15 03:43:23 hostname kernel: [ 1189.192007] e0c22203 01000000 00000003 00000000 00000000 00000000 00000000 4353544e
Mar 15 03:43:23 hostname kernel: [ 1189.192007] 30383420 00000069 00000000 00000000 00000000 00000000 00000000 00000000
Mar 15 03:43:23 hostname kernel: [ 1189.192007] Call Trace:
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<e0c22203>] ? intel_tv_detect+0x89/0x12d [i915]
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<e0a9dcef>] ? status_show+0x0/0x2f [drm]
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<e0a9dd03>] ? status_show+0x14/0x2f [drm]
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c11c390a>] ? dev_attr_show+0x16/0x32
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c10fc020>] ? sysfs_read_file+0x8c/0xf5
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c10fbf94>] ? sysfs_read_file+0x0/0xf5
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c10ba3aa>] ? vfs_read+0x7c/0xd6
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c10b8a34>] ? do_sys_open+0xb5/0xbe
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c10ba497>] ? sys_read+0x3c/0x60
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c1002f9f>] ? sysenter_do_call+0x12/0x28
Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<c1280000>] ? init_scattered_cpuid_features+0x31/0xb6
Mar 15 03:43:23 hostname kernel: [ 1189.192007] Code: d8 e8 30 f8 ff ff ba 04 80 06 00 89 d8 8b 4c 24 0c 81 c9 aa 00 00 0f e8 1a f8 ff ff ba 04 80 06 00 89 d8 e8 ea f7 ff ff 8b 46 20 <8b> 90 00 01 00 00 8b 06 e8 40 11 ff ff b8 14 00 00 00 8b 35 40
Mar 15 03:43:23 hostname kernel: [ 1189.192007] EIP: [<e0c22019>] intel_tv_detect_type+0xa2/0x203 [i915] SS:ESP 0068:de365e2c
Mar 15 03:43:23 hostname kernel: [ 1189.192007] CR2: 0000000000000100
Mar 15 03:43:23 hostname kernel: [ 1189.267928] ---[ end trace 7063a9f77f1a7591 ]---I cannot reproduce this though, but there seem to be another report for Ubuntu Natty 11.04 too [3] and there the reporter says that his graphic does not work after this has happened. I cannot comment on this, since I was shutting the system down.
Can you make something out of this or what else do you need for debugging? It will be hard though, since I have not yet figured out how to reproduce this and according to /var/log/syslog this is the only Oops there has been in the last months.
Thanks,
Paul
[1] http://packages.debian.org/sid/linux-image-2.6.37-2-686
[2] http://packages.debian.org/sid/xserver-xorg-video-intel
[3] http://forum.ubuntuusers.de/topic/intel-grafiktreiber-kernelbug/#post-2807223
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 1/1 drm: Hold the mode mutex whilst probing for sysfs status
As detect will use hw registers and may modify structures, it needs to be serialised by use of the dev->mode_config.mutex. Make it so.
Otherwise, we may cause random crashes as the sysfs file is queried whilst a concurrent hotplug poll is being run. For example:
[ 1189.189626] BUG: unable to handle kernel NULL pointer dereference at 00000100 [ 1189.189821] IP: [<e0c22019>] intel_tv_detect_type+0xa2/0x203 [i915] [ 1189.190020] *pde = 00000000 [ 1189.190104] Oops: 0000 [#1] SMP [ 1189.190209] last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-SVIDEO-1/status [ 1189.190412] Modules linked in: mperf cpufreq_conservative cpufreq_userspace cpufreq_powersave cpufreq_stats decnet uinput fuse loop joydev snd_hd a_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm i915 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq drm_kms_helper snd_timer uvcvideo d rm snd_seq_device eeepc_laptop tpm_tis usbhid videodev i2c_algo_bit v4l1_compat snd sparse_keymap i2c_core hid serio_raw tpm psmouse evdev tpm_bios rfkill shpchp ac processor rng_c ore battery video power_supply soundcore pci_hotplug button output snd_page_alloc usb_storage uas ext3 jbd mbcache sd_mod crc_t10dif ata_generic ahci libahci ata_piix libata uhci_h cd ehci_hcd scsi_mod usbcore thermal atl2 thermal_sys nls_base [last unloaded: scsi_wait_scan] [ 1189.192007] [ 1189.192007] Pid: 1464, comm: upowerd Not tainted 2.6.37-2-686 #1 ASUSTeK Computer INC. 701/701 [ 1189.192007] EIP: 0060:[<e0c22019>] EFLAGS: 00010246 CPU: 0 [ 1189.192007] EIP is at intel_tv_detect_type+0xa2/0x203 [i915] [ 1189.192007] EAX: 00000000 EBX: dca74000 ECX: e0f68004 EDX: 00068004 [ 1189.192007] ESI: dd110c00 EDI: 400c0c37 EBP: dca7429c ESP: de365e2c [ 1189.192007] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 1189.192007] Process upowerd (pid: 1464, ti=de364000 task=dcc8acb0 task.ti=de364000) [ 1189.192007] Stack: Mar 15 03:43:23 hostname kernel: [ 1189.192007] e0c2cda4 70000000 400c0c30 00000000 dd111000 de365e54 de365f24 dd110c00 [ 1189.192007] e0c22203 01000000 00000003 00000000 00000000 00000000 00000000 4353544e [ 1189.192007] 30383420 00000069 00000000 00000000 00000000 00000000 00000000 00000000 [ 1189.192007] Call Trace: Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<e0c22203>] ? intel_tv_detect+0x89/0x12d [i915] [ 1189.192007] [<e0a9dcef>] ? status_show+0x0/0x2f [drm] [ 1189.192007] [<e0a9dd03>] ? status_show+0x14/0x2f [drm]
[Digression: what is upowerd doing reading those power hungry files?]
--- drivers/gpu/drm/drm_sysfs.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
drivers/gpu/drm/drm_sysfs.c +7 -0
@@ -158,8 +158,15 @@ static ssize_t status_show(struct device *device, {struct drm_connector *connector =to_drm_connector (device);enum drm_connector_status status; +int ret; + + ret =mutex_lock_interruptible (&connector->dev->mode_config.mutex); +if (ret) +return ret; status = connector->funcs->detect (connector, true); +mutex_unlock (&connector->dev->mode_config.mutex); +return snprintf (buf,PAGE_SIZE ,"%s\n" ,drm_get_connector_status_name (status)); }
Signature · 1 line
1.7.2.3
Re: [Intel-gfx] [PATCH] drm: Hold the mode mutex whilst probing for sysfs status
Quoted 2 lines · Chris Wilson
[Digression: what is upowerd doing reading those power hungry files?]
Apparently, checking "docked" status every 30 seconds, by reading the status of drm outputs. Where "docked" means "more than one output connected". Yes, it's silly.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613745
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618329
Cheers,
Julien
Re: [Intel-gfx] [PATCH] drm: Hold the mode mutex whilst probing for sysfs status
Quoted 11 lines · Julien Cristau
Quoted 2 lines · Chris Wilson
[Digression: what is upowerd doing reading those power hungry files?]
Apparently, checking "docked" status every 30 seconds, by reading the status of drm outputs. Where "docked" means "more than one output connected". Yes, it's silly.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=613745
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=618329
Its also now disabled by default upstream.
I think he was using an 965 or GM45 laptop that seemed to not report output changes properly.
Dave.
Re: [PATCH] drm: Hold the mode mutex whilst probing for sysfs status
In reply to Chris WilsonQuoted 43 lines · On Tue, 15 Mar 2011 11:40:00 +0000 Chris Wilson <[email protected]>…
As detect will use hw registers and may modify structures, it needs to be serialised by use of the
dev->mode_config.mutex. Make it so.Otherwise, we may cause random crashes as the sysfs file is queried whilst a concurrent hotplug poll is being run. For example:
[ 1189.189626] BUG: unable to handle kernel NULL pointer dereference at 00000100 [ 1189.189821] IP: [<e0c22019>] intel_tv_detect_type+0xa2/0x203 [i915] [ 1189.190020] *pde = 00000000 [ 1189.190104] Oops: 0000 [#1] SMP [ 1189.190209] last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-SVIDEO-1/status [ 1189.190412] Modules linked in: mperf cpufreq_conservative cpufreq_userspace cpufreq_powersave cpufreq_stats decnet uinput fuse loop joydev snd_hd a_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm_oss snd_mixer_oss snd_pcm i915 snd_seq_midi snd_rawmidi snd_seq_midi_event snd_seq drm_kms_helper snd_timer uvcvideo d rm snd_seq_device eeepc_laptop tpm_tis usbhid videodev i2c_algo_bit v4l1_compat snd sparse_keymap i2c_core hid serio_raw tpm psmouse evdev tpm_bios rfkill shpchp ac processor rng_c ore battery video power_supply soundcore pci_hotplug button output snd_page_alloc usb_storage uas ext3 jbd mbcache sd_mod crc_t10dif ata_generic ahci libahci ata_piix libata uhci_h cd ehci_hcd scsi_mod usbcore thermal atl2 thermal_sys nls_base [last unloaded: scsi_wait_scan] [ 1189.192007] [ 1189.192007] Pid: 1464, comm: upowerd Not tainted 2.6.37-2-686 #1 ASUSTeK Computer INC. 701/701 [ 1189.192007] EIP: 0060:[<e0c22019>] EFLAGS: 00010246 CPU: 0 [ 1189.192007] EIP is at intel_tv_detect_type+0xa2/0x203 [i915] [ 1189.192007] EAX: 00000000 EBX: dca74000 ECX: e0f68004 EDX: 00068004 [ 1189.192007] ESI: dd110c00 EDI: 400c0c37 EBP: dca7429c ESP: de365e2c [ 1189.192007] DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068 [ 1189.192007] Process upowerd (pid: 1464, ti=de364000 task=dcc8acb0 task.ti=de364000) [ 1189.192007] Stack: Mar 15 03:43:23 hostname kernel: [ 1189.192007] e0c2cda4 70000000 400c0c30 00000000 dd111000 de365e54 de365f24 dd110c00 [ 1189.192007] e0c22203 01000000 00000003 00000000 00000000 00000000 00000000 4353544e [ 1189.192007] 30383420 00000069 00000000 00000000 00000000 00000000 00000000 00000000 [ 1189.192007] Call Trace: Mar 15 03:43:23 hostname kernel: [ 1189.192007] [<e0c22203>] ? intel_tv_detect+0x89/0x12d [i915] [ 1189.192007] [<e0a9dcef>] ? status_show+0x0/0x2f [drm] [ 1189.192007] [<e0a9dd03>] ? status_show+0x14/0x2f [drm][Digression: what is upowerd doing reading those power hungry files?]
Reported-by Paul Menzel <[email protected]>Signed-off-by Chris Wilson <[email protected]>--- drivers/gpu/drm/drm_sysfs.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)drivers/gpu/drm/drm_sysfs.c +0
-0@@ -158,8 +158,15 @@ static ssize_t status_show(struct device *device, {struct drm_connector *connector =to_drm_connector (device);
drivers/gpu/drm/drm_sysfs.c static ssize_t status_show(struct device *device, · line 169
Quoted 10 lines
drivers/gpu/drm/drm_sysfs.c +7
-0enum drm_connector_status status; +int ret; + + ret =mutex_lock_interruptible (&connector->dev->mode_config.mutex); +if (ret) +return ret; status = connector->funcs->detect (connector, true); +mutex_unlock (&connector->dev->mode_config.mutex); +
How about adding a mutex assertion check in the detect hook as well? I think we need a more generous sprinkling of those around the CRTC helper code in general...
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center