qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Bug 1921092] [NEW] qemu-system-arm multi core debug not working
@ 2021-03-24 10:25 Martin Schönstedt
  2021-03-24 10:45 ` [Bug 1921092] " Martin Schönstedt
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-03-24 10:25 UTC (permalink / raw)
  To: qemu-devel

Public bug reported:

Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
Trying to debug with options -s -S the second core fails to boot.
Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635

** Affects: qemu
     Importance: Undecided
         Status: New


** Tags: arm debug

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  qemu-system-arm multi core debug not working

Status in QEMU:
  New

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.
  Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: qemu-system-arm multi core debug not working
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
@ 2021-03-24 10:45 ` Martin Schönstedt
  2021-03-24 14:52 ` Martin Schönstedt
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-03-24 10:45 UTC (permalink / raw)
  To: qemu-devel

** Description changed:

  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.
  Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635
+ 
+ only after closing the gdb server the second core boots and execution continues normally.
+ Is there no way to debug such a multi core environment?

** Description changed:

  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.
  Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635
  
- only after closing the gdb server the second core boots and execution continues normally.
+ only after quitting the debugging session the second core boots and execution continues normally.
  Is there no way to debug such a multi core environment?

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  qemu-system-arm multi core debug not working

Status in QEMU:
  New

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.
  Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635

  only after quitting the debugging session the second core boots and execution continues normally.
  Is there no way to debug such a multi core environment?

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: qemu-system-arm multi core debug not working
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
  2021-03-24 10:45 ` [Bug 1921092] " Martin Schönstedt
@ 2021-03-24 14:52 ` Martin Schönstedt
  2021-03-24 16:08 ` [Bug 1921092] Re: how do i delete this bug? Peter Maydell
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-03-24 14:52 UTC (permalink / raw)
  To: qemu-devel

there was no bug, it was my fault. How do I delete this

** Changed in: qemu
       Status: New => Invalid

** Summary changed:

- qemu-system-arm multi core debug not working
+ how do i delete this bug?

** Description changed:

- Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
- Trying to debug with options -s -S the second core fails to boot.
- Posted with explanation also at: https://github.com/zephyrproject-rtos/zephyr/issues/33635
- 
- only after quitting the debugging session the second core boots and execution continues normally.
- Is there no way to debug such a multi core environment?
+ no bugs here

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  how do i delete this bug?

Status in QEMU:
  Invalid

Bug description:
  no bugs here

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: how do i delete this bug?
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
  2021-03-24 10:45 ` [Bug 1921092] " Martin Schönstedt
  2021-03-24 14:52 ` Martin Schönstedt
@ 2021-03-24 16:08 ` Peter Maydell
  2021-03-24 21:37 ` [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing Martin Schönstedt
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2021-03-24 16:08 UTC (permalink / raw)
  To: qemu-devel

In general, you don't need to delete bugs that turn out to be user
error, or edit the description/title; just mark them as 'invalid',
perhaps with a comment about what turned out to be the cause. That
leaves the trail of what was going on for future readers who might be
going down the same path as you.

There are actually a couple of things we should do here in upstream
QEMU:

* we should document the process for using the debugstub with multi-cluster board models like the mps2-an521
* we should check whether we are doing the right/most appropriate thing when the user connects to the debug stub and is only attaching to one 'inferior' -- it sounds from your report like the un-attached inferior is left permanently in the 'stopped' state. Maybe that's what the gdb protocol requires, but it seems a bit unhelpful.

I'm going to update the bug status/text accordingly.


** Summary changed:

- how do i delete this bug?
+ gdbstub debug of multi-cluster machines is undocumented and confusing

** Changed in: qemu
       Status: Invalid => Confirmed

** Description changed:

- no bugs here
+ Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
+ Trying to debug with options -s -S the second core fails to boot.
+ 
+ Posted with explanation also at: https://github.com/zephyrproject-
+ rtos/zephyr/issues/33635

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Confirmed

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (2 preceding siblings ...)
  2021-03-24 16:08 ` [Bug 1921092] Re: how do i delete this bug? Peter Maydell
@ 2021-03-24 21:37 ` Martin Schönstedt
  2021-03-25 16:46 ` Peter Maydell
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-03-24 21:37 UTC (permalink / raw)
  To: qemu-devel

Thanks for the answer,

indeed the second cluster of the board has been halted when I was
starting gdb the "normal" way - not adding the second inferior. In my
own research I did not find out about these inferiors, so I was
wondering why "info threads" did only show one cpu. Maybe gdb could
inform the user about unattached inferiors when using "info threads"

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Confirmed

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (3 preceding siblings ...)
  2021-03-24 21:37 ` [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing Martin Schönstedt
@ 2021-03-25 16:46 ` Peter Maydell
  2021-03-25 18:00 ` Martin Schönstedt
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2021-03-25 16:46 UTC (permalink / raw)
  To: qemu-devel

Could you provide an example QEMU command line and guest image file
which you were having this problem with, please? That would save me
figuring out how to build zephyr binaries :-)

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Confirmed

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (4 preceding siblings ...)
  2021-03-25 16:46 ` Peter Maydell
@ 2021-03-25 18:00 ` Martin Schönstedt
  2021-04-08 13:37 ` Peter Maydell
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-03-25 18:00 UTC (permalink / raw)
  To: qemu-devel

qemu-system-arm -cpu cortex-m33 -machine mps2-an521 -nographic -m 16
-vga none -net none -chardev stdio,id=con,mux=on -serial chardev:con
-mon chardev=con,mode=readline -icount shift=7,align=off,sleep=off -rtc
clock=vm -device loader,file=<remote_dir>/zephyr.elf -s -S -kernel
<master_dir>/zephyr.elf

i've included both .elf files in a zip. That should be enough for
running the sample

** Attachment added: "zephyr_sample.zip"
   https://bugs.launchpad.net/qemu/+bug/1921092/+attachment/5480969/+files/zephyr_sample.zip

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Confirmed

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (5 preceding siblings ...)
  2021-03-25 18:00 ` Martin Schönstedt
@ 2021-04-08 13:37 ` Peter Maydell
  2021-05-14 19:04 ` Thomas Huth
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: Peter Maydell @ 2021-04-08 13:37 UTC (permalink / raw)
  To: qemu-devel

There's now a new docs section on debugging multicore (including multi-
cluster) machines:

https://qemu-project.gitlab.io/qemu/system/gdb.html#debugging-multicore-
machines

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Confirmed

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (6 preceding siblings ...)
  2021-04-08 13:37 ` Peter Maydell
@ 2021-05-14 19:04 ` Thomas Huth
  2021-05-14 22:32 ` Martin Schönstedt
  2021-05-15  9:18 ` Thomas Huth
  9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-05-14 19:04 UTC (permalink / raw)
  To: qemu-devel

Is there still anything to do here or could we close the ticket now?

** Changed in: qemu
       Status: Confirmed => Incomplete

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Incomplete

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (7 preceding siblings ...)
  2021-05-14 19:04 ` Thomas Huth
@ 2021-05-14 22:32 ` Martin Schönstedt
  2021-05-15  9:18 ` Thomas Huth
  9 siblings, 0 replies; 11+ messages in thread
From: Martin Schönstedt @ 2021-05-14 22:32 UTC (permalink / raw)
  To: qemu-devel

It can be closed. The added documentation is very helpful.

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Incomplete

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing
  2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
                   ` (8 preceding siblings ...)
  2021-05-14 22:32 ` Martin Schönstedt
@ 2021-05-15  9:18 ` Thomas Huth
  9 siblings, 0 replies; 11+ messages in thread
From: Thomas Huth @ 2021-05-15  9:18 UTC (permalink / raw)
  To: qemu-devel

Ok, thanks, so I'm closing this ticket now.

** Changed in: qemu
       Status: Incomplete => Fix Released

-- 
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1921092

Title:
  gdbstub debug of multi-cluster machines is undocumented and confusing

Status in QEMU:
  Fix Released

Bug description:
  Working with Zephyr RTOS, running a multi core sample on mps2_an521 works fine. Both cpus start.
  Trying to debug with options -s -S the second core fails to boot.

  Posted with explanation also at: https://github.com/zephyrproject-
  rtos/zephyr/issues/33635

To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1921092/+subscriptions


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-05-15  9:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 10:25 [Bug 1921092] [NEW] qemu-system-arm multi core debug not working Martin Schönstedt
2021-03-24 10:45 ` [Bug 1921092] " Martin Schönstedt
2021-03-24 14:52 ` Martin Schönstedt
2021-03-24 16:08 ` [Bug 1921092] Re: how do i delete this bug? Peter Maydell
2021-03-24 21:37 ` [Bug 1921092] Re: gdbstub debug of multi-cluster machines is undocumented and confusing Martin Schönstedt
2021-03-25 16:46 ` Peter Maydell
2021-03-25 18:00 ` Martin Schönstedt
2021-04-08 13:37 ` Peter Maydell
2021-05-14 19:04 ` Thomas Huth
2021-05-14 22:32 ` Martin Schönstedt
2021-05-15  9:18 ` Thomas Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).