Bug 788978

Summary: snd_vortex_dev_free() BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0
Product: [Fedora] Fedora Reporter: Andrew Vagin <avagin>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: avagin, gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, superquad.vortex2
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1540cc8d10ed2d03c985d2d3a82215ddf88f28b4
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 18:57:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
alsa-info.txt
none
Force Pulseaudio don't mute pcm playback switch when alsa mixer mute master playback switch none

Description Andrew Vagin 2012-02-09 13:14:16 UTC
libreport version: 2.0.8
abrt_version:   2.0.7
cmdline:        BOOT_IMAGE=/vmlinuz-3.2.3-2.fc16.x86_64 root=UUID=3d2082a2-4e2e-43b0-9b0b-1f83366f2b54 ro rd.md=0 rd.lvm=0 rd.dm=0 KEYTABLE=us SYSFONT=latarcyrheb-sun16 debug rd.luks=0 LANG=en_US.UTF-8 crashkernel=auto
kernel:         3.2.3-2.fc16.x86_64
reason:         BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0
time:           Thu 09 Feb 2012 05:11:15 PM MSK

backtrace:
:BUG: unable to handle kernel NULL pointer dereference at 00000000000000f0
:IP: [<ffffffffa04e16fc>] vortex_interrupt+0xec/0x500 [snd_au8830]
:PGD 123a81067 PUD 12365a067 PMD 0 
:Oops: 0000 [#1] SMP 
:CPU 0 
:Modules linked in: snd_au8830(+) tcp_lp ppdev parport_pc lp parport fuse ebtable_nat ebtables be2iscsi iscsi_boot_sysfs ipt_MASQUERADE bnx2i iptable_nat nf_nat cnic uio cxgb4i cxgb4 cxgb3i xt_CHECKSUM iptable_mangle libcxgbi cxgb3 tun mdio ib_iser bridge stp llc lockd rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 ip6table_filter nf_conntrack_ipv4 ip6_tables nf_defrag_ipv4 xt_state nf_conntrack microcode uvcvideo videodev gameport snd_ac97_codec ac97_bus media snd_hda_intel snd_hda_codec snd_hwdep v4l2_compat_ioctl32 snd_mpu401_uart snd_seq snd_rawmidi snd_seq_device iTCO_wdt snd_pcm snd_timer snd soundcore iTCO_vendor_support i2c_i801 snd_page_alloc e1000e tpm_tis tpm tpm_bios uinput serio_raw sunrpc ata_generic pata_acpi pata_marvell usb_storage i915 drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: snd_au8830]
:Pid: 25327, comm: modprobe Not tainted 3.2.3-2.fc16.x86_64 #1                  /DQ35MP
:RIP: 0010:[<ffffffffa04e16fc>]  [<ffffffffa04e16fc>] vortex_interrupt+0xec/0x500 [snd_au8830]
:RSP: 0018:ffff8801236d1ab8  EFLAGS: 00010006
:RAX: 0000000000000000 RBX: ffff8800b52d8000 RCX: 00000000000043ac
:RDX: 0000000000000000 RSI: 000000000000001f RDI: 0000000000000015
:RBP: ffff8801236d1af8 R08: 0000000000000000 R09: 000000000000003f
:R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000001
:R13: ffff8800b52da14c R14: ffff8800b52dbd6c R15: 0000000000000286
:FS:  00007f865d732700(0000) GS:ffff88012bc00000(0000) knlGS:0000000000000000
:CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
:CR2: 00000000000000f0 CR3: 000000011d4e9000 CR4: 00000000000006f0
:DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
:DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
:Process modprobe (pid: 25327, threadinfo ffff8801236d0000, task ffff880124acdc80)
:Stack:
: ffff8800b52dbd6c ffffffff00000015 ffff88012064d2a4 ffff8800b52d8000
: ffff88012064d200 0000000000000015 0000000000000282 0000000000000286
: ffff8801236d1b48 ffffffff810dec3d 0000000000000000 ffff88012361d180
:Call Trace:
: [<ffffffff810dec3d>] __free_irq+0x17d/0x220
: [<ffffffff810dee65>] free_irq+0x55/0xd0
: [<ffffffffa04e2d64>] snd_vortex_dev_free+0x44/0x80 [snd_au8830]
: [<ffffffffa01c0aa1>] snd_device_free+0x71/0x170 [snd]
: [<ffffffffa01c0f51>] snd_device_free_all+0x61/0xb0 [snd]
: [<ffffffffa01b9908>] snd_card_do_free+0x58/0x140 [snd]
: [<ffffffffa01badf3>] snd_card_free+0xa3/0xc0 [snd]
: [<ffffffffa0261b8f>] ? snd_ac97_bus+0xaf/0x130 [snd_ac97_codec]
: [<ffffffffa04e6a9f>] snd_vortex_probe+0x1c40/0x1d09 [snd_au8830]
: [<ffffffff812db37c>] local_pci_probe+0x5c/0xd0
: [<ffffffff812dcc19>] pci_device_probe+0x109/0x130
: [<ffffffff813932cc>] driver_probe_device+0x9c/0x300
: [<ffffffff813935db>] __driver_attach+0xab/0xb0
: [<ffffffff81393530>] ? driver_probe_device+0x300/0x300
: [<ffffffff81393530>] ? driver_probe_device+0x300/0x300
: [<ffffffff8139214c>] bus_for_each_dev+0x5c/0x90
: [<ffffffff81392ede>] driver_attach+0x1e/0x20
: [<ffffffff81392ae0>] bus_add_driver+0x1b0/0x2a0
: [<ffffffffa04ed000>] ? 0xffffffffa04ecfff
: [<ffffffff81393b36>] driver_register+0x76/0x140
: [<ffffffff815e554d>] ? notifier_call_chain+0x4d/0x70
: [<ffffffffa04ed000>] ? 0xffffffffa04ecfff
: [<ffffffff812dc8f6>] __pci_register_driver+0x56/0xd0
: [<ffffffff81041673>] ? set_memory_nx+0x43/0x50
: [<ffffffffa04ed01e>] alsa_card_vortex_init+0x1e/0x1000 [snd_au8830]
: [<ffffffff81002042>] do_one_initcall+0x42/0x180
: [<ffffffff810ac970>] sys_init_module+0xc0/0x230
: [<ffffffff815e9782>] system_call_fastpath+0x16/0x1b
:Code: 8b 83 60 3d 00 00 8b 80 9c 91 02 00 f7 45 cc 00 20 00 00 41 bc 01 00 00 00 74 ba 48 8b 43 30 8b bb 68 3d 00 00 41 bc 01 00 00 00 <48> 8b b0 f0 00 00 00 e8 c8 26 cd ff eb ab 66 0f 1f 44 00 00 4c 
:RIP  [<ffffffffa04e16fc>] vortex_interrupt+0xec/0x500 [snd_au8830]
: RSP <ffff8801236d1ab8>

