Skip to content

[BUG] Memory leak detected #4175

Closed
Closed

Description

@kkarask

Describe the bug
Memory leak detected in tests: 05_10_TestDmicMemLeak and 07_06_TestKdMemLeak

Topology for test 05_10_TestDmicMemLeak :

    +----------+   +------------------+
    |    OS    |-->|   AUDIO DEVICE   |-------------+
    +----------+   +------------------+             |
                                                    |
                  +--------------------+            |
    +----------+  | +------+   +-----+ |  +------+  |
    | Host cap |<---|Buffer|<--| Dai |<---| DMIC |<-+
    +----------+  | +------+   +-----+ |  +------+
                  +--------------------+

Topology for test 07_06_TestKdMemLeak

Topology:
                pipe_plb
               +------------------+
        +----+ | +---+  +-------+ |
        |Host|-->|Buf|->|SSP Dai|----------------------------------+
        +----+ | +---+  +-------+ |                                |
               +----------------- +                                |
                                                                   |
                   +-------------------------+                     |
        +--------+ | +---+   +-----+   +---+ |                     |
        |KD Dummy|<->|Buf|<->|ChSel|<->|Buf|<->+                   |
        +--------+ | +---+   +-----+   +---+ | |  pipe_cap         |
                   +-------------------------+ |                   |
                                               |                   |
                             +-----------------+                   |
        +--------------------|-----------------------------------+ |
        |+----+  +------+  +---+  +---+  +---+  +---+  +-------+ | |
        ||Host|<-|Buffer|<-|Kpb|<-|Buf|<-|Vol|<-|Buf|<-|SSP Dai|---+
        |+----+  +------+  +---+  +---+  +---+  +---+  +-------+ |
        +--------------------------------------------------------+

To Reproduce
Run tests 05_10_TestDmicMemLeak and 07_06_TestKdMemLeak with Diagnostic driver

Reproduction Rate
100/100
Problem doesn't exist before: ea5d9be

Environment

  1. Firmware branch name and commit

  2. Name of the platform(s) on which the bug is observed.

    • Platform: TGL RVP, APL RVP, WHL RVP, ICL RVP
  3. Test environment:
    Branch: master, Hash: b7ed915d911acda055bbb822800b76557e9fe7de

Logs:
TGL:
07_06_TestKdMemLeak.zip
05_10_TestDmicMemLeak.zip

WHL:
05_10_TestDmicMemLeakWHL.zip
07_06_TestKdMemLeakWHL.zip

Activity

  1. added
    bugSomething isn't working as expected
    APLApplies to Apollolake platform
    WHLApplies to WhiskeyLake platform
    ICLApplies to IceLake platform
    TGLApplies to Tiger Lake
    on May 12, 2021
  2. lgirdwood commented on May 12, 2021

    @lgirdwood
    Member

    This could be two leaks, one in KWD and the other in DMIC. @singalsu can you check the dmic and @mrajwa the KWD. Thanks

  3. mrajwa commented on May 12, 2021

    @mrajwa
    Contributor

    @slawblauciak will check KWD

  4. singalsu commented on May 12, 2021

    @singalsu
    Collaborator

    Thanks, I'll test here 05_10_TestDmicMemLeak.

  5. singalsu commented on May 18, 2021

    @singalsu
    Collaborator

    @kkarask There's three DMIC driver related fixed merged #4196, #4195, and #4159. Could you please re-run 05_10_TestDmicMemLeak since I'm not able to run the test with Linux as host OS.

  6. kkarask commented on May 18, 2021

    @kkarask
    Author

    @singalsu Issue still exists after marged above PR. Problem with memory leak is present at that Hash: f510435

  7. singalsu commented on May 25, 2021

    @singalsu
    Collaborator

    I could not repeat this issue with SOF in single and overlapping capture cases with arecord scripting. Maybe this should be bisected if it's a regression if there would be a good version found from the past?

  8. lgirdwood commented on May 25, 2021

    @lgirdwood
    Member

    @singalsu I assume we are using uncache regions for DMIC config now like SSP ? Please see @keyonjie recent patches.

  9. kkarask commented on May 26, 2021

    @kkarask
    Author

    @singalsu Last stable version: 47d223c First memory leak detected: ea5d9be

  10. kkarask commented on Jun 8, 2021

    @kkarask
    Author

    @singalsu Good news! Memory leak is not visible on none of the platforms.

  11. singalsu commented on Jun 8, 2021

    @singalsu
    Collaborator

    @kkarask That's great news, thanks for update! Can this issue be closed?

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

Metadata

Metadata

Labels

APLApplies to Apollolake platformICLApplies to IceLake platformTGLApplies to Tiger LakeWHLApplies to WhiskeyLake platformbugSomething isn't working as expecteddiagnostic driverSlim driver / diagnostic driver issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions