Repository navigation
Closed
Labels
CFLApplies to Coffee Lake platformApplies to Coffee Lake platformCNLApplies to CannonlakeApplies to CannonlakeP2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't workingSomething isn't working
Description
Launching xournalpp (built from master on FC31)
[ 79.119116] sof-audio-pci 0000:00:1f.3: stream_tag 1
[ 79.119128] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60010000
[ 79.119312] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60010000
[ 79.119319] sof-audio-pci 0000:00:1f.3: pcm: stream dir 0, posn mailbox offset is 790756
[ 79.129186] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=1
[ 79.129197] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 1
[ 79.129642] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x14001e successful
[ 79.129650] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60040000
[ 79.129912] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60040000
[ 79.142649] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 0
[ 79.142660] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000
[ 79.142836] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000
[ 79.143442] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x140000 successful
[ 79.143455] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000
[ 79.143654] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000
[ 79.143674] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=0
[ 79.143689] sof-audio-pci 0000:00:1f.3: ipc tx: 0x80010000
[ 79.143902] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 79.143923] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 0
[ 79.143945] sof-audio-pci 0000:00:1f.3: ipc tx: 0x80010000
[ 79.144160] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 79.144224] sof-audio-pci 0000:00:1f.3: pcm: close stream 0 dir 0
[ 79.194530] sof-audio-pci 0000:00:1f.3: pcm: open stream 0 dir 1
[ 79.194536] sof-audio-pci 0000:00:1f.3: period min 192 max 16384 bytes
[ 79.194540] sof-audio-pci 0000:00:1f.3: period count 2 max 16
[ 79.194543] sof-audio-pci 0000:00:1f.3: buffer max 65536 bytes
[ 79.194666] sof-audio-pci 0000:00:1f.3: ipc tx: 0x80010000
[ 79.194814] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 79.194838] sof-audio-pci 0000:00:1f.3: format_val=49, rate=48000, ch=2, format=10
[ 79.194850] sof-audio-pci 0000:00:1f.3: pcm: hw params stream 0 dir 1
[ 79.194856] sof-audio-pci 0000:00:1f.3: generating page table for 00000000b9c48a49 size 0x8100 pages 9
[ 79.194866] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x140000 successful
[ 79.194884] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[ 79.194888] sof-audio-pci 0000:00:1f.3: period_bytes:0x2040
[ 79.194890] sof-audio-pci 0000:00:1f.3: periods:4
[ 79.194905] sof-audio-pci 0000:00:1f.3: stream_tag 1
[ 79.194916] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60010000
[ 79.195075] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60010000
[ 79.195082] sof-audio-pci 0000:00:1f.3: pcm: stream dir 1, posn mailbox offset is 790908
[ 79.195220] sof-audio-pci 0000:00:1f.3: ipc tx: 0x80010000
[ 79.195398] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 79.195420] sof-audio-pci 0000:00:1f.3: format_val=49, rate=48000, ch=2, format=10
[ 79.195430] sof-audio-pci 0000:00:1f.3: pcm: hw params stream 0 dir 1
[ 79.195443] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x140000 successful
[ 79.195461] sof-audio-pci 0000:00:1f.3: FW Poll Status: reg=0x40000 successful
[ 79.195465] sof-audio-pci 0000:00:1f.3: period_bytes:0x3000
[ 79.195467] sof-audio-pci 0000:00:1f.3: periods:4
[ 79.195482] sof-audio-pci 0000:00:1f.3: stream_tag 1
[ 79.195492] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60010000
[ 79.195706] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x60010000 size 20
[ 79.195712] sof-audio-pci 0000:00:1f.3: error: hw params ipc failed for stream 1
[ 79.195716] sof-audio-pci 0000:00:1f.3: ASoC: 0000:00:1f.3 hw params failed: -22
[ 79.195721] HDA Analog: ASoC: hw_params FE failed -22
[ 79.195741] sof-audio-pci 0000:00:1f.3: ipc tx: 0x80010000
[ 79.195958] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 79.195971] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 1
[ 79.195976] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000
[ 79.196123] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000
[ 79.196144] BUG: unable to handle page fault for address: fffffffffffffff8
[ 79.196150] #PF: supervisor read access in kernel mode
[ 79.196154] #PF: error_code(0x0000) - not-present page
[ 79.196157] PGD 1240e067 P4D 1240e067 PUD 12410067 PMD 0
[ 79.196169] Oops: 0000 [#1] SMP NOPTI
[ 79.196175] CPU: 2 PID: 2405 Comm: xournalpp Tainted: G OE 5.4.0-rc8+ #14
[ 79.196179] Hardware name: LENOVO 20QFCTO1WW/20QFCTO1WW, BIOS N2HET40P (1.23 ) 10/17/2019
[ 79.196191] RIP: 0010:hda_link_config_ipc.isra.0+0x13/0xf0 [snd_sof_intel_hda_common]
[ 79.196196] Code: de c0 e8 90 2c 73 eb b8 ed ff ff ff eb d6 b8 ed ff ff ff eb cf 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 83 ec 20 <4c> 8b 3f 89 54 24 04 65 48 8b 04 25 28 00 00 00 48 89 44 24 18 31
[ 79.196200] RSP: 0018:ffffbd06c1aefb78 EFLAGS: 00010286
[ 79.196204] RAX: ffff9cc498866230 RBX: ffff9cc4969c4400 RCX: 0000000000000001
[ 79.196208] RDX: 00000000ffffffff RSI: ffff9cc48d811fa8 RDI: fffffffffffffff8
[ 79.196211] RBP: ffff9cc494797628 R08: ffff9cc494797628 R09: 0000000000000008
[ 79.196214] R10: ffff9cc49975b6f0 R11: 0000000000000003 R12: 0000000000000000
[ 79.196216] R13: ffff9cc4998e2028 R14: ffff9cc493ef5028 R15: ffff9cc487ed2400
[ 79.196221] FS: 00007fdcfa4d5a80(0000) GS:ffff9cc4ae680000(0000) knlGS:0000000000000000
[ 79.196224] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 79.196227] CR2: fffffffffffffff8 CR3: 0000000452f66004 CR4: 00000000003606e0
[ 79.196231] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 79.196234] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 79.196236] Call Trace:
[ 79.196260] ? __snd_hda_codec_cleanup_stream.part.0+0x2d/0x70 [snd_hda_codec]
[ 79.196270] hda_link_hw_free+0x4a/0xd0 [snd_sof_intel_hda_common]
[ 79.196294] soc_pcm_hw_free+0x160/0x180 [snd_soc_core]
[ 79.196316] dpcm_be_dai_hw_free+0xdf/0x130 [snd_soc_core]
[ 79.196336] dpcm_fe_dai_hw_free+0x89/0xe0 [snd_soc_core]
[ 79.196350] snd_pcm_hw_params+0xf0/0x390 [snd_pcm]
[ 79.196360] snd_pcm_oss_change_params_locked+0x6aa/0xe00 [snd_pcm_oss]
[ 79.196370] snd_pcm_oss_change_params+0x32/0x60 [snd_pcm_oss]
[ 79.196376] snd_pcm_oss_get_active_substream+0x5b/0x70 [snd_pcm_oss]
[ 79.196383] snd_pcm_oss_set_channels+0x9c/0xf0 [snd_pcm_oss]
[ 79.196390] snd_pcm_oss_ioctl+0x98c/0xf10 [snd_pcm_oss]
[ 79.196401] ? selinux_file_ioctl+0x174/0x220
[ 79.196410] do_vfs_ioctl+0x3f4/0x650
[ 79.196418] ksys_ioctl+0x5e/0x90
[ 79.196425] __x64_sys_ioctl+0x16/0x20
[ 79.196433] do_syscall_64+0x5b/0x180
[ 79.196442] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 79.196448] RIP: 0033:0x7fdcfbbb02fb
[ 79.196453] Code: 0f 1e fa 48 8b 05 8d 9b 0c 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 5d 9b 0c 00 f7 d8 64 89 01 48
[ 79.196456] RSP: 002b:00007fff476417a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 79.196461] RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 00007fdcfbbb02fb
[ 79.196464] RDX: 00007fff476417e0 RSI: 00000000c0045006 RDI: 000000000000000f
[ 79.196467] RBP: 000000000000000f R08: 0000000000000000 R09: 00007fff47641890
[ 79.196470] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000c0045006
[ 79.196472] R13: 00007fff476417e0 R14: 00007fff47641870 R15: 0000000000000000
[ 79.196477] Modules linked in: fuse ip6t_REJECT nf_reject_ipv6 ip6t_rpfilter ipt_REJECT nf_reject_ipv4 xt_conntrack ebtable_nat ebtable_broute ip6table_nat ip6table_mangle ip6table_raw ip6table_security iptable_nat nf_nat iptable_mangle iptable_raw iptable_security nf_conntrack nf_defrag_ipv6 libcrc32c nf_defrag_ipv4 wireguard(OE) ip_set nfnetlink ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ccm configs bnep arc4 btusb uvcvideo btrtl btbcm videobuf2_vmalloc btintel videobuf2_memops bluetooth videobuf2_v4l2 videobuf2_common videodev cmac mc ecdh_generic ecc md4 sunrpc snd_soc_skl_hda_dsp snd_hda_codec_hdmi snd_soc_hdac_hdmi snd_hda_codec_realtek snd_hda_codec_generic iwlmvm snd_soc_dmic snd_sof_pci vfat snd_sof_intel_hda_common fat snd_soc_acpi_intel_match joydev snd_soc_acpi mac80211 snd_soc_hdac_hda snd_intel_dspcfg snd_sof snd_sof_intel_hda snd_sof_xtensa_dsp snd_hda_ext_core snd_soc_core snd_hda_codec snd_hwdep snd_hda_core snd_pcm_oss snd_mixer_oss
[ 79.196540] x86_pkg_temp_thermal intel_powerclamp snd_pcm coretemp libarc4 snd_seq_dummy thinkpad_acpi ledtrig_audio kvm_intel snd_seq_oss iwlwifi hid_multitouch iTCO_wdt snd_seq_midi mei_hdcp mei_wdt iTCO_vendor_support snd_rawmidi intel_rapl_msr intel_wmi_thunderbolt wmi_bmof snd_seq_midi_event intel_cstate snd_seq intel_uncore cfg80211 snd_seq_device snd_timer snd intel_rapl_perf hid_sensor_accel_3d mei_me hid_sensor_gyro_3d hid_sensor_trigger hid_sensor_iio_common pcspkr i2c_i801 industrialio_triggered_buffer processor_thermal_device kfifo_buf mei intel_lpss_pci ucsi_acpi industrialio intel_lpss intel_soc_dts_iosf soundcore typec_ucsi intel_rapl_common idma64 intel_pch_thermal rfkill typec int3403_thermal wmi int340x_thermal_zone int3400_thermal acpi_tad acpi_pad acpi_thermal_rel ip_tables dm_crypt hid_sensor_custom hid_sensor_hub intel_ishtp_loader intel_ishtp_hid wacom pkcs8_key_parser kvmgt crct10dif_pclmul crc32_pclmul crc32c_intel e1000e nvme ghash_clmulni_intel serio_raw
[ 79.196619] nvme_core intel_ish_ipc intel_ishtp i2c_hid pinctrl_cannonlake pinctrl_intel i915 video i2c_algo_bit drm_kms_helper drm vfio_mdev mdev vfio_iommu_type1 vfio kvm irqbypass ec_sys
[ 79.196644] CR2: fffffffffffffff8
[ 79.196649] ---[ end trace 6dde4e02e1b01cf1 ]---
[ 79.196659] RIP: 0010:hda_link_config_ipc.isra.0+0x13/0xf0 [snd_sof_intel_hda_common]
[ 79.196664] Code: de c0 e8 90 2c 73 eb b8 ed ff ff ff eb d6 b8 ed ff ff ff eb cf 66 90 0f 1f 44 00 00 41 57 41 56 41 55 41 54 55 53 48 83 ec 20 <4c> 8b 3f 89 54 24 04 65 48 8b 04 25 28 00 00 00 48 89 44 24 18 31
[ 79.196667] RSP: 0018:ffffbd06c1aefb78 EFLAGS: 00010286
[ 79.196671] RAX: ffff9cc498866230 RBX: ffff9cc4969c4400 RCX: 0000000000000001
[ 79.196674] RDX: 00000000ffffffff RSI: ffff9cc48d811fa8 RDI: fffffffffffffff8
[ 79.196676] RBP: ffff9cc494797628 R08: ffff9cc494797628 R09: 0000000000000008
[ 79.196679] R10: ffff9cc49975b6f0 R11: 0000000000000003 R12: 0000000000000000
[ 79.196682] R13: ffff9cc4998e2028 R14: ffff9cc493ef5028 R15: ffff9cc487ed2400
[ 79.196686] FS: 00007fdcfa4d5a80(0000) GS:ffff9cc4ae680000(0000) knlGS:0000000000000000
[ 79.196689] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 79.196692] CR2: fffffffffffffff8 CR3: 0000000452f66004 CR4: 00000000003606e0
[ 79.196695] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 79.196698] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Debug output from app:
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 922
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 922
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 922
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 922
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 922
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
Obviously app has a bug but still not ideal.
sof-dev with 5.4rc8+ merged and #1509, also happens on 5.4rc7+.
Metadata
Metadata
Assignees
Labels
CFLApplies to Coffee Lake platformApplies to Coffee Lake platformCNLApplies to CannonlakeApplies to CannonlakeP2Critical bugs or normal featuresCritical bugs or normal featuresbugSomething isn't workingSomething isn't working
Activity
plbossart commentedon Dec 2, 2019
@tokyovigilante can you try to apply #1541 ?
This looks similar to an issue I encountered with bad handling of the .free callback.
Thanks!
tokyovigilante commentedon Dec 3, 2019
@plbossart #1541 does fix the oops thanks and the application runs, still getting a number of errors in dmesg but they don't seem crritical.
plbossart commentedon Dec 4, 2019
@tokyovigilante could you somehow dump the hw_params requested by the app? wondering if this is a case of the topology exposing capabilities but not testing for bad values before they are send to the DSP over IPC.
We have such a case for DMICs where if the app request 2 channels it records at double the rate instead of rejecting the request.
kv2019i commentedon Jan 8, 2020
Ack.This is an interesting case (tagging as bug) -- app is using PortAudio to talk to audio hardware and portaudio uses OSS emulation (in this case) to talk to driver:
https://github.com/xournalpp/xournalpp/tree/master/src/util/audio/
... I think @plbossart you are spot on, there's some invalid config value that is supported at ALSA level but IPC will fail. Based on app logs, the setting in question is buffersize.
[-][CNL] Kernel oops with userspace app launch (xournalpp)[/-][+]Playback via ALSA OSS emulation fails to hw_params (xournalpp)[/+]kv2019i commentedon Jan 8, 2020
Hmm, @plbossart and @tokyovigilante -- it would seem this problem applies more generally to ALSA emulation OSS. I got the same error with multiple OSS apps with latest sof-dev on CFL/HDA, so I think you can hit this pretty much with any OSS app.
A simple test for example is this:
sh> mpg123 -o oss foobar.mp3
Fails to
main: [src/mpg123.c:818] error: ...in decoding next frame: Unable to set up output format! (code 1)
I've started debugging this. It seems the OSS syscall to set audio format also triggers hwparams, which fails for SOF. Bug title renamed, I'll continue debug.
kv2019i commentedon Jan 8, 2020
Ok, rootcaused -- patch on its way.
tokyovigilante commentedon Jan 9, 2020
@kv2019i great news thanks! Sorry I haven't been able to give this any attention but much appreciated.
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation
UPSTREAM: ASoC: SOF: fix PCM playback through ALSA OSS emulation
ASoC: SOF: fix PCM playback through ALSA OSS emulation