build icon indicating copy to clipboard operation
build copied to clipboard

Changing build.yaml/pubspec.yaml sometimes causes bad hang w/ serve command

Open kevmoo opened this issue 6 years ago • 5 comments

Running pbr serve --delete-conflicting-outputs on pkg "bar"

Using a path dependency to a builder "foo". Change the build.yaml on pkg:foo

get this

pbr serve --delete-conflicting-outputs
[INFO] Generating build script completed, took 286ms
[INFO] Setting up file watchers completed, took 10ms
[INFO] Waiting for all file watchers to be ready completed, took 201ms
[INFO] Reading cached asset graph completed, took 283ms
[INFO] Checking for updates since last build completed, took 719ms
[WARNING] Invalidating asset graph due to build script update!
[INFO] Cleaning up outputs from previous builds. completed, took 184ms
[INFO] Terminating. No further builds will be scheduled

The really annoying this. CTRL-C doesn't work. I have to run ps in another terminal and call kill -TERM pid to get it to exit!

kevmoo avatar Apr 04 '19 18:04 kevmoo

Confirmed that sending kill -SIGINT PID does nothing.

kevmoo avatar Apr 04 '19 18:04 kevmoo

Do you have a way to consistently repro this?

@nshahan has seen this in the past as well but we haven't ever been able to get a consistent repro

jakemac53 avatar Apr 04 '19 21:04 jakemac53

I haven't seen this in a while but I also haven't been editing build.yaml lately files either.

nshahan avatar Apr 04 '19 21:04 nshahan

Try this – warning, it's weird

  1. sync https://github.com/dart-lang/sample-pop_pop_win – pub upgrade, pbr serve
  2. sync https://github.com/kevmoo/preload, update PPW pubspec dependency_overrides with a pointer to preload path just synced; pub upgrade in PPW directory
  3. Notice that PPW pbr serve exits – as expected
  4. Re-run pbr serve in PPW – result:
🍏:~/github/sample-pop_pop_win/ (master *)> pbr serve
[INFO] Generating build script completed, took 282ms
[INFO] Setting up file watchers completed, took 9ms
[INFO] Waiting for all file watchers to be ready completed, took 206ms
[INFO] Reading cached asset graph completed, took 277ms
[INFO] Checking for updates since last build completed, took 678ms
[WARNING] Invalidating asset graph due to build script update!
[INFO] Cleaning up outputs from previous builds. completed, took 472ms
[INFO] Terminating. No further builds will be scheduled

And I have to SIGTERM it!

kevmoo avatar Apr 05 '19 22:04 kevmoo

After a SIGTERM, rerunning seems to work fine!

kevmoo avatar Apr 05 '19 22:04 kevmoo