Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Somehow fix the killing of actors in Java
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 3 Sep 2018 07:20:56 +0000 (09:20 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 3 Sep 2018 07:20:56 +0000 (09:20 +0200)
commitd535c50c617ba838b99de4bd251a6ac076774d00
tree59da838327a3e08554a0f2abf8d0592077d72ee3
parent609ba683d48cc9eb7570548635e0b6218c57a747
Somehow fix the killing of actors in Java

Things are somehow fixed, as all tests seem to pass, but the situation
is still very messy after this commit. Contents:

- Reimplement ContextJava as subclass of ContextThread to reduce duplication.
- Don't send the StopRequest exception on host failure if we are in
  Java because *some* of the actors don't catch it well, resulting in
  simulation failure.
- Forcefully kill the process ("exit(0)" in C) after MSG_run() because
  dead actors are sometimes not completely killed, preventing the
  simulation from ending.

See the comment in ActorImpl for a better understanding of this mess
and how to fix it in the future.
36 files changed:
ChangeLog
examples/java/app/bittorrent/app-bittorrent.tesh
examples/java/app/centralizedmutex/app-centralizedmutex.tesh
examples/java/app/masterworker/app-masterworker.tesh
examples/java/app/pingpong/app-pingpong.tesh
examples/java/app/tokenring/Main.java
examples/java/app/tokenring/app-tokenring.tesh
examples/java/async/dsend/async-dsend.tesh
examples/java/async/waitall/async-waitall.tesh
examples/java/async/yield/async-yield.tesh
examples/java/cloud/masterworker/cloud-masterworker.tesh
examples/java/cloud/migration/cloud-migration.tesh
examples/java/dht/chord/dht-chord.tesh
examples/java/dht/kademlia/dht-kademlia.tesh
examples/java/energy/consumption/Main.java
examples/java/energy/consumption/energy-consumption.tesh
examples/java/energy/pstate/energy-pstate.tesh
examples/java/energy/vm/energy-vm.tesh
examples/java/io/file/io-file.tesh
examples/java/io/storage/io-storage.tesh
examples/java/process/kill/process-kill.tesh
examples/java/process/migration/process-migration.tesh
examples/java/process/startkilltime/process-startkilltime.tesh
examples/java/process/suspend/process-suspend.tesh
examples/java/task/priority/task-priority.tesh
examples/java/trace/pingpong/trace-pingpong.tesh
src/bindings/java/JavaContext.cpp
src/bindings/java/JavaContext.hpp
src/bindings/java/jmsg.cpp
src/bindings/java/jmsg_process.cpp
src/bindings/java/org/simgrid/NativeLib.java
src/kernel/context/ContextThread.hpp
src/simix/ActorImpl.cpp
src/simix/smx_context.cpp
teshsuite/java/semaphoregc/semaphoregc.tesh
teshsuite/java/sleephostoff/sleephostoff.tesh