[PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross

Alex Bennée posted 7 patches 1 month, 1 week ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
[PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Alex Bennée 1 month, 1 week ago
This allows the gdb integration tests to be run as well.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
 tests/lcitool/refresh                                 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
index b73776d95b5..287770a995a 100644
--- a/tests/docker/dockerfiles/debian-all-test-cross.docker
+++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
@@ -59,6 +59,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
   apt install -y --no-install-recommends \
   clang\
   dpkg-dev\
+  gdb-multiarch\
   libclang-rt-dev
 ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \
   libc6-dev-arm64-cross \
diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
index 3e4b026035b..259e6ea0729 100755
--- a/tests/lcitool/refresh
+++ b/tests/lcitool/refresh
@@ -167,6 +167,7 @@ debian_all_test_cross_compilers = [
     "  apt install -y --no-install-recommends \\\n",
     "  clang\\\n",
     "  dpkg-dev\\\n",
+    "  gdb-multiarch\\\n",
     "  libclang-rt-dev\n",
     "ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \\\n",
     "  libc6-dev-arm64-cross \\\n",
-- 
2.47.3


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On 6/3/26 17:17, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
> On 6/3/26 17:17, Alex Bennée wrote:
>> This allows the gdb integration tests to be run as well.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>   tests/lcitool/refresh                                 | 1 +
>>   2 files changed, 2 insertions(+)
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

I'm getting:

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x45001fff
Error occurred in Python: Cannot access memory at address 0x45001fff
qemu-hppa: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
qemu-hppa: QEMU: Terminated via GDBstub
warning: Could not load shared library symbols for linux-vdso32.so.1.
Do you need "set solib-search-path" or "set sysroot"?
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-hppa-linux-user] Error 2


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Pierrick Bouvier 1 month ago
On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>> On 6/3/26 17:17, Alex Bennée wrote:
>>> This allows the gdb integration tests to be run as well.
>>>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>> ---
>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>    tests/lcitool/refresh                                 | 1 +
>>>    2 files changed, 2 insertions(+)
>>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
> I'm getting:
> 
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x45001fff
> Error occurred in Python: Cannot access memory at address 0x45001fff
> qemu-hppa: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> qemu-hppa: QEMU: Terminated via GDBstub
> warning: Could not load shared library symbols for linux-vdso32.so.1.
> Do you need "set solib-search-path" or "set sysroot"?
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-hppa-linux-user] Error 2
> 

To add more information, we tested it on GitHub, our machines and 
GitLab, and for an unknown reason, it only fails on GitLab runners.

Which is unfortunate since it is where QEMU run its CI.

Regards,
Pierrick

Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On 11/3/26 00:22, Pierrick Bouvier wrote:
> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>> This allows the gdb integration tests to be run as well.
>>>>
>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>> ---
>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>    tests/lcitool/refresh                                 | 1 +
>>>>    2 files changed, 2 insertions(+)
>>>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>
>> I'm getting:
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x45001fff
>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> qemu-hppa: QEMU: Terminated via GDBstub
>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>> Do you need "set solib-search-path" or "set sysroot"?
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-hppa-linux-user] Error 2
>>
> 
> To add more information, we tested it on GitHub, our machines and 
> GitLab, and for an unknown reason, it only fails on GitLab runners.

Also we tested on our local Linux machines, where this test pass
for all our targets ;)

> 
> Which is unfortunate since it is where QEMU run its CI.
> 
> Regards,
> Pierrick


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Ilya Leoshkevich 1 month ago
On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
> On 11/3/26 00:22, Pierrick Bouvier wrote:
>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>> This allows the gdb integration tests to be run as well.
>>>>>
>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>> ---
>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>    tests/lcitool/refresh                                 | 1 +
>>>>>    2 files changed, 2 insertions(+)
>>>>
>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>
>>> I'm getting:
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x45001fff
>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make[1]: *** Waiting for unfinished jobs....
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>> Do you need "set solib-search-path" or "set sysroot"?
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-hppa-linux-user] Error 2
>>>
>>
>> To add more information, we tested it on GitHub, our machines and 
>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>
> Also we tested on our local Linux machines, where this test pass
> for all our targets ;)
>
>>
>> Which is unfortunate since it is where QEMU run its CI.
>>
>> Regards,
>> Pierrick
>
FWIW it passes on my laptop as well.

Does this test fail only for hppa, or for other architectures as well?

I'm asking because it may have something to do with /proc/self/mem or 
with the architecture.


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On 12/3/26 11:11, Ilya Leoshkevich wrote:
> 
> On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>> On 11/3/26 00:22, Pierrick Bouvier wrote:
>>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>>> This allows the gdb integration tests to be run as well.
>>>>>>
>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>> ---
>>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>>    tests/lcitool/refresh                                 | 1 +
>>>>>>    2 files changed, 2 insertions(+)
>>>>>
>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>
>>>> I'm getting:
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x45001fff
>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>>> Do you need "set solib-search-path" or "set sysroot"?
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>
>>>
>>> To add more information, we tested it on GitHub, our machines and 
>>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>>
>> Also we tested on our local Linux machines, where this test pass
>> for all our targets ;)
>>
>>>
>>> Which is unfortunate since it is where QEMU run its CI.
>>>
>>> Regards,
>>> Pierrick
>>
> FWIW it passes on my laptop as well.
> 
> Does this test fail only for hppa, or for other architectures as well?

Have a look at these job failures:
https://gitlab.com/philmd/qemu/-/pipelines/2376819801

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x7e085b4b1fff
Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
qemu-aarch64: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-aarch64-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x40802fff
Error occurred in Python: Cannot access memory at address 0x40802fff
qemu-arm: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-arm-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x45001fff
Error occurred in Python: Cannot access memory at address 0x45001fff
qemu-hppa: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make[1]: *** Waiting for unfinished jobs....
qemu-hppa: QEMU: Terminated via GDBstub
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-hppa-linux-user] Error 2

Python Exception <class 'gdb.MemoryError'>: Cannot access memory at 
address 0x7d742025efff
Error occurred in Python: Cannot access memory at address 0x7d742025efff
qemu-alpha: QEMU: Terminated via GDBstub
make[1]: *** 
[/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121: 
run-gdbstub-prot-none] Error 1
make: *** [/builds/philmd/qemu/tests/Makefile.include:66: 
run-tcg-tests-alpha-linux-user] Error 2

So at least Alpha / ARM / Aarch64 / HPPA.

(I haven't checked whether the test is run for other targets).

We also run these on GitHub runners where the tests pass, and apparently
when running on k8s private runner on GitLab they also pass. The problem
is with public runner on GitLab.

> I'm asking because it may have something to do with /proc/self/mem or 
> with the architecture.
> 


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Philippe Mathieu-Daudé 1 month ago
On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> On 12/3/26 11:11, Ilya Leoshkevich wrote:
> >
> > On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
> >> On 11/3/26 00:22, Pierrick Bouvier wrote:
> >>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
> >>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
> >>>>> On 6/3/26 17:17, Alex Bennée wrote:
> >>>>>> This allows the gdb integration tests to be run as well.
> >>>>>>
> >>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> >>>>>> ---
> >>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
> >>>>>>    tests/lcitool/refresh                                 | 1 +
> >>>>>>    2 files changed, 2 insertions(+)
> >>>>>
> >>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> >>>>
> >>>> I'm getting:
> >>>>
> >>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> >>>> address 0x45001fff
> >>>> Error occurred in Python: Cannot access memory at address 0x45001fff
> >>>> qemu-hppa: QEMU: Terminated via GDBstub
> >>>> make[1]: ***
> >>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> >>>> run-gdbstub-prot-none] Error 1
> >>>> make[1]: *** Waiting for unfinished jobs....
> >>>> qemu-hppa: QEMU: Terminated via GDBstub
> >>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
> >>>> Do you need "set solib-search-path" or "set sysroot"?
> >>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> >>>> run-tcg-tests-hppa-linux-user] Error 2
> >>>>
> >>>
> >>> To add more information, we tested it on GitHub, our machines and
> >>> GitLab, and for an unknown reason, it only fails on GitLab runners.
> >>
> >> Also we tested on our local Linux machines, where this test pass
> >> for all our targets ;)
> >>
> >>>
> >>> Which is unfortunate since it is where QEMU run its CI.
> >>>
> >>> Regards,
> >>> Pierrick
> >>
> > FWIW it passes on my laptop as well.
> >
> > Does this test fail only for hppa, or for other architectures as well?
>
> Have a look at these job failures:
> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x7e085b4b1fff
> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
> qemu-aarch64: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-aarch64-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x40802fff
> Error occurred in Python: Cannot access memory at address 0x40802fff
> qemu-arm: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-arm-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x45001fff
> Error occurred in Python: Cannot access memory at address 0x45001fff
> qemu-hppa: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make[1]: *** Waiting for unfinished jobs....
> qemu-hppa: QEMU: Terminated via GDBstub
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-hppa-linux-user] Error 2
>
> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
> address 0x7d742025efff
> Error occurred in Python: Cannot access memory at address 0x7d742025efff
> qemu-alpha: QEMU: Terminated via GDBstub
> make[1]: ***
> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
> run-gdbstub-prot-none] Error 1
> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
> run-tcg-tests-alpha-linux-user] Error 2
>
> So at least Alpha / ARM / Aarch64 / HPPA.
>
> (I haven't checked whether the test is run for other targets).
>
> We also run these on GitHub runners where the tests pass, and apparently
> when running on k8s private runner on GitLab they also pass. The problem
> is with public runner on GitLab.

Also another test we ran was to pull GitLab docker image and run the same
tests locally within that GitLab-generated image and they passed. So we
believe the issue is related to some container restriction with GitLab.

>
> > I'm asking because it may have something to do with /proc/self/mem or
> > with the architecture.
> >
>
Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Alex Bennée 1 month ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> On 12/3/26 11:11, Ilya Leoshkevich wrote:
>> >
>> > On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>> >> On 11/3/26 00:22, Pierrick Bouvier wrote:
>> >>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>> >>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>> >>>>> On 6/3/26 17:17, Alex Bennée wrote:
>> >>>>>> This allows the gdb integration tests to be run as well.
>> >>>>>>
>> >>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> >>>>>> ---
>> >>>>>>    tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>> >>>>>>    tests/lcitool/refresh                                 | 1 +
>> >>>>>>    2 files changed, 2 insertions(+)
>> >>>>>
>> >>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> >>>>
>> >>>> I'm getting:
>> >>>>
>> >>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> >>>> address 0x45001fff
>> >>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> >>>> qemu-hppa: QEMU: Terminated via GDBstub
>> >>>> make[1]: ***
>> >>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> >>>> run-gdbstub-prot-none] Error 1
>> >>>> make[1]: *** Waiting for unfinished jobs....
>> >>>> qemu-hppa: QEMU: Terminated via GDBstub
>> >>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>> >>>> Do you need "set solib-search-path" or "set sysroot"?
>> >>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> >>>> run-tcg-tests-hppa-linux-user] Error 2
>> >>>>
>> >>>
>> >>> To add more information, we tested it on GitHub, our machines and
>> >>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>> >>
>> >> Also we tested on our local Linux machines, where this test pass
>> >> for all our targets ;)
>> >>
>> >>>
>> >>> Which is unfortunate since it is where QEMU run its CI.
>> >>>
>> >>> Regards,
>> >>> Pierrick
>> >>
>> > FWIW it passes on my laptop as well.
>> >
>> > Does this test fail only for hppa, or for other architectures as well?
>>
>> Have a look at these job failures:
>> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x7e085b4b1fff
>> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
>> qemu-aarch64: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-aarch64-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x40802fff
>> Error occurred in Python: Cannot access memory at address 0x40802fff
>> qemu-arm: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-arm-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x45001fff
>> Error occurred in Python: Cannot access memory at address 0x45001fff
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make[1]: *** Waiting for unfinished jobs....
>> qemu-hppa: QEMU: Terminated via GDBstub
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-hppa-linux-user] Error 2
>>
>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>> address 0x7d742025efff
>> Error occurred in Python: Cannot access memory at address 0x7d742025efff
>> qemu-alpha: QEMU: Terminated via GDBstub
>> make[1]: ***
>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>> run-gdbstub-prot-none] Error 1
>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>> run-tcg-tests-alpha-linux-user] Error 2
>>
>> So at least Alpha / ARM / Aarch64 / HPPA.
>>
>> (I haven't checked whether the test is run for other targets).
>>
>> We also run these on GitHub runners where the tests pass, and apparently
>> when running on k8s private runner on GitLab they also pass. The problem
>> is with public runner on GitLab.
>
> Also another test we ran was to pull GitLab docker image and run the same
> tests locally within that GitLab-generated image and they passed. So we
> believe the issue is related to some container restriction with
> GitLab.

Most likely because the ptrace settings are tighter - ptrace is the
mechanism we use to access the memory we can't normally.

>
>>
>> > I'm asking because it may have something to do with /proc/self/mem or
>> > with the architecture.
>> >
>>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Ilya Leoshkevich 1 month ago
On 3/12/26 14:56, Alex Bennée wrote:
> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>
>> On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>> On 12/3/26 11:11, Ilya Leoshkevich wrote:
>>>> On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>>>>> On 11/3/26 00:22, Pierrick Bouvier wrote:
>>>>>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>>>>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>>>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>>>>>> This allows the gdb integration tests to be run as well.
>>>>>>>>>
>>>>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>>>>> ---
>>>>>>>>>     tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>>>>>     tests/lcitool/refresh                                 | 1 +
>>>>>>>>>     2 files changed, 2 insertions(+)
>>>>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>>>> I'm getting:
>>>>>>>
>>>>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>>>>> address 0x45001fff
>>>>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>> make[1]: ***
>>>>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>>>>> run-gdbstub-prot-none] Error 1
>>>>>>> make[1]: *** Waiting for unfinished jobs....
>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>>>>>> Do you need "set solib-search-path" or "set sysroot"?
>>>>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>>>>
>>>>>> To add more information, we tested it on GitHub, our machines and
>>>>>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>>>>> Also we tested on our local Linux machines, where this test pass
>>>>> for all our targets ;)
>>>>>
>>>>>> Which is unfortunate since it is where QEMU run its CI.
>>>>>>
>>>>>> Regards,
>>>>>> Pierrick
>>>> FWIW it passes on my laptop as well.
>>>>
>>>> Does this test fail only for hppa, or for other architectures as well?
>>> Have a look at these job failures:
>>> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x7e085b4b1fff
>>> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
>>> qemu-aarch64: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-aarch64-linux-user] Error 2
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x40802fff
>>> Error occurred in Python: Cannot access memory at address 0x40802fff
>>> qemu-arm: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make[1]: *** Waiting for unfinished jobs....
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-arm-linux-user] Error 2
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x45001fff
>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make[1]: *** Waiting for unfinished jobs....
>>> qemu-hppa: QEMU: Terminated via GDBstub
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-hppa-linux-user] Error 2
>>>
>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>> address 0x7d742025efff
>>> Error occurred in Python: Cannot access memory at address 0x7d742025efff
>>> qemu-alpha: QEMU: Terminated via GDBstub
>>> make[1]: ***
>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>> run-gdbstub-prot-none] Error 1
>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>> run-tcg-tests-alpha-linux-user] Error 2
>>>
>>> So at least Alpha / ARM / Aarch64 / HPPA.
>>>
>>> (I haven't checked whether the test is run for other targets).
>>>
>>> We also run these on GitHub runners where the tests pass, and apparently
>>> when running on k8s private runner on GitLab they also pass. The problem
>>> is with public runner on GitLab.
>> Also another test we ran was to pull GitLab docker image and run the same
>> tests locally within that GitLab-generated image and they passed. So we
>> believe the issue is related to some container restriction with
>> GitLab.
> Most likely because the ptrace settings are tighter - ptrace is the
> mechanism we use to access the memory we can't normally.


I thought about this, but then probe_proc_self_mem() that guards the 
test would fail.

I don't think cpu_memory_rw_debug() does anything in addition to what we 
probe for.


[...]


Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Alex Bennée 1 month ago
Ilya Leoshkevich <iii@linux.ibm.com> writes:

> On 3/12/26 14:56, Alex Bennée wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>>
>>> On Thu, 12 Mar 2026 at 11:39, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>>> On 12/3/26 11:11, Ilya Leoshkevich wrote:
>>>>> On 3/11/26 00:28, Philippe Mathieu-Daudé wrote:
>>>>>> On 11/3/26 00:22, Pierrick Bouvier wrote:
>>>>>>> On 3/10/26 4:07 PM, Philippe Mathieu-Daudé wrote:
>>>>>>>> On 10/3/26 23:33, Philippe Mathieu-Daudé wrote:
>>>>>>>>> On 6/3/26 17:17, Alex Bennée wrote:
>>>>>>>>>> This allows the gdb integration tests to be run as well.
>>>>>>>>>>
>>>>>>>>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>>>>>>>> ---
>>>>>>>>>>     tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>>>>>>>>>>     tests/lcitool/refresh                                 | 1 +
>>>>>>>>>>     2 files changed, 2 insertions(+)
>>>>>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>>>>>>> I'm getting:
>>>>>>>>
>>>>>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>>>>>> address 0x45001fff
>>>>>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>>> make[1]: ***
>>>>>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>>>>>> run-gdbstub-prot-none] Error 1
>>>>>>>> make[1]: *** Waiting for unfinished jobs....
>>>>>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>>>>>> warning: Could not load shared library symbols for linux-vdso32.so.1.
>>>>>>>> Do you need "set solib-search-path" or "set sysroot"?
>>>>>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>>>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>>>>>
>>>>>>> To add more information, we tested it on GitHub, our machines and
>>>>>>> GitLab, and for an unknown reason, it only fails on GitLab runners.
>>>>>> Also we tested on our local Linux machines, where this test pass
>>>>>> for all our targets ;)
>>>>>>
>>>>>>> Which is unfortunate since it is where QEMU run its CI.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Pierrick
>>>>> FWIW it passes on my laptop as well.
>>>>>
>>>>> Does this test fail only for hppa, or for other architectures as well?
>>>> Have a look at these job failures:
>>>> https://gitlab.com/philmd/qemu/-/pipelines/2376819801
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x7e085b4b1fff
>>>> Error occurred in Python: Cannot access memory at address 0x7e085b4b1fff
>>>> qemu-aarch64: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-aarch64-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x40802fff
>>>> Error occurred in Python: Cannot access memory at address 0x40802fff
>>>> qemu-arm: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-arm-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x45001fff
>>>> Error occurred in Python: Cannot access memory at address 0x45001fff
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make[1]: *** Waiting for unfinished jobs....
>>>> qemu-hppa: QEMU: Terminated via GDBstub
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-hppa-linux-user] Error 2
>>>>
>>>> Python Exception <class 'gdb.MemoryError'>: Cannot access memory at
>>>> address 0x7d742025efff
>>>> Error occurred in Python: Cannot access memory at address 0x7d742025efff
>>>> qemu-alpha: QEMU: Terminated via GDBstub
>>>> make[1]: ***
>>>> [/builds/philmd/qemu/tests/tcg/multiarch/Makefile.target:121:
>>>> run-gdbstub-prot-none] Error 1
>>>> make: *** [/builds/philmd/qemu/tests/Makefile.include:66:
>>>> run-tcg-tests-alpha-linux-user] Error 2
>>>>
>>>> So at least Alpha / ARM / Aarch64 / HPPA.
>>>>
>>>> (I haven't checked whether the test is run for other targets).
>>>>
>>>> We also run these on GitHub runners where the tests pass, and apparently
>>>> when running on k8s private runner on GitLab they also pass. The problem
>>>> is with public runner on GitLab.
>>> Also another test we ran was to pull GitLab docker image and run the same
>>> tests locally within that GitLab-generated image and they passed. So we
>>> believe the issue is related to some container restriction with
>>> GitLab.
>> Most likely because the ptrace settings are tighter - ptrace is the
>> mechanism we use to access the memory we can't normally.
>
>
> I thought about this, but then probe_proc_self_mem() that guards the
> test would fail.
>
> I don't think cpu_memory_rw_debug() does anything in addition to what
> we probe for.

The probe only checks for read access. Could there be a difference
between read and write?
>
>
> [...]

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro
Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Pierrick Bouvier 1 month, 1 week ago
On 3/6/26 8:17 AM, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)
> 
> diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/docker/dockerfiles/debian-all-test-cross.docker
> index b73776d95b5..287770a995a 100644
> --- a/tests/docker/dockerfiles/debian-all-test-cross.docker
> +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker
> @@ -59,6 +59,7 @@ RUN DEBIAN_FRONTEND=noninteractive eatmydata \
>     apt install -y --no-install-recommends \
>     clang\
>     dpkg-dev\
> +  gdb-multiarch\
>     libclang-rt-dev
>   ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \
>     libc6-dev-arm64-cross \
> diff --git a/tests/lcitool/refresh b/tests/lcitool/refresh
> index 3e4b026035b..259e6ea0729 100755
> --- a/tests/lcitool/refresh
> +++ b/tests/lcitool/refresh
> @@ -167,6 +167,7 @@ debian_all_test_cross_compilers = [
>       "  apt install -y --no-install-recommends \\\n",
>       "  clang\\\n",
>       "  dpkg-dev\\\n",
> +    "  gdb-multiarch\\\n",
>       "  libclang-rt-dev\n",
>       "ENV AVAILABLE_COMPILERS gcc-aarch64-linux-gnu \\\n",
>       "  libc6-dev-arm64-cross \\\n",

As long as ppc gdbstub is not fixed or Philippe series reverted, you'll 
need also:

diff --git a/tests/tcg/multiarch/Makefile.target 
b/tests/tcg/multiarch/Makefile.target
index a347efbadf0..b6209ee082d 100644
--- a/tests/tcg/multiarch/Makefile.target
+++ b/tests/tcg/multiarch/Makefile.target
@@ -156,12 +156,16 @@ else
  run-gdbstub-%:
         $(call skip-test, "gdbstub test $*", "need working gdb with 
$(patsubst -%,,$(TARGET_NAME)) support")
  endif
+
+# gdbstub broken on ppc
+ifneq ($(TARGET_NAME), ppc)
  EXTRA_RUNS += run-gdbstub-sha1 run-gdbstub-qxfer-auxv-read \
               run-gdbstub-proc-mappings run-gdbstub-thread-breakpoint \
               run-gdbstub-registers run-gdbstub-prot-none \
               run-gdbstub-catch-syscalls 
run-gdbstub-follow-fork-mode-child \
               run-gdbstub-follow-fork-mode-parent \
               run-gdbstub-qxfer-siginfo-read run-gdbstub-late-attach
+endif

  # ARM Compatible Semi Hosting Tests
  #

Re: [PATCH 1/7] tests/docker: add gdb-multiarch to all-test-cross
Posted by Pierrick Bouvier 1 month, 1 week ago
On 3/6/26 8:17 AM, Alex Bennée wrote:
> This allows the gdb integration tests to be run as well.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   tests/docker/dockerfiles/debian-all-test-cross.docker | 1 +
>   tests/lcitool/refresh                                 | 1 +
>   2 files changed, 2 insertions(+)
> 

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>