Skip to content

[BUG][logger] 'Inappropriate ioctl for device' when start logger to acquire error log #3446

Closed

Description

@aiChaoSONG

Describe the bug
Once our test failed, we will start sof-logger like this /usr/bin/sof-logger -l /etc/sof/sof-byt.ldc -o /home/ubuntu/sof-test/logs/check-alsabat/2020-09-18-16:49:54-26390/etrace.txt to acquire error log. and the logger conplained error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) failed: Inappropriate ioctl for device(25)

check the failure in https://sof-ci.01.org/linuxpr/PR2452/build4513/devicetest/. We also observed this sof-logger failure with other test case failure.

Reproduction Rate
once test case failed, quite high rate to see this sof-logger issue.

Expected behavior
sof-logger should be able to collect error log.

Environment
Linux: 337674140e88 ASoC: SOF: topology: remove const in sizeof()
SOF: 646e562 travis: remove duplicate and deprecated host-build-all.sh

Activity

  1. added
    bugSomething isn't working as expected
    on Sep 22, 2020
  2. marc-hb commented on Sep 22, 2020

    @marc-hb
    Collaborator

    This happens when a second, concurrent sof-logger is started and can be reproduced very easily with a one-line change, see example in thesofproject/sof-test#386

    I think it has been like this since forever, it's just no one cared about sof-logger issues before: most errors were ignored and messages were silenced, see #3402 , thesofproject/sof-test#373 etc.

  3. lgirdwood commented on Sep 23, 2020

    @lgirdwood
    Member

    @slawblauciak could be a race or etrace is empty ?

  4. slawblauciak commented on Sep 23, 2020

    @slawblauciak
    Collaborator

    @lgirdwood that looks like a kernel issue to me

  5. ktrzcinx commented on Sep 23, 2020

    @ktrzcinx
    Member

    It doesn't look like like race, after quick reading the code, I looks rather like reading empty file error, but it doesn't fully fit bug description - I can add it to my buglist to fix

  6. ktrzcinx commented on Sep 24, 2020

    @ktrzcinx
    Member

    @aiChaoSONG could you check if this patch could help: #3463 ?

  7. removed
    Fix confirmedFix for the issue has been found and verified
    on Oct 3, 2020
  8. slawblauciak commented on Nov 4, 2020

    @slawblauciak
    Collaborator

    @aiChaoSONG any updates?

  9. marc-hb commented on Nov 4, 2020

    @marc-hb
    Collaborator

    This could be a different issue but I noticed trying to access the etrace in suspend produces a confusing error message. More investigation / stress-testing is on my TODO list but keeps getting de-prioritized :-(

  10. aiChaoSONG commented on Nov 5, 2020

    @aiChaoSONG
    CollaboratorAuthor

    @marc-hb If you mean the below error message, then we are all good, this message has nothing to do with any error, it is used to avoid an empty error trace, which will help us to detect if sof-logger error trace works. It is printed on purpose. check #3265

    [103725963721.614594] (             nan) c0 dma-trace             src/trace/dma-trace.c:326  ERROR FW ABI 0x3011000 DBG ABI 0x5001000 tag v1.5-rc1-666-g46e49cc3b452 src hash 0x19c2e0e4 (ldc hash 0x19c2e0e4)
    [103725963721.614594] (        0.000000) c0 dma-trace             src/trace/dma-trace.c:326  ERROR FW ABI 0x3011000 DBG ABI 0x5001000 tag v1.5-rc1-666-g46e49cc3b452 src hash 0x19c2e0e4 (ldc hash 0x19c2e0e4)
    
  11. marc-hb commented on Nov 5, 2020

    @marc-hb
    Collaborator

    No I meant some ioctl or other linux system call error, forgot which one exactly sorry.

  12. aiChaoSONG commented on Jan 11, 2022

    @aiChaoSONG
    CollaboratorAuthor

    This is not reproducible any more, let's close

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expectedloggerDictionary and logger

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions