weixin_39926739
weixin_39926739
2020-12-04 13:31

ARM host flaky?

Running the same command a few times ends in a segafult sometimes:

 rust
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
Segmentation fault
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$ ./usercorn ~/Downloads/busybox-x86_64 ls -l
Segmentation fault
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
Segmentation fault
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
Segmentation fault
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
Segmentation fault
odroid:$  ./usercorn ~/Downloads/busybox-x86_64 ls -l
ls: can't open '.': Invalid argument
total 0

It's possible the underlying unicorn engine is to blame but why the non-determinism?

该提问来源于开源项目:lunixbochs/usercorn

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39926739 weixin_39926739 4月前

    gdb trace:

     shell
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0xa9788460 (LWP 8437)]
    
    helper_le_ldq_mmu_x86_64 (env=0xffffffff, addr=12536268745359753215, mmu_idx=2, retaddr=2902052528) at /tmp/unicorn/qemu/softmmu_template.h:177
    177         target_ulong tlb_addr = env->tlb_table[mmu_idx][index].ADDR_READ;
    (gdb) bt
    #0  helper_le_ldq_mmu_x86_64 (env=0xffffffff, addr=12536268745359753215, mmu_idx=2, retaddr=2902052528) at /tmp/unicorn/qemu/softmmu_template.h:177
    #1  0xacf9d150 in static_code_gen_buffer () from /usr/lib/libunicorn.so.0
    
    

    So it looks like a unicorn issue?

    点赞 评论 复制链接分享
  • weixin_40002336 weixin_40002336 4月前

    Probably Unicorn's fault, as Go is memory-safe

    点赞 评论 复制链接分享
  • weixin_39926739 weixin_39926739 4月前

    With the latest refactorings in mind is it ok to report the issue over there yet?

    -original message- Subject: Re: [usercorn] ARM host flaky? (#129) From: Ryan Hileman notifications.com Date: 24.01.2016 07:23

    Probably Unicorn's fault, as Go is memory-safe

    Reply to this email directly or view it on GitHub: https://github.com/lunixbochs/usercorn/issues/129#issuecomment-174260664

    点赞 评论 复制链接分享
  • weixin_40002336 weixin_40002336 4月前

    Yeah the refactor is unrelated.

    点赞 评论 复制链接分享