Skip to content

5.10 code - race in the HDA codec probe when SOF probe fails (no video driver bound) #2646

Closed

Description

@perexg

We have got the oops bellow on the Tigerlake machine with the current 5.10 code when the video driver is not bound for a reason. It seems that the hdac_ext_link structure is corrupted (late access?) on probe or so. Any idea?

[  111.582047] sof-audio-pci 0000:00:1f.3: couldn't bind with audio component 
[  111.589044] sof-audio-pci 0000:00:1f.3: init of i915 and HDMI codec failed 
[  111.598257] sof-audio-pci 0000:00:1f.3: use msi interrupt mode 
[  111.609641] sof-audio-pci 0000:00:1f.3: codec #2 probe error, ret: -2 
[  111.616492] sof-audio-pci 0000:00:1f.3: No SoundWire machine driver found 
[  111.623374] sof-audio-pci 0000:00:1f.3: no hda codecs found! 
[  111.629127] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found 
[  111.637137] sof-audio-pci 0000:00:1f.3: error: no matching ASoC machine driver found - aborting probe 
[  111.646454] sof-audio-pci 0000:00:1f.3: error: failed to get machine info -19 
[  111.653938] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -19 
[  111.653991] BUG: unable to handle kernel paging request at ffffaf3542098c84 
[  111.668180] PGD 107c7b067 P4D 107c7b067 PUD 107c7c067 PMD 487f49067 PTE 0 
[  111.675043] Oops: 0000 [#1] SMP NOPTI 
[  111.678768] CPU: 2 PID: 20629 Comm: systemd-udevd Kdump: loaded Not tainted 5.10.x86_64 #1 
[  111.687988] Hardware name: Intel Corporation Tiger Lake Client Platform/TigerLake Y LPDDR4x T4 Crb, BIOS TGLSFWI1.R00.3313.A02.2007300246 07/30/2020 
[  111.701387] RIP: 0010:check_hdac_link_power_active+0x3a/0x60 [snd_hda_ext_core] 
[  111.708776] Code: 89 f5 53 bb 96 00 00 00 e8 a3 7c de e4 eb 16 a9 00 00 80 00 75 23 bf 55 32 00 00 e8 90 7c de e4 83 eb 01 74 1b 49 8b 44 24 10 <8b> 40 04 40 84 ed 75 dd a9 00 00 80 00 75 dd 5b 31 c0 5d 41 5c c3 
[  111.727659] RSP: 0018:ffffaf3547e7fb48 EFLAGS: 00010202 
[  111.732952] RAX: ffffaf3542098c80 RBX: 0000000000000085 RCX: 0000004456f80453 
[  111.740159] RDX: 0000000000001af3 RSI: 0000000000000002 RDI: 00000000000019a7 
[  111.747375] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000002 
[  111.754585] R10: 000000000000000a R11: f000000000000000 R12: ffff9661fa087100 
[  111.761799] R13: 0000000000000000 R14: 0000000000000034 R15: 0000000000000000 
[  111.769017] FS:  00007f0f1184c980(0000) GS:ffff96621f880000(0000) knlGS:0000000000000000 
[  111.777204] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033 
[  111.783016] CR2: ffffaf3542098c84 CR3: 0000000477622006 CR4: 0000000000760ee0 
[  111.790232] PKRU: 55555554 
[  111.793002] Call Trace: 
[  111.795519]  snd_hdac_ext_bus_link_get+0x70/0xf0 [snd_hda_ext_core] 
[  111.801865]  hdac_hda_dev_probe+0x3c/0xc0 [snd_soc_hdac_hda] 
[  111.807592]  really_probe+0x212/0x440 
[  111.811325]  driver_probe_device+0x49/0xc0 
[  111.815489]  device_driver_attach+0x50/0x60 
[  111.819737]  __driver_attach+0x61/0x130 
[  111.823639]  ? device_driver_attach+0x60/0x60 
[  111.828058]  bus_for_each_dev+0x77/0xc0 
[  111.831971]  ? klist_add_tail+0x3b/0x70 
[  111.835895]  bus_add_driver+0x14d/0x1e0 
[  111.839799]  ? 0xffffffffc04df000 
[  111.843176]  driver_register+0x6b/0xb0 
[  111.846987]  ? 0xffffffffc04df000 
[  111.850368]  do_one_initcall+0x46/0x1c3 
[  111.854282]  ? do_init_module+0x22/0x220 
[  111.858267]  ? preempt_schedule_common+0xa/0x20 
[  111.862871]  ? _cond_resched+0x1d/0x30 
[  111.866683]  ? kmem_cache_alloc_trace+0x140/0x1c0 
[  111.871464]  do_init_module+0x5a/0x220 
[  111.875278]  load_module+0x14b4/0x17e0 
[  111.879092]  ? __do_sys_init_module+0x13b/0x180 
[  111.883686]  __do_sys_init_module+0x13b/0x180 
[  111.888109]  do_syscall_64+0x5b/0x1a0 
[  111.891836]  entry_SYSCALL_64_after_hwframe+0x65/0xca 
[  111.896954] RIP: 0033:0x7f0f1043e1ae 
[  111.900601] Code: 48 8b 0d dd ec 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d aa ec 2b 00 f7 d8 64 89 01 48 
[  111.919482] RSP: 002b:00007ffc3776fce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000af 
[  111.927128] RAX: ffffffffffffffda RBX: 000056284670e350 RCX: 00007f0f1043e1ae 
[  111.934344] RDX: 00007f0f10fa982d RSI: 0000000000023370 RDI: 0000562846823b90 
[  111.941561] RBP: 00007f0f10fa982d R08: 000056284669401a R09: 0000000000000006 
[  111.948771] R10: 0000562846694010 R11: 0000000000000246 R12: 0000562846823b90 
[  111.955991] R13: 0000562846707390 R14: 0000000000020000 R15: 0000000000000000 

Activity

  1. keyonjie commented on Dec 21, 2020

    @keyonjie

    Thanks for reporting @perexg This looks a valid issue which I actually saw randomly on TGL platform.
    @kv2019i any comments on this?

  2. added
    bugSomething isn't working
    TGLApplies to Tiger Lake platform
    HDAApplies to HD-Audio bus for codec connection
    P1Blocker bugs or important features
    on Dec 21, 2020
  3. self-assigned this
    on Dec 21, 2020
  4. kv2019i commented on Dec 21, 2020

    @kv2019i
    Collaborator

    I'll take a look at this. The following -ENOENT case is a good hint:
    [ 111.609641] sof-audio-pci 0000:00:1f.3: codec #2 probe error, ret: -2

    I think this is related to "ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work". The patch addresses a problem where we do not clean up the hdac device after error and this blocks runtime-pm. But in this case, the cleanup is done too early.

  5. kv2019i commented on Dec 21, 2020

    @kv2019i
    Collaborator

    I have a tentative fix, but it needs some more testing before ready for submission. I was tempted to clean up some of the related code, but for stable we're probably better off with a more clean and smaller fix.

  6. kv2019i commented on Jan 13, 2021

    @kv2019i
    Collaborator

    Patch in sof-dev and sent to upstream, closing.

  7. 3 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

HDAApplies to HD-Audio bus for codec connectionP1Blocker bugs or important featuresTGLApplies to Tiger Lake platformbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions