Potential SIS or RTEMS/libbsd problem
Jiri Gaisler
jiri at gaisler.se
Wed May 22 07:39:54 UTC 2019
On 5/22/19 8:03 AM, Sebastian Huber wrote:
> Hello,
>
> in the libbsd there is a test for the Epoch Based Reclamation:
>
> https://git.rtems.org/rtems-libbsd/tree/testsuite/epoch01/test_main.c
>
> When I run this test using the leon3 BSP on real hardware (150MHz NGMP FP) the test completes successfully.
>
> If I run the test on the SIS, it is stuck at some point (using "-m 1" works):
>
> sparc-rtems5-sis -leon3 -nouartrx -r -tlim 200 s -m 2 build/sparc-rtems5-leon3-everything/epoch01.exe
>
>
This test needs a shorter time-slice in the simulator to succeed (-d option). The more cpus, the lower number of clocks in the slice is needed. Through trial-and-error, these values seem to work:
2 CPUs: -m 2 -d 25
3 CPUs: -m 3 -d 10
4 CPUs will not work, even if -d 1 is set. This is most likely a simulator problem, I will try to find time to look at it in more detail. A quick trace shows that all CPUs are stuck in a loop checking for a lock or similar:
$ ./sis -leon3 ~/epoch01.exe -m 4 -d 1
SIS - SPARC/RISCV instruction simulator 2.14, copyright Jiri Gaisler 2019
Bug-reports to jiri at gaisler.se
LEON3 emulation enabled, 4 cpus online, delta 1 clocks
Loaded /home/jiri/epoch01.exe, entry 0x40000000
cpu0> run
Waking CPU 1
Waking CPU 2
Waking CPU 3
*** LIBBSD EPOCH 1 TEST ***
nexus0: <RTEMS Nexus device>
<TestEpoch01>
<EnterExit activeWorker="1">
<Counter worker="0">74357</Counter>
</EnterExit>
<EnterExit activeWorker="2">
<Counter worker="0">74464</Counter>
<Counter worker="1">59621</Counter>
</EnterExit>
<EnterExit activeWorker="3">
<Counter worker="0">74353</Counter>
<Counter worker="1">59529</Counter>
<Counter worker="2">74710</Counter>
</EnterExit>
<EnterExit activeWorker="4">
<Counter worker="0">74221</Counter>
<Counter worker="1">66362</Counter>
<Counter worker="2">74605</Counter>
<Counter worker="3">74605</Counter>
</EnterExit>
<EnterListOpExit activeWorker="1">
<Counter worker="0">53231</Counter>
<Removals worker="0">82</Removals>
</EnterListOpExit>
<EnterListOpExit activeWorker="2">
<Counter worker="0">51659</Counter>
<Counter worker="1">51862</Counter>
<Removals worker="0">42</Removals>
<Removals worker="1">42</Removals>
</EnterListOpExit>
<EnterListOpExit activeWorker="3">
<Counter worker="0">50492</Counter>
<Counter worker="1">46310</Counter>
<Counter worker="2">51516</Counter>
<Removals worker="0">25</Removals>
<Removals worker="1">24</Removals>
<Removals worker="2">24</Removals>
</EnterListOpExit>
<EnterListOpExit activeWorker="4">
<Counter worker="0">46105</Counter>
<Counter worker="1">41697</Counter>
<Counter worker="2">46499</Counter>
<Counter worker="3">46515</Counter>
<Removals worker="0">19</Removals>
<Removals worker="1">18</Removals>
<Removals worker="2">18</Removals>
<Removals worker="3">18</Removals>
</EnterListOpExit>
<EnterExitPreempt activeWorker="1">
<Counter worker="0">29273</Counter>
</EnterExitPreempt>
<EnterExitPreempt activeWorker="2">
<Counter worker="0">29262</Counter>
<Counter worker="1">37024</Counter>
</EnterExitPreempt>
<EnterExitPreempt activeWorker="3">
<Counter worker="0">32622</Counter>
<Counter worker="1">36973</Counter>
<Counter worker="2">36973</Counter>
</EnterExitPreempt>
<EnterExitPreempt activeWorker="4">
<Counter worker="0">29126</Counter>
<Counter worker="1">36917</Counter>
<Counter worker="2">36917</Counter>
<Counter worker="3">36918</Counter>
</EnterExitPreempt>
<EnterListOpExitPreempt activeWorker="1">
<Counter worker="0">27539</Counter>
<Removals worker="0">61</Removals>
</EnterListOpExitPreempt>
Interrupt!
Stopped at time 1090141103 (21802.822 ms)
cpu0> tra 20
cpu 1 1090141103 40001840: 81e80000 restore
cpu 2 1090141103 401cc2f4: 82102000 mov 0, %g1
cpu 3 1090141103 401cc2f4: 82102000 mov 0, %g1
cpu 0 1090141104 40001798: 7fffffea call 0x40001740
cpu 1 1090141104 40001844: 81c3e008 retl
cpu 2 1090141104 401cc2e8: c200c000 ld [%g3], %g1
cpu 3 1090141104 401cc2e8: c200c000 ld [%g3], %g1
cpu 0 1090141105 4000179c: 01000000 nop
cpu 0 1090141106 40001740: 9de3bfa0 save %sp, -96, %sp
cpu 1 1090141106 40001848: 01000000 nop
cpu 2 1090141106 401cc2ec: 80a08001 cmp %g2, %g1
cpu 3 1090141106 401cc2ec: 80a08001 cmp %g2, %g1
cpu 0 1090141107 40001744: 01000000 nop
cpu 1 1090141107 400018a0: 01000000 nop
cpu 0 1090141108 40001748: 81e80000 restore
cpu 1 1090141108 400018a4: 81e80000 restore
cpu 2 1090141108 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 3 1090141108 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 0 1090141109 4000174c: 81c3e008 retl
cpu 1 1090141109 400018a8: 81c3e008 retl
cpu 2 1090141109 401cc2f4: 82102000 mov 0, %g1
cpu 3 1090141109 401cc2f4: 82102000 mov 0, %g1
cpu 2 1090141110 401cc2e8: c200c000 ld [%g3], %g1
cpu 3 1090141110 401cc2e8: c200c000 ld [%g3], %g1
cpu 0 1090141111 40001750: 01000000 nop
cpu 1 1090141111 400018ac: 01000000 nop
cpu 0 1090141112 400017a0: c207a044 ld [%fp + 0x44], %g1
cpu 1 1090141112 40002484: c207bff0 ld [%fp - 0x10], %g1
cpu 2 1090141112 401cc2ec: 80a08001 cmp %g2, %g1
cpu 3 1090141112 401cc2ec: 80a08001 cmp %g2, %g1
cpu 0 1090141114 400017a4: c407a048 ld [%fp + 0x48], %g2
cpu 1 1090141114 40002488: 90100001 mov %g1, %o0
cpu 2 1090141114 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 3 1090141114 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 2 1090141115 401cc2f4: 82102000 mov 0, %g1
cpu 3 1090141115 401cc2f4: 82102000 mov 0, %g1
cpu 0 1090141116 400017a8: c4204000 st %g2, [%g1]
cpu 1 1090141116 4000248c: 7ffffcb2 call 0x40001754
cpu 2 1090141116 401cc2e8: c200c000 ld [%g3], %g1
cpu 3 1090141116 401cc2e8: c200c000 ld [%g3], %g1
cpu 1 1090141117 40002490: 01000000 nop
cpu 1 1090141118 40001754: 9de3bf98 save %sp, -104, %sp
cpu 2 1090141118 401cc2ec: 80a08001 cmp %g2, %g1
cpu 3 1090141118 401cc2ec: 80a08001 cmp %g2, %g1
cpu 0 1090141119 400017ac: 7fffffe5 call 0x40001740
cpu 1 1090141119 40001758: f027a044 st %i0, [%fp + 0x44]
cpu 0 1090141120 400017b0: 01000000 nop
cpu 2 1090141120 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 3 1090141120 401cc2f0: 12bffffe bne 0x401cc2e8
cpu 0 1090141121 40001740: 9de3bfa0 save %sp, -96, %sp
cpu 2 1090141121 401cc2f4: 82102000 mov 0, %g1
cpu 3 1090141121 401cc2f4: 82102000 mov 0, %g1
cpu 0 1090141122 40001744: 01000000 nop
cpu 1 1090141122 4000175c: 7ffffff9 call 0x40001740
cpu 2 1090141122 401cc2e8: c200c000 ld [%g3], %g1
cpu 3 1090141122 401cc2e8: c200c000 ld [%g3], %g1
Stopped at time 1090141123 (21802.822 ms)
cpu0>
More information about the devel
mailing list