comment:
:Sometimes my host doesn't play music. In this case I try to reload the module snd_au8830.
:This bug occured when I loaded the module snd_au8830 in the second time.

smolt_data:
:
:
:General
:=================================
:UUID: 2a46e6f2-443a-4bd2-8f50-8a9df9d31dfe
:OS: Fedora release 16 (Verne)
:Default run level: Unknown
:Language: en_US.UTF-8
:Platform: x86_64
:BogoMIPS: 5320.52
:CPU Vendor: GenuineIntel
:CPU Model: Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz
:CPU Stepping: 11
:CPU Family: 6
:CPU Model Num: 15
:Number of CPUs: 2
:CPU Speed: 2664
:System Memory: 3874
:System Swap: 2047
:Vendor: Unknown
:System:  
:Form factor: Unknown
:Kernel: 3.2.3-2.fc16.x86_64
:SELinux Enabled: 0
:SELinux Policy: targeted
:SELinux Enforce: Unknown
:MythTV Remote: Unknown
:MythTV Role: Unknown
:MythTV Theme: Unknown
:MythTV Plugin: 
:MythTV Tuner: -1
:
:
:Devices
:=================================
:(32902:10672:32902:20298) pci, agpgart-intel, HOST/PCI, 82Q35 Express DRAM Controller
:(32902:10544:32902:20298) pci, i801_smbus, SERIAL, 82801I (ICH9 Family) SMBus Controller
:(32902:10530:32902:20298) pci, ahci, STORAGE, 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA AHCI Controller
:(32902:10516:32902:20298) pci, None, PCI/ISA, 82801IO (ICH9DO) LPC Interface Controller
:(32902:4285:32902:1) pci, e1000e, ETHERNET, 82566DM-2 Gigabit Network Connection
:(32902:10564:32902:10564) pci, pcieport, PCI/PCI, 82801I (ICH9 Family) PCI Express Port 3
:(32902:9294:32902:20298) pci, None, PCI/PCI, 82801 PCI Bridge
:(32902:10549:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #2
:(32902:10548:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #1
:(32902:10553:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #6
:(32902:10550:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #3
:(32902:10554:32902:20298) pci, ehci_hcd, USB, 82801I (ICH9 Family) USB2 EHCI Controller #1
:(32902:10556:32902:20298) pci, ehci_hcd, USB, 82801I (ICH9 Family) USB2 EHCI Controller #2
:(4523:24833:4523:24833) pci, pata_marvell, STORAGE, 88SE6101/6102 single-port PATA133 interface
:(32902:10674:32902:20298) pci, i915, VIDEO, 82Q35 Express Integrated Graphics Controller
:(32902:10566:32902:10566) pci, pcieport, PCI/PCI, 82801I (ICH9 Family) PCI Express Port 4
:(32902:10560:32902:10560) pci, pcieport, PCI/PCI, Optiplex 755
:(32902:10562:32902:10562) pci, pcieport, PCI/PCI, 82801I (ICH9 Family) PCI Express Port 2
:(32902:10676:32902:20298) pci, None, SIMPLE, 82Q35 Express MEI Controller
:(32902:10568:32902:10568) pci, pcieport, PCI/PCI, 82801I (ICH9 Family) PCI Express Port 5
:(32902:10558:32902:19) pci, None, MULTIMEDIA, 82801I (ICH9 Family) HD Audio Controller
:(4843:2:4843:2) pci, snd_au8830, MULTIMEDIA_AUDIO, AU8830 Vortex 3D Digital Audio Processor
:(32902:10551:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #4
:(32902:10552:32902:20298) pci, uhci_hcd, USB, 82801I (ICH9 Family) USB UHCI Controller #5
:
:
:Filesystem Information
:=================================
:device mtpt type bsize frsize blocks bfree bavail file ffree favail
:-------------------------------------------------------------------
:/dev/sda3 / ext4 4096 4096 10217478 8690611 8178640 2564096 2385956 2385956
:/dev/sda1 /boot ext3 1024 1024 293649 210653 195393 76304 76075 76075
:/dev/sda2 /home ext3 4096 4096 50386620 18168269 15608312 12804096 10309778 10309778
:

Comment 1 Raymond 2012-02-26 14:45:03 UTC
>> :Sometimes my host doesn't play music. In this case I try to reload the module
snd_au8830.
>> This bug occured when I loaded the module snd_au8830 in the second time.


can you post the output of alsa-info.sh ?

Comment 2 Andrey Vagin 2012-02-26 19:39:57 UTC
Created attachment 565914 [details]
alsa-info.txt

Comment 3 Raymond 2012-02-26 23:53:36 UTC
!!ALSA Version
!!------------

Driver version:     1.0.24
Library version:    
Utilities version:  1.0.25


why alsa-driver is still 1.0.24 ?


APLAY

**** List of PLAYBACK Hardware Devices ****
card 0: au8830 [Aureal Vortex au8830], device 0: Aureal Vortex 2 ADB [au8830 adb]
  Subdevices: 32/32


if you still have 32 subdevices, this mean that you are not using alsa-driver-1.0.25 since it have been reduced to 16



!!PCI Soundcards installed in the system
!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 02)
06:00.0 Multimedia audio controller: Aureal Semiconductor Vortex 2 (rev fa)





[   12.657863] snd_hda_intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[   12.659223] snd_hda_intel 0000:00:1b.0: irq 48 for MSI/MSI-X
[   12.660521] snd_hda_intel 0000:00:1b.0: setting latency timer to 64
[   12.670024] ALSA sound/pci/hda/hda_intel.c:2837 no codecs found!
[   12.671307] snd_hda_intel 0000:00:1b.0: PCI INT A disabled



even if your hda-codec is not supported, it should try hda-codec-generic

Comment 4 Raymond 2012-02-28 01:21:25 UTC
can you provide the step to reproduce the bug ?

did you stop pulseaudio or related service before remove snd-au8830 ?


: [<ffffffffa01badf3>] snd_card_free+0xa3/0xc0 [snd]
: [<ffffffffa0261b8f>] ? snd_ac97_bus+0xaf/0x130 [snd_ac97_codec]
: [<ffffffffa04e6a9f>] snd_vortex_probe+0x1c40/0x1d09 [snd_au8830]
: [<ffffffff812db37c>] local_pci_probe+0x5c/0xd0
: [<ffffffff812dcc19>] pci_device_probe+0x109/0x130
: [<ffffffff813932cc>] driver_probe_device+0x9c/0x300
: [<ffffffff813935db>] __driver_attach+0xab/0xb0
: [<ffffffff81393530>] ? driver_probe_device+0x300/0x300
: [<ffffffff81393530>] ? driver_probe_device+0x300/0x300
: [<ffffffff8139214c>] bus_for_each_dev+0x5c/0x90
: [<ffffffff81392ede>] driver_attach+0x1e/0x20
: [<ffffffff81392ae0>] bus_add_driver+0x1b0/0x2a0

can you add printk statement to dump the value of 'err' returned by snd_ac97_bus ?


-	if ((err = snd_ac97_bus(vortex->card, 0, &ops, NULL, &pbus)) < 0)
+	if ((err = snd_ac97_bus(vortex->card, 0, &ops, NULL, &pbus)) < 0) {
+               printk("snd_ac97_bus err %d\n",err);
		return err;
+       }

Comment 5 Andrew Vagin 2012-03-02 08:34:49 UTC
Sometimes my sound card hangs up (It do not produce sounds. Applications which try to play something hangs).

In this case I try to reload modules and get this bug.
# killall pulseaudio; rmmod snd_au8830 snd_hda_intel snd_seq snd_ac97_codec ac97_bus snd_hda_codec snd_hwdep snd_mpu401_uart snd_pcm snd_rawmidi snd_seq_device snd_pcm snd_timer  snd_page_alloc snd
# modprobe snd_au8830

This bug was reproduced again.
Linux dhcp-10-30-19-46.sw.ru 3.2.7-1.fc16.x86_64 #1 SMP Tue Feb 21 01:40:47 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Driver version:     1.0.24
Library version:
Utilities version:  1.0.25

>> can you add printk statement to dump the value of 'err' returned by
snd_ac97_bus ?

Yes, I can. I will add information when it's produced again.

Comment 6 Raymond 2012-03-02 08:45:12 UTC
http://git.alsa-project.org/?p=alsa-kernel.git&a=search&h=HEAD&st=commit&s=au88x0

There are several patches related to au88x0 

but I am not sure that your alsa-driver-1.0.24 contain all those patches

1) Did you still get "IRQ FIFO error" in system log when you play stereo stream

aplay -Dhw:0,0  stereo.wav

2) Did front and rear channels still swaps after first play ?

speaker-test -c 4 -Dhw:0,0 -t wav

As you still have 32 playback subdevices, it seem that you did not have this commit 49b9c40e9b5e47ef64f8601b84981fa45c3c4f86

Comment 7 Raymond 2012-03-02 12:41:59 UTC
>> Sometimes my sound card hangs up (It do not produce sounds. Applications which
try to play something hangs).

>> In this case I try to reload modules and get this bug.

Have you try restart pulseaudio server ?


This can be due to many reason

1) did the pulseaudio server abort and unable to respwan ?


2) it is known that au88x0 still does not support suspend/resume 

you have to check any error messages in system log similar to 

https://bugzilla.redhat.com/show_bug.cgi?id=789156

Comment 8 Raymond 2012-03-17 03:35:04 UTC
Refer to those log , it seem that au88x0 gameport is not loaded

do you have any step which can reproduce the no sound problem ?


can you provide a pulseaudio log when there is no sound ?

i.e. open a terminal and wait until there is no sound

pulseaudio -k; pulseaudio -vvvv

does any error appear in pulseaudio log when 

aplay -v -D pulse --period-size=32 --buffer-size=96 any.wav

Comment 9 Raymond 2012-07-03 06:30:41 UTC
>> :Sometimes my host doesn't play music.

It seem that pulseaudio mute the other switches (e.g. PCM and Surround) when you mute "Master Playback Volume" of ac97 codec using any alsa application (e.g. amixer, alsamixer, qasmixer, gnome-alsamixer) if your sound card with ac97 codec is set as default sound card


~$ amixer -c0
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [on]
  Front Right: Playback 31 [100%] [12.00dB] [on]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]

~$ amixer -c0 set Master mute
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [off]
  Front Right: Playback 31 [100%] [0.00dB] [off]

~$ amixer -c 0
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [off]
  Front Right: Playback 31 [100%] [0.00dB] [off]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [off]
  Front Right: Playback 31 [100%] [0.00dB] [off]

~$ amixer -c0 set Master unmute
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]

~$ amixer -c 0
Simple mixer control 'Master',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [on]
  Front Right: Playback 31 [100%] [0.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [12.00dB] [off]
  Front Right: Playback 31 [100%] [12.00dB] [off]
Simple mixer control 'Surround',0
  Capabilities: pvolume pswitch penum
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Mono:
  Front Left: Playback 31 [100%] [0.00dB] [off]
  Front Right: Playback 31 [100%] [0.00dB] [off]

Comment 10 Raymond 2012-07-04 07:32:42 UTC
Created attachment 596161 [details]
Force Pulseaudio don't mute pcm playback switch when alsa mixer mute master playback switch

The patch fix the pulseaudio server mute "PCM playback switch" when any mixer application mute "Master Playback Switch" when au88x0 or any ac97 controlers with ac97 codec which has "PCM Playback Switch" when the sound is set as the default sink

Comment 11 Josh Boyer 2012-09-17 18:18:44 UTC
A number of Raymond's fixes went into the 3.4 kernel.  Are you still seeing issues with the 3.4 or 3.5 kernel updates?

Comment 12 Andrey Vagin 2012-09-17 18:21:55 UTC
No, I am not seeing it, because I've changed my computer. Thank you for attempts to fix this bug.

Comment 13 Josh Boyer 2012-09-17 18:57:56 UTC
Thank you for letting us know.

I'm going to make an assumption that Raymond's upstream work has fixed this for vortex users and close this out now.