* [Qemu-devel] qemu-riscv64 seg fault
@ 2018-09-03 7:45 Pranith Kumar
2018-09-03 7:58 ` Pranith Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2018-09-03 7:45 UTC (permalink / raw)
To: mjc; +Cc: qemu-devel, Richard Henderson
Hi Michael,
qemu-riscv64 seg faults for me on a static binary. You can build the
binary from here: https://github.com/pranith/quickht
$ STATIC=1 RISCV=1 make
$ qemu-riscv64 ./bench -t 1 -u 1
<seg fault>
Thanks,
--
Pranith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-riscv64 seg fault
2018-09-03 7:45 [Qemu-devel] qemu-riscv64 seg fault Pranith Kumar
@ 2018-09-03 7:58 ` Pranith Kumar
2018-09-03 8:07 ` Michael Clark
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2018-09-03 7:58 UTC (permalink / raw)
To: mjc; +Cc: qemu-devel, Richard Henderson
On second looks, running the benchmark on a RISCV processor is also
giving a seg fault. So may be there is something wrong with the
benchmark... OTOH, x86 version runs fine... hmm
Please ignore this report, I will try to investigate further.
Thanks,
On Mon, Sep 3, 2018 at 12:45 AM Pranith Kumar <bobby.prani@gmail.com> wrote:
>
> Hi Michael,
>
> qemu-riscv64 seg faults for me on a static binary. You can build the
> binary from here: https://github.com/pranith/quickht
>
> $ STATIC=1 RISCV=1 make
>
> $ qemu-riscv64 ./bench -t 1 -u 1
> <seg fault>
>
> Thanks,
> --
> Pranith
--
Pranith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-riscv64 seg fault
2018-09-03 7:58 ` Pranith Kumar
@ 2018-09-03 8:07 ` Michael Clark
2018-09-03 8:16 ` Pranith Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Michael Clark @ 2018-09-03 8:07 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel, Richard Henderson
Thanks. I was just about to log an issue in the riscv-qemu issue tracker on
GitHub.
I reproduced it on my side. The fact that it is causes QEMU user to crash
in translate.c is interesting.
I ran your program with -d in_asm and it appears to crash in thread::join
On Mon, Sep 3, 2018 at 7:58 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> On second looks, running the benchmark on a RISCV processor is also
> giving a seg fault. So may be there is something wrong with the
> benchmark... OTOH, x86 version runs fine... hmm
>
> Please ignore this report, I will try to investigate further.
>
> Thanks,
> On Mon, Sep 3, 2018 at 12:45 AM Pranith Kumar <bobby.prani@gmail.com>
> wrote:
> >
> > Hi Michael,
> >
> > qemu-riscv64 seg faults for me on a static binary. You can build the
> > binary from here: https://github.com/pranith/quickht
> >
> > $ STATIC=1 RISCV=1 make
> >
> > $ qemu-riscv64 ./bench -t 1 -u 1
> > <seg fault>
> >
> > Thanks,
> > --
> > Pranith
>
>
>
> --
> Pranith
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-riscv64 seg fault
2018-09-03 8:07 ` Michael Clark
@ 2018-09-03 8:16 ` Pranith Kumar
2018-09-03 8:41 ` Michael Clark
0 siblings, 1 reply; 5+ messages in thread
From: Pranith Kumar @ 2018-09-03 8:16 UTC (permalink / raw)
To: mjc; +Cc: qemu-devel, Richard Henderson
On Mon, Sep 3, 2018 at 1:07 AM Michael Clark <mjc@sifive.com> wrote:
>
> Thanks. I was just about to log an issue in the riscv-qemu issue tracker on GitHub.
>
> I reproduced it on my side. The fact that it is causes QEMU user to crash in translate.c is interesting.
>
> I ran your program with -d in_asm and it appears to crash in thread::join
Interestingly, qemu-x86_64 crashes too. But running natively on x86
works fine. There is something off somewhere...
~/quickht$ qemu-x86_64 ./bench -t 2 -u 2
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
~/quickht$ ./bench -t 2 -u 2
Comparisons: 23922
Buckets touched: 4933
Operations: 2000
--
Pranith
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] qemu-riscv64 seg fault
2018-09-03 8:16 ` Pranith Kumar
@ 2018-09-03 8:41 ` Michael Clark
0 siblings, 0 replies; 5+ messages in thread
From: Michael Clark @ 2018-09-03 8:41 UTC (permalink / raw)
To: Pranith Kumar; +Cc: qemu-devel, Richard Henderson
On Mon, Sep 3, 2018 at 8:16 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> On Mon, Sep 3, 2018 at 1:07 AM Michael Clark <mjc@sifive.com> wrote:
> >
> > Thanks. I was just about to log an issue in the riscv-qemu issue tracker
> on GitHub.
> >
> > I reproduced it on my side. The fact that it is causes QEMU user to
> crash in translate.c is interesting.
> >
> > I ran your program with -d in_asm and it appears to crash in thread::join
>
> Interestingly, qemu-x86_64 crashes too. But running natively on x86
> works fine. There is something off somewhere...
>
Indeed. Another data-point. I tested it in both qemu-2.12 and qemu-3.0. It
still crashed in translate.c in qemu-2.12, but on another line. There was
quite a bit of restructuring of target/riscv/translate.c in qemu-3.0, which
is why I tried qemu-2.12, however, it seems that is likely not the cause.
This was the backtrace from riscv-qemu-2.12:
Thread 1 "qemu-riscv64" received signal SIGSEGV, Segmentation fault.
0x00005555555e1347 in gen_intermediate_code (cs=cs@entry=0x555557905590,
tb=tb@entry=0x5555558e1a00 <static_code_gen_buffer+9952>)
at /home/mjc/src/sifive/riscv-qemu/target/riscv/translate.c:1934
1934 if (num_insns == max_insns && (tb->cflags & CF_LAST_IO)) {
(gdb) print tb
$1 = (TranslationBlock *) 0x5555558e1a00 <static_code_gen_buffer+9952>
(gdb) quit
A debugging session is active.
~/quickht$ qemu-x86_64 ./bench -t 2 -u 2
> qemu: uncaught target signal 11 (Segmentation fault) - core dumped
> Segmentation fault
>
> ~/quickht$ ./bench -t 2 -u 2
> Comparisons: 23922
> Buckets touched: 4933
> Operations: 2000
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-03 8:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-03 7:45 [Qemu-devel] qemu-riscv64 seg fault Pranith Kumar
2018-09-03 7:58 ` Pranith Kumar
2018-09-03 8:07 ` Michael Clark
2018-09-03 8:16 ` Pranith Kumar
2018-09-03 8:41 ` Michael Clark
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).