Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ARC64][specint2006] omnetpp segfaults #46

Open
abrodkin opened this issue Apr 1, 2021 · 2 comments
Open

[ARC64][specint2006] omnetpp segfaults #46

abrodkin opened this issue Apr 1, 2021 · 2 comments
Assignees

Comments

@abrodkin
Copy link
Member

abrodkin commented Apr 1, 2021

Fails exactly the same in both QEMU & nSIM

  1. nSIM: nsimdrv -prop=nsim_isa_vec64=1 -prop=nsim_isa_family=arc64 -prop=nsim_isa_enable_timer_0=1 -prop=nsim_isa_enable_timer_1=1 -prop=nsim_isa_addr_size=64 -prop=nsim_isa_pc_size=64 -prop=icache=16384,64,4,o -prop=dcache=16384,64,4,o -prop=mmu_version=6 -prop=mmu_pagesize=4096 -prop=mmu_address_space=48 -prop=nsim_mem-dev=uart0,kind=dwuart,base=0xf0000000,irq=24 -prop=nsim_isa_mpy_option=3 -prop=nsim_isa_mpy64=1 -prop=nsim_isa_div64_option=1 -prop=nsim_isa_div_rem_option=2 -prop=nsim_isa_atomic_option=1 ./vmlinux
  2. QEMU: qemu-system-arc64 -M simhs -global cpu.mmuv6=true -nographic -no-reboot -serial stdio -monitor none -cpu arc64 -kernel vmlinux
# cd /arc64-spec-test/benchmarks/471.omnetpp/
# ./omnetpp omnetpp.ini
OMNeT++ Discrete Event Simulation  (C) 1992-2003 Andras Varga
See the license for distribution terms and warranty disclaimer
Setting up Cmdenv (command-line user interface)...

Preparing for Run #1...
Setting up network `twoHosts'...
random: fast init done
Running simulation...
twoHosts.hostA.srv registering DSAP 241
twoHosts.hostB.srv registering DSAP 241
twoHosts.hostA.cli registering DSAP 240
twoHosts.hostB.cli registering DSAP 240
** Event #0   T=0.0000000  ( 0.00s)
     Messages:  created: 20
** Event #100000   T=14.836799  (14.83s)
     Messages:  created: 48540
** Event #200000   T=29.571801  (29.57s)
     Messages:  created: 97064
** Event #300000   T=44.401886  (44.40s)
     Messages:  created: 145570
** Event #400000   T=59.434241  (59.43s)
     Messages:  created: 194096
** Event #500000   T=74.211485 ( 1m 14s)
     Messages:  created: 242608
** Event #600000   T=89.306257 ( 1m 29s)
     Messages:  created: 291116
** Event #700000   T=103.92283 ( 1m 43s)
     Messages:  created: 339640
** Event #800000   T=119.27061 ( 1m 59s)
     Messages:  created: 388154
** Event #900000   T=133.81414 ( 2m 13s)
     Messages:  created: 436666
** Event #1000000   T=148.38048 ( 2m 28s)
     Messages:  created: 485196
** Event #1100000   T=163.10847 ( 2m 43s)
     Messages:  created: 533702
** Event #1200000   T=177.83484 ( 2m 57s)
     Messages:  created: 582219
potentially unexpected fatal signal 11.
Path: /arc64-spec-test/benchmarks/471.omnetpp/omnetpp
CPU: 0 PID: 68 Comm: omnetpp Not tainted 5.6.0 #7
Invalid Write @ 0x00000000 by insn @ 0x202312c2
  @off 0xa2c2 in [/lib/libgcc_s.so.1]  VMA: 0x20227000 to 0x20237000
ECR: 0x00050200 EFA: 0x00000000 ERET: 0x202312c2
STAT32: 0x80081882 [IE U     ]   BTA: 0x200cb2e4
 SP: 0x5fffe438  FP: 0x00000000 BLK: 0x200cb61e
r00: 0x00000000 r01: 0x00000000 r02: 0x007b3888
r03: 0x00000000 r04: 0x00000008 r05: 0x00013620
r06: 0x0000007c r07: 0x00000000 r08: 0x202390f0
r09: 0x000467f3 r10: 0x20012f74 r11: 0x20021170
r12: 0x0001362c r13: 0xfefefefefefefeff r14: 0x20231274
r15: 0x007b3888 r16: 0x5fffefd0 r17: 0x00046852
r18: 0x00000000 r19: 0x00000000 r20: 0x000a9350
r21: 0x00000001 r22: 0x00000001 r23: 0x00000001
r24: 0x00000000 r25: 0x00000020
Segmentation fault

Attached vmlinux-arc64-specint2006-omnetpp.2021.04.01.zip

To extract initramfs.cpio.gz do arc64-elf-objcopy -O binary --only-section=.init.ramfs vmlinux initramfs.cpio.gz.

@abrodkin
Copy link
Member Author

abrodkin commented Apr 1, 2021

That's the part of libgcc_s.so.1 where it fails:

000000000000a274 <_Unwind_SetGR@@GCC_3.0>:
    a274:»      218c 88c1           »   cmp»    r1,99
    a278:»      f6c7                »   ble_s»  14»     ;a286 <_Unwind_SetGR@@GCC_3.0+0x12>
    a27a:»      c7e7                »   pushl_s»blink
    a27c:»      2731 ff00 0000 7bcc »   ldl»    r0,[pcl,31692@s32]»     ;11e48 <__emutls_register_common@@GCC_4.3.0+0x43b8>
    a284:»      7840                »   jl_s»   [r0]
    a286:»      592f 0047           »   sexwl»  r1,r1
    a28a:»      5f00 7f03 0000 7df4 »   addl»   r3,pcl,32244@s32»       ;1207c <__emutls_register_common@@GCC_4.3.0+0x45ec>
    a292:»      2332 0044           »   ldb»    r4,[r3,r1]
    a296:»      106a 0e43           »   ldl.as» r3,[r0,106]
    a29a:»      5b51 8f80           »   btstl»  r3,0x3e
    a29e:»      f20e                »   beq_s»  28»     ;a2b8 <_Unwind_SetGR@@GCC_3.0+0x44>
    a2a0:»      5800 0043           »   addl»   r3,r0,r1
    a2a4:»      5b96 0b41           »   add3l»  r3,r3,109
    a2a8:»      8b60                »   ldb_s»  r3,[r3,0]
    a2aa:»      7b6b                »   tst_s»  r3,r3
    a2ac:»      f206                »   beq_s»  12»     ;a2b8 <_Unwind_SetGR@@GCC_3.0+0x44>
    a2ae:»      5816 0041           »   add3l»  r1,r0,r1
    a2b2:»      1900 0087           »   stl»    r2,[r1]
    a2b6:»      7ee0                »   j_s»    [blink]
    a2b8:»      20f1 8040           »   ldl.as» r0,[r0,r1]
    a2bc:»      244c 8200           »   cmp»    r4,0x8
    a2c0:»      f5dd                »   bne_s»  -70»    ;a27a <_Unwind_SetGR@@GCC_3.0+0x6>
    a2c2:»      1800 0087           »   stl»    r2,[r0]   <--- HERE WE FAIL
    a2c6:»      7ee0                »   j_s»    [blink]

@claziss @vineetgarc yet another unwinder-related problem? Or #38 is only applicable to the kernel and user-space unwinder is supposed to work?

@abrodkin abrodkin changed the title [ARC64][specin2006] omnetpp segfaults [ARC64][specint2006] omnetpp segfaults Apr 2, 2021
@claziss
Copy link

claziss commented Apr 2, 2021

It is libgcc, it is unwind procedure, probably it is unwinding issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants