You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]Topology load failure with recent redirection #5113
I really don't see how eb34437 could make any content difference. If it did this would be exposing a very severe bug in alsatplg, much more serious than a simple permission issue. I just reverted it locally and permissions aside all the .tplg files are byte for byte identical. I tested alsatplg version 1.2.2
As a coincidence, I tested this commit with very different number of threads because I was fixing an unrelated and proven CMake race condition with development/ topologies (#5067). While testing #5067 I never noticed any other race. I tested again with -j1 and -j400 and the number of threads makes zero difference to anything.
For the record here's the expected file right now:
md5sum tools/build_tools/topology/sof-hda-generic-4ch.tplg
76ae10de56aec534bf21584eb0b8c2da tools/build_tools/topology/sof-hda-generic-4ch.tplg
ls -l tools/build_tools/topology/sof-hda-generic-4ch.tplg
-rw-rw-r-- 49855 Dec 20 23:33 tools/build_tools/topology/sof-hda-generic-4ch.tplg
And manual redirection with the alsatplg command works fine but redirection with the build-tools.sh script results in a corrupt tplg file. Here's the broken tplg file:
There are debug logs from alsatplg in the corrupt topology. The debug option is on with ranjani's alsatplg. The tplg_log output debug log to stdout, too. So the debug log and topology content are mixed in the broken topology file with eb34437
I'm sorry @marc-hb , I cannot use stderr for debug logs. That's not the right fix. If debug logs will get redirected too, this patch needs to be reverted. Anyway isn't the original problem for which u submitted this change already been fixed upstream?
Activity
ranj063 commentedon Dec 20, 2021
@marc-hb FYI
marc-hb commentedon Dec 20, 2021
I really don't see how eb34437 could make any content difference. If it did this would be exposing a very severe bug in
alsatplg, much more serious than a simple permission issue. I just reverted it locally and permissions aside all the.tplgfiles are byte for byte identical. I tested alsatplg version 1.2.2lgirdwood commentedon Dec 20, 2021
Could we have a race in the build ? Do we need to force clean topology bimaries ? Do we have stale intermediate topology build files anywhere ?
marc-hb commentedon Dec 20, 2021
As a coincidence, I tested this commit with very different number of threads because I was fixing an unrelated and proven CMake race condition with
development/topologies (#5067). While testing #5067 I never noticed any other race. I tested again with-j1and-j400and the number of threads makes zero difference to anything.For the record here's the expected file right now:
@ranj063 told me she got:
She also said running the
alsatplgcommand manually with the redirection works fine.@ranj063 can you please:
ranj063 commentedon Dec 21, 2021
A few more details about my environment:
Ubuntu 20.04
shell type: bash
alsatplg version 1.2.6
libasound version 1.2.6.1
libatopology version 1.2.6.1
corrupt-tplg.tar.gz
And manual redirection with the alsatplg command works fine but redirection with the build-tools.sh script results in a corrupt tplg file. Here's the broken tplg file:
marc-hb commentedon Dec 21, 2021
I believe your CMake version was 3.16.3
Also: is it affecting just this .tplg file or others or most or all?
diff -qr build_tools.before/ build_tools.after/aiChaoSONG commentedon Dec 22, 2021
There are debug logs from alsatplg in the corrupt topology. The debug option is on with ranjani's alsatplg. The tplg_log output debug log to stdout, too. So the debug log and topology content are mixed in the broken topology file with eb34437
marc-hb commentedon Dec 22, 2021
Awesome find @aiChaoSONG , you rock! (why didn't I open the attached file mysefl? Maybe it was too late after a long day...)
@ranj063 please use
fprintf(stderr, ...)for your debug logs, this should avoid the issue.Closing.
ranj063 commentedon Dec 24, 2021
I'm sorry @marc-hb , I cannot use stderr for debug logs. That's not the right fix. If debug logs will get redirected too, this patch needs to be reverted. Anyway isn't the original problem for which u submitted this change already been fixed upstream?
marc-hb commentedon Dec 24, 2021
Why not?
Considering
alsatplg -o -is supported, how come debug logs go to stdout at the same time? Can you explain how to reproduce this?Yes it just got fixed days ago. Not everyone is using the latest alsatplg.
marc-hb commentedon Dec 24, 2021
OK that was easy. See commit message of revert #5132
Revert "topology: redirection to workaround hardcoded alsatplg permis…