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] IMX8 QEMU boot failed - qemu-check.sh regression after qemu commit f71c955 in sof-4.2 branch #4186
Run ./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh ${PLATFORM}
+ '[' -z 2.0 ']'
+ timeout --foreground 2.0 /home/sof/qemu/xtensa-softmmu/qemu-system-xtensa -cpu imx8 -M adsp_imx8 -nographic -kernel /home/sof/sof.git/build_imx8_gcc/src/arch/xtensa/sof-imx8.ri
qemu-system-xtensa: terminating on signal 15 from pid 16 (timeout)
Error: Process completed with exit code 1.
To Reproduce
for new sofqemu docker image : thesofproject/sofqemu:20210511_2
for stable sofqemu docker image : thesofproject/sofqemu:20200422
As I restored back to known stable image, need to use new image to reproduce the problem.
# Use latest sof doker image as this image is great
docker pull thesofproject/sof
docer tag thesofproject/sof sof
# build SOF FWs...
# Use the problematic sofqemu image instead of latest
docker pull thesofproject/sofqemu:20210511_2
docker tag thesofproject/sofqemu:20210511_2 sofqemu
cd SOF_BUILD_ROOT
./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh imx8
@fredoh9 to save some time extracting them from https://github.com/thesofproject/sof/blob/main/.github/workflows/pull-request.yml and since you just been through them, would you mind adding some reproduction steps to the description, especially the docker commands to switch to the newer image? I mean just from memory, I mean they don't have to be perfectly tested.
Not everyone is familiar with docker and most docker commands take a long time.
This is my first build of sofqemu image with my setup, last known build is more than year ago, I'm not sure this is any environment setup issue. Same recipe with previous ubuntu 18.04 also fails to me. I need to approach step by step. Need to focus the other task now, will resume later today.
After reading build logs, there was multiple complains saying flex and bison. But surprisingly this is not fatal errors. This is not the root-cause either but will be fixed.
make[1]: Leaving directory '/home/sof/qemu/slirp'
...
make[1]: flex: Command not found
DEP srcpos.c
BISON dtc-parser.tab.c
make[1]: bison: Command not found
LEX dtc-lexer.lex.c
make[1]: flex: Command not found
...
DEP util.c
LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
BISON dtc-parser.tab.c
make[1]: bison: Command not found
LEX dtc-lexer.lex.c
make[1]: flex: Command not found
CHK version_gen.h
LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
BISON dtc-parser.tab.c
make[1]: bison: Command not found
LEX dtc-lexer.lex.c
make[1]: flex: Command not found
...
GEN hw/core/trace.c
make[1]: Entering directory '/home/sof/qemu/slirp'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/sof/qemu/slirp'
CHK version_gen.h
LEX convert-dtsv0-lexer.lex.c
make[1]: flex: Command not found
BISON dtc-parser.tab.c
make[1]: bison: Command not found
LEX dtc-lexer.lex.c
make[1]: flex: Command not found
CC tests/qemu-iotests/socket_scm_helper.o
LINK tests/qemu-iotests/socket_scm_helper
Sorry, but I still don't get it how is failing on sof-4.2 (the branch we are using right now), but I see in CI that the tests are passed.
I think I'm missing something :(
We should not be spending time wondering about this, each Docker image should have a clear record of QEMU versions in itself. The other Docker image already has that, @fredoh9 added it in commit 9fc3833. Unfortunately the QEMU image does not have it yet.
There are two Docker images. You can still build the .ri file with the thesofproject/sof image, that image is irrelevant here.
The image that you must NOT use in order to test different qemu branches and versions is thesofproject/sofqemu sofqemu. Do not use the script ./scripts/docker-qemu.sh, invoke ./sof.git/scripts/qemu-check.sh directly. This requires cloning and building some specific qemu branch first.
Earlier you wrote:
The fix I did the other day was developed and tested with qemu/sof-v5.2.0
For that you did NOT use ./scripts/docker-qemu.sh, correct?
changed the title [-][BUG] IMX8 QEMU boot failed after sofqemu docker image upgrade[/-][+][BUG] IMX8 QEMU boot failed - qemu-check.sh regression after qemu commit f71c955 in sof-4.2 branch[/+]on Dec 6, 2022
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.
Activity
marc-hb commentedon May 13, 2021
@fredoh9 to save some time extracting them from https://github.com/thesofproject/sof/blob/main/.github/workflows/pull-request.yml and since you just been through them, would you mind adding some reproduction steps to the description, especially the docker commands to switch to the newer image? I mean just from memory, I mean they don't have to be perfectly tested.
Not everyone is familiar with docker and most docker commands take a long time.
cc: @greg-intel
fredoh9 commentedon May 13, 2021
This is my first build of sofqemu image with my setup, last known build is more than year ago, I'm not sure this is any environment setup issue. Same recipe with previous ubuntu 18.04 also fails to me. I need to approach step by step. Need to focus the other task now, will resume later today.
After reading build logs, there was multiple complains saying flex and bison. But surprisingly this is not fatal errors. This is not the root-cause either but will be fixed.
fredoh9 commentedon May 13, 2021
Good news and bad news.
Good news is I'm able to build my own thesofproject/sofqemu:20200422 and IMX QEMU test passes. So I don't have any setup/environment issue.
Bad news is there are about 25 commits after 20200422. I need to do git bisect. I will discuss with @lrgirdwo if I find 'bad' commit.
fredoh9 commentedon May 13, 2021
@lrgirdwo From qemu repo, this is 'bad' commit
f71c955 hw: mu: Add mu-write implementationfredoh9 commentedon May 14, 2021
@dbaluta for imx8, looks just return error silently, but imx8x and imx8m throw more logs.
imx8m_error.txt
imx8x_error.txt
dbaluta commentedon May 14, 2021
Thanks! I will have look.! @fredoh9 @marc-hb
7 remaining items
marc-hb commentedon Dec 5, 2022
@iuliana-prodan could you take a look at this? I see you just did #6713 in the same area
iuliana-prodan commentedon Dec 6, 2022
I don't quite understand what is the problem here? This seems like a very old bug :(
So, with Ubuntu 20.04 Docker image the qemu boot on imx8 is failing? Have I understood correctly?
For example, let's take a newer PR - by looking on the imx8 qemu boot, now this is passing: https://github.com/thesofproject/sof/actions/runs/3623119092/jobs/6108622229
and I see it's running on ubuntu 20.04:
Operating System
Ubuntu
20.04.5
LTS
So, can you please @marc-hb help me understand what should I investigate here?
Thanks!
cc: @fredoh9
marc-hb commentedon Dec 6, 2022
The problem is we cannot upgrade QEMU because IMX commit thesofproject/qemu@f71c955 broke the IMX tests.
Please ignore Docker: it's only the messenger. I mean literally: do NOT use Docker to reproduce, build and use this branch instead:
https://github.com/thesofproject/qemu/commits/sof-v4.2
The reason tests are passing now is because we're stuck and did not upgrade.
https://github.com/thesofproject/sof/blob/main/scripts/docker_build/sof_qemu/Dockerfile#L55
iuliana-prodan commentedon Dec 6, 2022
@marc-hb The fix I did the other day was developed and tested with qemu/sof-v5.2.0 and the imx8 boot tests were passing.
We are now using qemu/sof-4.2 - is this correct?
And we want to upgrade to qemu/sof-5.2?
I see that on sof-5.2 we don't have the commit thesofproject/qemu@f71c955.
If we want to upgrade, probably 2 is better?
Sorry, but I still don't get it how is failing on sof-4.2 (the branch we are using right now), but I see in CI that the tests are passed.
I think I'm missing something :(
marc-hb commentedon Dec 6, 2022
I believe CI is using a docker image with NOT THE LATEST sof-v4.2 qemu commit right now. @fredoh9 can you confirm? Hence this bug.
@iuliana-prodan can you test the latest sof-v4.2 QEMU commit? without Docker.
Maybe we should switch the docker image and CI to the sof-v5.2 qemu branch?
marc-hb commentedon Dec 6, 2022
We should not be spending time wondering about this, each Docker image should have a clear record of QEMU versions in itself. The other Docker image already has that, @fredoh9 added it in commit 9fc3833. Unfortunately the QEMU image does not have it yet.
iuliana-prodan commentedon Dec 6, 2022
How to run it without docker?
Here are the steps I'm following to test imx boot on qemu (these are taken from CI):
with: {fetch-depth: 0, submodules: recursive}
run: echo CONFIG_HAVE_AGENT=n > src/arch/xtensa/configs/override/no-agent.config
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
env:
PLATFORM: ${{ matrix.platform }}
run: ./scripts/docker-run.sh
./scripts/xtensa-build-all.sh -o no-agent -r ${PLATFORM}
run: docker pull thesofproject/sofqemu && docker tag thesofproject/sofqemu sofqemu
env:
PLATFORM: ${{ matrix.platform }}
run: ./scripts/docker-qemu.sh ../sof.git/scripts/qemu-check.sh ${PLATFORM}
So, on step 4, should I use a .ri image built locally, not on docker?
marc-hb commentedon Dec 6, 2022
There are two Docker images. You can still build the
.rifile with thethesofproject/sofimage, that image is irrelevant here.The image that you must NOT use in order to test different qemu branches and versions is
thesofproject/sofqemu sofqemu. Do not use the script./scripts/docker-qemu.sh, invoke./sof.git/scripts/qemu-check.shdirectly. This requires cloning and building some specific qemu branch first.Earlier you wrote:
For that you did NOT use
./scripts/docker-qemu.sh, correct?[-][BUG] IMX8 QEMU boot failed after sofqemu docker image upgrade[/-][+][BUG] IMX8 QEMU boot failed - qemu-check.sh regression after qemu commit f71c955 in sof-4.2 branch[/+]iuliana-prodan commentedon Dec 7, 2022
I reproduced the issue on qemu/sof-v4.2.
With commit thesofproject/qemu@f71c955 I'm getting:
Without commit thesofproject/qemu@f71c955 the boot test is passing:
I'll add this bug on my todo list and I'll look into it.
marc-hb commentedon Apr 24, 2023
@iuliana-prodan any news?
marc-hb commentedon Sep 7, 2023
@iuliana-prodan , ping?
github-actions commentedon Jun 19, 2025
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.