Skip to content

fix: jaspr serve build never finishes after a DDC compiler crash and nothing reports it #917

Open

Description

@dunkmask2407

Description

While running jaspr serve -v (static mode, Windows 11), the DDC compiler worker crashed with an internal compiler error while I was typing (reported separately: fix: [CFE] "Internal problem: Unhandled SimpleIdentifier in toValue" when compiling an incomplete dot shorthand (curve: .) (Dart 3.13.4)). The next build started but never finished: no further builder output, no timeout and no warning. Nothing in the CLI tells the user that the build is stuck, and the dev server kept reloading the server app, so it looked as if the server had crashed. The only way out was to stop jaspr serve and kill the leftover processes.

The Ctrl+C part of that session (processes left behind after shutdown) is a separate, reproducible problem: [fix: jaspr serve leaves the server process tree running after Ctrl+C on Windows (ports 8080 and 8181 stay in use)].

Timeline (2026-09-29, local time, about a 5 hour session with 614 builds logged: 424 succeeded, 189 failed on incomplete code I was typing, 1 never finished):

Steps To Reproduce

I don't have a deterministic reproduction. This is what happened:

  1. Run jaspr serve -v in a static-mode project.
  2. Edit components for a few hours (files get saved while typing, so many builds run on incomplete code).
  3. At some point the DDC compiler crashes on an incomplete expression (untested guess: a half-typed dot shorthand such as curve: . inside nested calls).
  4. The next build never completes.

Doctor Output

[✓] Jaspr CLI (Version 0.23.5)
  • Dart Version 3.13.4 (stable) (Tue Sep 15 01:01:15 2026 -0700) on "windows_x64" at C:\Dev\flutter\bin\cache\dart-sdk\bin\dart.exe
  • Running on windows "Windows 11 Pro" 10.0 (Build 26200) - Locale en-US
  • Analytics: Enabled
[✓] Current Project
  • Dependencies on core packages:
    • jaspr: ^0.23.5
    • jaspr_builder: ^0.23.5 (dev)
    • jaspr_router: ^0.9.0
  • Rendering mode: static
  • Flutter mode: none

Expected Behavior

  1. A build that does not complete within a reasonable time should be reported (for example which builder step is still waiting) instead of leaving the CLI silent.
  2. Ideally the web compilers could be restarted without restarting the whole jaspr serve session.

Additional Context

Log excerpts (full session log attached)

Build #732, DDC worker crash (top and bottom of the stack):

[BUILDER] [ERROR] Error compiling dartdevc module:femi_portfolio|lib/components/arrow_pill.ddc.js
[BUILDER] [ERROR] Crash when compiling packages/femi_portfolio/components/arrow_pill.dart at character offset 996:
[BUILDER] [ERROR] packages/femi_portfolio/components/arrow_pill.dart: Internal problem: Unhandled SimpleIdentifier in toValue.
[BUILDER] [ERROR] #0      internalProblem (package:front_end/src/base/problems.dart:48:5)
[BUILDER] [ERROR] #4      BodyBuilderImpl.handleDotShorthandContext (package:front_end/src/kernel/body_builder.dart:11394:24)
[BUILDER] [ERROR] #5      Parser._parseDotShorthand (package:_fe_analyzer_shared/src/parser/parser_impl.dart:7177:16)
...
[BUILDER] [ERROR] #75     _CompilerWorker.performRequest (package:dev_compiler/ddc.dart:76:18)
[BUILDER] [ERROR] #77     internalMain (package:dev_compiler/ddc.dart:36:5)
...
[BUILDER] Failed to build with build_runner/aot in 3s; wrote 24 outputs.
[CLI] [ERROR] Failed building web assets. There is probably more output above.

Build #733 (last builder output, then nothing):

[BUILDER] Starting build #733.
...
[BUILDER] 0s build_web_compilers:entrypoint_marker on 1 input: 1 skipped
[BUILDER] 0s build_web_compilers:entrypoint on 1 input; web/main.client.dart
[SERVER] [INFO] Server application reloaded.
Processes still running after I stopped the CLI (20 `dart*` processes)
  • Build daemon tree (15 processes, about 2 GB): dart.exe run build_runner daemon ... (PID 15412) → dartvm.exe → dartaotruntime.exe .dart_tool/build/entrypoint/build.dart.aot daemon ... (426 MB), which has 4 kernel_worker_aot --persistent_worker and 4 dartdevc.dart.snapshot --persistent_worker workers (each a dart.exe launcher plus a dartvm.exe child).
  • Server tree (3 processes): dart.exe --enable-vm-service ... server_target.dart (PID 6636) → dartvm.exe (444 MB) → dartaotruntime.exe dds_aot.dart.snapshot ... --bind-port=8181.
  • Two more belong to the VS Code Dart extension (language-server and tooling-daemon).

Observations:

  • As far as I can tell from reading jaspr_cli 0.23.5, nothing watches a build that started but never finished (apart from a message during the initial build). I read the code but did not debug it.
  • Untested hypothesis: after the internal crash, a persistent DDC worker is left in a bad state and build_runner keeps waiting for it. I have no evidence beyond the order of events (the crash is in build fix: Sitemap's lastmod datetime format does not work for Google Search #732 and the hang starts in build fix: provider sync with codec #733).
  • This is the only compiler crash in about 600 builds, and the only hung build.

Possibly related:

Workaround I use (kills Jaspr's processes only, not the VS Code Dart extension's):

Get-CimInstance Win32_Process | Where-Object { $_.Name -like 'dart*' -and $_.CommandLine -match 'entrypoint/build\.dart\.aot|build_runner|server_target\.dart|dartdevc|kernel_worker|dds_aot' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }

Attached: the full jaspr serve -v session log.

jaspr serve full log.txt

Activity

  1. added
    bug
    on Oct 4, 2026
  2. changed the title [-]fix:[/-] [+]fix: jaspr serve build never finishes after a DDC compiler crash and nothing reports it[/+] on Oct 4, 2026
  3. diegolopezrm commented on Oct 4, 2026

    @diegolopezrm
    Contributor

    The silent part I can confirm from the CLI side. It already has both edges of the interval: the dev command logs Rebuilding web assets... when a build reports started, and only writes again on succeeded or failed. The one watchdog it has, the 20s Building web assets... (This takes longer for the initial build), is tied to the initial build completer, so after the first build nothing ever times out. A build that starts and never lands just leaves the footer on "rebuilding" forever, which is what you saw.

    My hang in #807 is a different trigger, deterministic and tied to the hot reload defines, but the end state is the same: no output, no timeout, and the server app reloading in the background.

    Happy to send a small PR that warns when a build has been running for N seconds, naming the last builder step that logged. It doesn't fix the stuck worker, but it would say the build is stuck instead of leaving you guessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions