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

Add rich cross-environment stack traces #55

Closed
benvanik opened this issue Oct 13, 2019 · 0 comments · Fixed by #6685 or #15151
Closed

Add rich cross-environment stack traces #55

benvanik opened this issue Oct 13, 2019 · 0 comments · Fixed by #6685 or #15151
Assignees
Labels
enhancement ➕ New feature or request runtime Relating to the IREE runtime library

Comments

@benvanik
Copy link
Collaborator

benvanik commented Oct 13, 2019

Related to #265 (which will carry the stack traces), this is tracking the work required to generate source maps, embed them in modules, and perform lookups at runtime.

@benvanik benvanik added the enhancement ➕ New feature or request label Oct 13, 2019
@benvanik benvanik added this to the Sequencer Foundation milestone Oct 13, 2019
@benvanik benvanik self-assigned this Oct 13, 2019
@benvanik benvanik removed this from the Sequencer Foundation milestone Mar 19, 2020
@benvanik benvanik added the runtime Relating to the IREE runtime library label Mar 19, 2020
@benvanik benvanik added this to the 2020Q2 Core milestone Mar 26, 2020
@benvanik benvanik modified the milestones: 2020Q2 Core, 2020Q3 Core May 19, 2020
@benvanik benvanik removed this from the 2020Q3 Core milestone Aug 13, 2020
benvanik added a commit that referenced this issue Oct 10, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 10, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 10, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 10, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 10, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 16, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 17, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 17, 2023
Enabled only when IREE_STATUS_MODE>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split
the symbol resolution/string formatting such that it's not the worst
thing if they are always-on. It's important that we consistently use
iree_status_from_code when using status returns for control flow.

Example from Windows:
```
DO NOT SUBMIT
```

Example from Linux:
```
DO NOT SUBMIT
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Fixes #55.
benvanik added a commit that referenced this issue Oct 18, 2023
Enabled only when `IREE_STATUS_MODE`>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split the
symbol resolution/string formatting such that it's not the worst thing
if they are always-on. It's important that we consistently use
`iree_status_from_code` when using status returns for control flow.

Example from Windows:
```
D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:295: NOT_FOUND; failed to open file 'oops.vmfb'; stack:
  0x00007ff6346eeff3 iree-run-module <iree_file_map_contents_readonly_platform+0xa3> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:294)
  0x00007ff6346eece7 iree-run-module <iree_file_map_contents_readonly+0x117> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:229)
  0x00007ff6346eea13 iree-run-module <iree_file_read_contents+0xa3> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:132)
  0x00007ff634622c9d iree-run-module <iree_tooling_load_bytecode_module+0x27d> (D:\Dev\iree\runtime\src\iree\tooling\context_util.c:73)
  0x00007ff634621f97 iree-run-module <iree_tooling_load_modules_from_flags+0x347> (D:\Dev\iree\runtime\src\iree\tooling\context_util.c:155)
  0x00007ff6346259d4 iree-run-module <iree_tooling_create_run_context+0x74> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:96)
  0x00007ff634624e3e iree-run-module <iree_tooling_run_module_with_data+0x11e> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:341)
  0x00007ff634624d10 iree-run-module <iree_tooling_run_module_from_flags+0x90> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:327)
  0x00007ff63461a32e iree-run-module <main+0x10e> (D:\Dev\iree\tools\iree-run-module-main.c:43)
  0x00007ff6347d92e9 iree-run-module <invoke_main+0x39> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
  0x00007ff6347d918e iree-run-module <__scrt_common_main_seh+0x12e> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
  0x00007ff6347d904e iree-run-module <__scrt_common_main+0xe> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
  0x00007ff6347d937e iree-run-module <mainCRTStartup+0xe> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
  0x00007ffc27b97344 ??? <BaseThreadInitThunk+0x14>
  0x00007ffc29a026b1 ??? <RtlUserThreadStart+0x21>
; loading bytecode module at 'oops.vmfb'; loading modules and dependencies; creating run context
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Example from Linux:
```
iree/runtime/src/iree/base/internal/file_io.c:199: NOT_FOUND; failed to open file 'oops.vmfb'; stack:
  0x00000000004cdafc iree-run-module <???>
  0x0000000000725319 iree-run-module <???>
  0x0000000000724e7b iree-run-module <???>
  0x00000000004dddc2 iree-run-module <???>
  0x00000000004dc898 iree-run-module <???>
  0x00000000004e7123 iree-run-module <???>
  0x00000000004e6586 iree-run-module <???>
  0x00000000004e5f8a iree-run-module <???>
  0x00000000004c8623 iree-run-module <???>
  0x00007f84b58e1083 libc.so.6 <__libc_start_main+0xf3>
  0x000000000041d9ce iree-run-module <???>
; loading bytecode module at 'oops.vmfb'; loading modules and dependencies; creating run context
```
^ https://www.youtube.com/watch?v=lRAZk0Xb0xM

If we want stack traces with symbols on linux we'll need to have
libdwarf-dev installed and use it to resolve things ala
https://gist.github.com/tuxology/6144170 - I'm happy with having symbols
on Windows and basic ones in debug mode on Mac for now. We've got
everything in place for making linux resolution better if someone cares.
I couldn't figure out how to make the builds happy with all the
GNU_SOURCE shenannigans and just disabled the whole thing for now.

Fixes #55.
ramiro050 pushed a commit to ramiro050/iree that referenced this issue Dec 19, 2023
…org#15151)

Enabled only when `IREE_STATUS_MODE`>=3, which by default means off in
release builds and on in debug builds. Capturing stacks isn't free so
performance sensitive code should keep them off, though we do split the
symbol resolution/string formatting such that it's not the worst thing
if they are always-on. It's important that we consistently use
`iree_status_from_code` when using status returns for control flow.

Example from Windows:
```
D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:295: NOT_FOUND; failed to open file 'oops.vmfb'; stack:
  0x00007ff6346eeff3 iree-run-module <iree_file_map_contents_readonly_platform+0xa3> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:294)
  0x00007ff6346eece7 iree-run-module <iree_file_map_contents_readonly+0x117> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:229)
  0x00007ff6346eea13 iree-run-module <iree_file_read_contents+0xa3> (D:\Dev\iree\runtime\src\iree\base\internal\file_io.c:132)
  0x00007ff634622c9d iree-run-module <iree_tooling_load_bytecode_module+0x27d> (D:\Dev\iree\runtime\src\iree\tooling\context_util.c:73)
  0x00007ff634621f97 iree-run-module <iree_tooling_load_modules_from_flags+0x347> (D:\Dev\iree\runtime\src\iree\tooling\context_util.c:155)
  0x00007ff6346259d4 iree-run-module <iree_tooling_create_run_context+0x74> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:96)
  0x00007ff634624e3e iree-run-module <iree_tooling_run_module_with_data+0x11e> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:341)
  0x00007ff634624d10 iree-run-module <iree_tooling_run_module_from_flags+0x90> (D:\Dev\iree\runtime\src\iree\tooling\run_module.c:327)
  0x00007ff63461a32e iree-run-module <main+0x10e> (D:\Dev\iree\tools\iree-run-module-main.c:43)
  0x00007ff6347d92e9 iree-run-module <invoke_main+0x39> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:79)
  0x00007ff6347d918e iree-run-module <__scrt_common_main_seh+0x12e> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
  0x00007ff6347d904e iree-run-module <__scrt_common_main+0xe> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:331)
  0x00007ff6347d937e iree-run-module <mainCRTStartup+0xe> (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp:17)
  0x00007ffc27b97344 ??? <BaseThreadInitThunk+0x14>
  0x00007ffc29a026b1 ??? <RtlUserThreadStart+0x21>
; loading bytecode module at 'oops.vmfb'; loading modules and dependencies; creating run context
```

Example from MacOS:
```
iree/runtime/src/iree/base/internal/file_io.c:253: NOT_FOUND; failed to open file '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; stack:
  0x0000000100093644 iree-run-module <iree_file_map_contents_readonly_platform+0x64>
  0x0000000100093318 iree-run-module <iree_file_map_contents_readonly+0x12c>
  0x0000000100092ff0 iree-run-module <iree_file_read_contents+0x80>
  0x0000000100028a04 iree-run-module <iree_tooling_load_bytecode_module+0x208>
  0x0000000100028518 iree-run-module <iree_tooling_load_modules_from_flags+0x28c>
  0x000000010002ab90 iree-run-module <iree_tooling_create_run_context+0x68>
  0x000000010002a9d8 iree-run-module <iree_tooling_run_module_with_data+0x98>
  0x000000010002a934 iree-run-module <iree_tooling_run_module_from_flags+0x64>
  0x0000000100006228 iree-run-module <main+0xcc>
  0x000000018dd61058 dyld <start+0x8b0>
; loading bytecode module at '/Users/ben/Dev/iree/../iree-tmp/foo.vmfb'; loading modules and dependencies; creating run context
```

Example from Linux:
```
iree/runtime/src/iree/base/internal/file_io.c:199: NOT_FOUND; failed to open file 'oops.vmfb'; stack:
  0x00000000004cdafc iree-run-module <???>
  0x0000000000725319 iree-run-module <???>
  0x0000000000724e7b iree-run-module <???>
  0x00000000004dddc2 iree-run-module <???>
  0x00000000004dc898 iree-run-module <???>
  0x00000000004e7123 iree-run-module <???>
  0x00000000004e6586 iree-run-module <???>
  0x00000000004e5f8a iree-run-module <???>
  0x00000000004c8623 iree-run-module <???>
  0x00007f84b58e1083 libc.so.6 <__libc_start_main+0xf3>
  0x000000000041d9ce iree-run-module <???>
; loading bytecode module at 'oops.vmfb'; loading modules and dependencies; creating run context
```
^ https://www.youtube.com/watch?v=lRAZk0Xb0xM

If we want stack traces with symbols on linux we'll need to have
libdwarf-dev installed and use it to resolve things ala
https://gist.github.com/tuxology/6144170 - I'm happy with having symbols
on Windows and basic ones in debug mode on Mac for now. We've got
everything in place for making linux resolution better if someone cares.
I couldn't figure out how to make the builds happy with all the
GNU_SOURCE shenannigans and just disabled the whole thing for now.

Fixes iree-org#55.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ➕ New feature or request runtime Relating to the IREE runtime library
Projects
None yet
1 participant