-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Environment
-
Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 22 [erts-10.5.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]
Elixir 1.9.2 (compiled with Erlang/OTP 21) -
Operating system:
Linux 5.0.0-38-generic String#each_line #41-Ubuntu SMP Tue Dec 3 00:27:35 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Current behavior
I'm performing tasks under a Task.Supervisor, and periodically get the following error:
18:53:18.996 [error] Process #PID<0.11235.55> raised an exception
** (MatchError) no match of right hand side value: nil
(elixir) lib/task/supervised.ex:517: Task.Supervised.stream_monitor_loop/2
Per https://github.com/elixir-lang/elixir/blob/v1.9.2/lib/elixir/lib/task/supervised.ex#L516 it would appear that somehow the failing task doesn't exist among the list of running tasks. The same logic is present on master: https://github.com/elixir-lang/elixir/blob/master/lib/elixir/lib/task/supervised.ex#L543
I apologize for the poor bug report, but this is all the info I have (the error messages simply get dumped in IEx during execution). It's also possible I'm doing something improperly, although I wouldn't expect to be able to trigger an error within Elixir code.
Within the task, I'm doing some database updates with locking so it's very possible that tasks fail due to waiting too long on the DB. (Although no postgrex messages are displayed in IEx at the info
logging level.)
Expected behavior
Not triggering a match error within Elixir code and having access to the DOWN
reason so the underlying issue within my code can be diagnosed.