Skip to content

dune 3.0 crashes badly when doing dune build -w, and dune clean in same repo #5449

@Alizter

Description

@Alizter

In my workflow I have dune building in the background with a watch. If I do a dune clean it crashes badly.

Expected Behavior

For dune clean to work, and dune build -w not to crash.

Actual Behavior

It crashes.

Reproduction

Doing the following

dune init proj foo
cd foo
dune build -w &
dune clean

crashes badly and gives:

This error backtrace
Internal error, please report upstream including the contents of _build/log.
Description:
  ("Fs_memo.Event.create called on a build path", {})
Raised at Stdune__code_error.raise in file "otherlibs/stdune/code_error.ml",
  line 11, characters 30-62
Called from Dune_file_watcher.Fs_memo_event.create in file
  "src/dune_file_watcher/dune_file_watcher.ml", line 30, characters 6-71
Called from
  Dune_file_watcher.process_inotify_event.create_event_unless_excluded in
  file "src/dune_file_watcher/dune_file_watcher.ml", line 179, characters
  28-62
Called from Stdune__list.concat_map.aux in file "otherlibs/stdune/list.ml",
  line 41, characters 15-18
Called from Dune_engine__scheduler.Run_once.iter in file
  "src/dune_engine/scheduler.ml", line 1031, characters 19-25
Called from Fiber.run.loop in file "src/fiber/fiber.ml", line 1008,
  characters 51-60
Called from Fiber.run.(fun) in file "src/fiber/fiber.ml" (inlined), line
  1010, characters 17-47
Called from Dune_engine__scheduler.Run_once.run in file
  "src/dune_engine/scheduler.ml", line 1101, characters 10-50
Re-raised at Stdune__exn.raise_with_backtrace in file
  "otherlibs/stdune/exn.ml" (inlined), line 36, characters 27-56
Called from Dune_engine__scheduler.Run.go.(fun) in file
  "src/dune_engine/scheduler.ml", line 1333, characters 30-61
Called from Cmdliner_term.app.(fun) in file
  "vendor/cmdliner/src/cmdliner_term.ml", line 25, characters 19-24
Called from Cmdliner.Term.run in file "vendor/cmdliner/src/cmdliner.ml", line
  117, characters 32-39
Called from Cmdliner.Term.term_eval in file
  "vendor/cmdliner/src/cmdliner.ml", line 147, characters 18-36
Called from Cmdliner.Term.Group.eval in file
  "vendor/cmdliner/src/cmdliner.ml", line 367, characters 22-48
Called from Main in file "bin/main.ml", line 90, characters 10-50

I must not crash.  Uncertainty is the mind-killer. Exceptions are the
little-death that brings total obliteration.  I will fully express my cases. 
Execution will pass over me and through me.  And when it has gone past, I
will unwind the stack along its path.  Where the cases are handled there will
be nothing.  Only I will remain.

Specifications

  • Version of dune (output of dune --version): says n/a but is 3.0.0
  • Version of ocaml (output of ocamlc --version) 4.13.1
  • Operating system (distribution and version): Ubuntu 20.04.3 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions