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

[help] Using llnode with Deno #288

Closed
bartlomieju opened this issue Aug 7, 2019 · 5 comments
Closed

[help] Using llnode with Deno #288

bartlomieju opened this issue Aug 7, 2019 · 5 comments

Comments

@bartlomieju
Copy link

I'm trying to use llnode to debug deno.

I do realize that's not the scope of this lib, but I hope you guys might be able to help.

Unfortunately backtrace using v8 bt gives exactly same output as backtrace, neither v8 findjsobjects nor v8 source list work.

Here's my excerpt from my building config:

  symbol_level = 2

  is_win_fastlink = true
  use_lld = false
  is_debug = true
  v8_optimized_debug = false
  v8_enable_backtrace = true
  v8_deprecation_warnings = false
  v8_enable_gdbjit = false
  v8_enable_i18n_support = false
  v8_enable_shared_ro_heap = false  # See #2624
  v8_experimental_extra_library_files = []
  v8_extra_library_files = []
  v8_imminent_deprecation_warnings = false
  v8_monolithic = false
  v8_untrusted_code_mitigations = false
  v8_use_external_startup_data = false
  v8_use_snapshot = true
  v8_postmortem_support = true

Here's output from llnode:

(llnode) backtrace
    frame #0: 0x000000010f1b1722 libv8.dylib`v8::internal::Handle<v8::internal::OrderedHashMap>::operator*(this=0x00007ffee57e0d88) const at handles.h:144
    frame #1: 0x000000010f1b1413 libv8.dylib`v8::internal::Handle<v8::internal::OrderedHashMap>::operator->(this=0x00007ffee57e0d88) const at handles.h:138
    frame #2: 0x000000010fa61006 libv8.dylib`v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Rehash(isolate=0x0000000115138000, table=Handle<v8::internal::OrderedHashMap> @ 0x00007ffee57e0d88, new_capacity=8) at ordered-hash-table.cc:216
    frame #3: 0x000000010fa5a75b libv8.dylib`v8::internal::OrderedHashMap::Rehash(isolate=0x0000000115138000, table=Handle<v8::internal::OrderedHashMap> @ 0x00007ffee57e0dd0, new_capacity=8) at ordered-hash-table.cc:243
    frame #4: 0x000000010fa5a860 libv8.dylib`v8::internal::OrderedHashTable<v8::internal::OrderedHashMap, 2>::Shrink(isolate=0x0000000115138000, table=Handle<v8::internal::OrderedHashMap> @ 0x00007ffee57e0e30) at ordered-hash-table.cc:67
    frame #5: 0x000000010fb93104 libv8.dylib`v8::internal::__RT_impl_Runtime_MapShrink(args=Arguments @ 0x00007ffee57e0f08, isolate=0x0000000115138000) at runtime-collections.cc:49
    frame #6: 0x000000010fb92d83 libv8.dylib`v8::internal::Runtime_MapShrink(args_length=1, args_object=0x00007ffee57e0fe8, isolate=0x0000000115138000) at runtime-collections.cc:44
    frame #7: 0x000000011096df80 libv8.dylib`Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 64
    frame #8: 0x000000011085c417 libv8.dylib`Builtins_MapPrototypeDelete + 19191
  * frame #9: 0x000000e8c1485e32
    frame #10: 0x00000001106fa7fc libv8.dylib`Builtins_ArgumentsAdaptorTrampoline + 188
    frame #11: 0x0000000110706b5d libv8.dylib`Builtins_JSEntryTrampoline + 93
    frame #12: 0x0000000110706938 libv8.dylib`Builtins_JSEntry + 120
    frame #13: 0x000000010f803ddc libv8.dylib`v8::internal::GeneratedCode
...

I assume frame #9 is a JS frame, but I couldn't find a way to actually annotate it using llnode.

I suspect the problem is with build config, any tips would be highly appreciated 🙏

@mmarchini
Copy link
Contributor

This might be due to an unsupported V8 version. Which V8 version is your deno using?

@bartlomieju
Copy link
Author

@mmarchini we're currently running V8 7.7.200

@cjihrig
Copy link
Contributor

cjihrig commented Aug 7, 2019

That version is not yet supported. Take a look at the issues in this repo labeled V8 Changes... you'll see llnode is increasingly drifting behind.

@bartlomieju
Copy link
Author

@cjihrig duh! Thanks for the tip, my bad. Closing this issue for now.

@mmarchini
Copy link
Contributor

Hopefully in the future we can leverage the new postmortem API which landed in V8 a few days ago (https://chromium-review.googlesource.com/c/v8/v8/+/1717090), but right now llnode is only work to V8 versions up to 6.8.

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