Skip to content

[BUG] IPC command timeout in record test #5613

Closed

Description

@brentlu

Describe the bug
IPC command timeout (TRIG_STOP) in audio record. SOF log is incomplete. Suspecting FW crash during the recording.

To Reproduce
Run the cras_test_client command to test the dmic record function. Following is the script:

#!/bin/bash

for i in {1..300}
do
echo "Welcome $i times"
cras_test_client -fS16_LE -c2 -r 48000 --block_size 720 --duration_seconds 0.015 -C /tmp/a.raw

DMESG=$(dmesg)

if [[ "${DMESG}" == "sof-audio-pci 0000:00:1f.3: error: ipc timed out" ]]
then
echo -e "ipc timeout found"
dmesg > dmesg.txt
exit
fi

sleep 3
done

Reproduction Rate
Around 1/100

Expected behavior
A clear and concise description of what you expected to happen.

Impact
It's a P0 issue raised by google: https://partnerissuetracker.corp.google.com/issues/219828156

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
    • Kernel: cros/chromeos-4.19 (57384c3dd873a19ead96ba5acd6c626cf8216999)
    • SOF: cml-008-patch-backport2 (99b7696)
  2. Name of the topology file
    • Topology: sof-cml-rt1011-rt5682.tplg
  3. Name of the platform(s) on which the bug is observed.
    • Platform: CML

dmesg.txt
sof-log.txt

Activity

  1. added
    bugSomething isn't working as expected
    CMLApplies to Comet Lake platform
    chromeChromebooks or ChromeOS
    on Mar 29, 2022
  2. brentlu commented on Mar 29, 2022

    @brentlu
    ContributorAuthor

    I saw the 'trace IO error' message in the kernel log and the sof log is incomplete. It seems to me that the software crashes during the recording on the DSP side. Any debug suggestion?

    [ 1167.523778] sound pcmC0D1c: snd_pcm_common_ioctl: DROP
    [ 1167.523799] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
    [ 1168.030055] sof-audio-pci 0000:00:1f.3: error: ipc timed out for 0x60050000 size 12
    [ 1168.030076] sof-audio-pci 0000:00:1f.3: status: fw entered - code 00000005
    [ 1168.030428] sof-audio-pci 0000:00:1f.3: error: unexpected fault 0x00000000 trace 0x00004000
    [ 1168.030449] sof-audio-pci 0000:00:1f.3: error: hda irq intsts 0x00000000 intlctl 0xc0000003 rirb 00
    [ 1168.030454] sof-audio-pci 0000:00:1f.3: error: dsp irq ppsts 0x00000000 adspis 0x00000000
    [ 1168.030471] sof-audio-pci 0000:00:1f.3: error: host status 0x00000000 dsp status 0x00000000 mask 0x00000003
    [ 1168.030476] sof-audio-pci 0000:00:1f.3: error: waking up any trace sleepers
    [ 1168.030495] DMIC01: ASoC: trigger FE cmd: 0 failed: -110
    [ 1168.030496] sof-audio-pci 0000:00:1f.3: error: trace IO error

  3. added
    P1Blocker bugs or important features
    on Mar 29, 2022
  4. brentlu commented on Mar 29, 2022

    @brentlu
    ContributorAuthor

    Bisect the cml-009-drop-stable branch and identify the fix:

    decd206 SRC: Fix pointer arithmetic in circular buffer wrap functions
    => pass 1000 loops
    ...
    6a0cf67 dmic: change spin_lock to spin_try_lock in dmic_work()
    => pass 2000 loops
    b03e15a spinlock: add return value to spin_try_lock macro
    6071fb8 dmic: add missing schedule_task_cancel() in dmic_stop()
    1fa037c logger: fix build errors with gcc 9.1.x
    => failed in loop 123

    The fix comes from PR2078 which fixes issue 2044. The description about ipc timeout in recording matches the issue we encounter here.

  5. linked a pull request that will close this issueIPC command timeout in record test #5617on Mar 29, 2022
  6. brentlu commented on Mar 31, 2022

    @brentlu
    ContributorAuthor

    customer confirmed that the issue is resolved.

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

Metadata

Metadata

Assignees

Labels

CMLApplies to Comet Lake platformP1Blocker bugs or important featuresbugSomething isn't working as expectedchromeChromebooks or ChromeOS

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions