Skip to content
New issue

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

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

Already on GitHub? # to your account

Deno crashes with fatal error in v1.46 #25160

Closed
benStre opened this issue Aug 22, 2024 · 7 comments
Closed

Deno crashes with fatal error in v1.46 #25160

benStre opened this issue Aug 22, 2024 · 7 comments
Labels
bug Something isn't working correctly high priority

Comments

@benStre
Copy link

benStre commented Aug 22, 2024

Version: Deno 1.46.0 +

Since the upgrade to version 1.46.0, I am getting this fatal error when starting a Deno project.
I have not yet been able to track down where the problem originates from in my project because the project is quite complex.

#
# Fatal error in , line 0
# Check failed: module->status() == kLinked || module->status() == kEvaluated.
#
#
#
#FailureMessage Object: 0x3109f2930
==== C stack trace ===============================

    0   deno                                0x0000000104a3a993 v8::base::debug::StackTrace::StackTrace() + 19
    1   deno                                0x0000000104a40dbb v8::platform::(anonymous namespace)::PrintStackTrace() + 27
    2   deno                                0x0000000104a302a6 V8_Fatal(char const*, ...) + 390
    3   deno                                0x0000000104fee7e7 v8::internal::SourceTextModule::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) + 535
    4   deno                                0x0000000104a9f459 v8::Module::Evaluate(v8::Local<v8::Context>) + 649
    5   deno                                0x000000010351f0e1 deno_core::modules::map::ModuleMap::poll_progress::h3bb5a8de16d1820e + 2977
    6   deno                                0x000000010351dff9 deno_core::runtime::jsruntime::JsRuntime::poll_event_loop::h0451364d1bc18a21 + 761
    7   deno                                0x0000000102f0dbcc _ZN9deno_core7runtime9jsruntime9JsRuntime14run_event_loop28_$u7b$$u7b$closure$u7d$$u7d$17he2225bfb920ed6dbE + 83
    8   deno                                0x0000000102c9751b _ZN12deno_runtime6worker10MainWorker14run_event_loop28_$u7b$$u7b$closure$u7d$$u7d$17h65fd5b7f4b9cad4bE + 59
    9   deno                                0x000000010319e939 _ZN4deno6worker13CliMainWorker33evaluate_module_possibly_with_npm28_$u7b$$u7b$closure$u7d$$u7d$17h716ca3bebb4b9f90E + 573
    10  deno                                0x000000010319d2ff _ZN4deno6worker13CliMainWorker37execute_main_module_possibly_with_npm28_$u7b$$u7b$closure$u7d$$u7d$17h4c3995a9e8d7eb4bE + 1167
    11  deno                                0x000000010319c280 _ZN4deno6worker13CliMainWorker3run28_$u7b$$u7b$closure$u7d$$u7d$17h3a7ead08531a2839E + 860
    12  deno                                0x00000001031c3bdf _ZN4deno14run_subcommand28_$u7b$$u7b$closure$u7d$$u7d$28_$u7b$$u7b$closure$u7d$$u7d$17he8704f9141337f7eE + 5115
    13  deno                                0x00000001031b2f12 _ZN4deno16spawn_subcommand28_$u7b$$u7b$closure$u7d$$u7d$17h45ab9dc83a9568f8E + 114
    14  deno                                0x0000000102c4666e _ZN100_$LT$deno_unsync..tokio..task..MaskFutureAsSend$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$4poll17h8635d205975687beE + 30
    15  deno                                0x0000000102df0902 tokio::runtime::task::raw::poll::h3cc68b7fc84e51ec + 142
    16  deno                                0x00000001031c9ea1 deno::main::h41caf498bfbfb7f3 + 6177
    17  deno                                0x0000000102cf58c1 std::sys_common::backtrace::__rust_begin_short_backtrace::hf907f2e463ea9d3d + 6
    18  deno                                0x00000001032625f9 main + 681
    19  dyld                                0x0000000209ce7366 start + 1942
@bartlomieju bartlomieju added bug Something isn't working correctly needs info needs further information to be properly triaged labels Aug 22, 2024
@bartlomieju
Copy link
Member

Sorry for the problem, we'll most likely cut a patch release, once we identify the problem.

Is your repository open source so we could try it ourselves?

@benStre
Copy link
Author

benStre commented Aug 22, 2024

Thank you!
The problem occurs when running a project with UIX (e.g. https://github.com/unyt-org/uix-base-project)

@benStre
Copy link
Author

benStre commented Aug 22, 2024

It can be reproduced by running this module with Deno: https://raw.githubusercontent.com/unyt-org/uix/uix-new/run.ts

deno run -A --import-map https://cdn.unyt.org/importmap.json https://raw.githubusercontent.com/unyt-org/uix/uix-new/run.ts

@bartlomieju
Copy link
Member

Thanks, we're investigating right now.

@bartlomieju bartlomieju added high priority and removed needs info needs further information to be properly triaged labels Aug 22, 2024
@sveisvei
Copy link

sveisvei commented Aug 23, 2024

If we throw errors as part of import (async/await) loading, this can be reproduced.

@devsnek
Copy link
Member

devsnek commented Aug 23, 2024

It turns out there are several bugs in recent changes to V8's module loading, and I'm working on getting them fixed (e.g. https://chromium-review.googlesource.com/c/v8/v8/+/5807477). But on a slightly positive note, all these bugs are caused by throwing at the top level of a module that uses TLA (along with having complex module graphs), which means that this only affects code which ran unsuccessfully.

@jonasstrehle
Copy link

devsnek added a commit that referenced this issue Aug 29, 2024
- fix for #25160
- changes needed to land #25140
lucacasonato pushed a commit that referenced this issue Aug 29, 2024
- fix for #25160
- changes needed to land #25140
@devsnek devsnek closed this as completed Sep 4, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working correctly high priority
Projects
None yet
Development

No branches or pull requests

5 participants