Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
aiChaoSONG opened this issue Sep 22, 2020 · 10 comments
Assignees
Labels
bug Something isn't working as expected logger Dictionary and logger

Comments

@aiChaoSONG
Copy link
Collaborator

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

@marc-hb
Copy link
Collaborator

marc-hb commented Sep 22, 2020

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.

@lgirdwood lgirdwood assigned ktrzcinx and slawblauciak and unassigned ktrzcinx Sep 23, 2020
@lgirdwood
Copy link
Member

@slawblauciak could be a race or etrace is empty ?

@slawblauciak
Copy link
Collaborator

@lgirdwood that looks like a kernel issue to me

@ktrzcinx
Copy link
Member

ktrzcinx commented Sep 23, 2020

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

@ktrzcinx
Copy link
Member

ktrzcinx commented Sep 24, 2020

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

@slawblauciak slawblauciak added the Fix confirmed Fix for the issue has been found and verified label Sep 29, 2020
@marc-hb marc-hb removed the Fix confirmed Fix for the issue has been found and verified label Oct 3, 2020
@slawblauciak
Copy link
Collaborator

@aiChaoSONG any updates?

@marc-hb
Copy link
Collaborator

marc-hb commented Nov 4, 2020

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 :-(

@aiChaoSONG
Copy link
Collaborator Author

@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)

@marc-hb
Copy link
Collaborator

marc-hb commented Nov 5, 2020

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

@marc-hb marc-hb added the logger Dictionary and logger label Mar 3, 2021
@aiChaoSONG
Copy link
Collaborator Author

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
Labels
bug Something isn't working as expected logger Dictionary and logger
Projects
None yet
Development

No branches or pull requests

5 participants