For process definitions with certain combinations of periodic timers and messages, jobs are not removed from the DB and are subsequently tied to an execution representing the wrong activity in the process. Alternatively, the jobs are left in the DB and fail by throwing an NPE due to the Execution having already been removed from the DB.
In the former case, the timers continue to fire throughout the lifetime of the process even though the activity that spawned the timer has been completed. In the latter case, the logs are littered with exceptions (3 per job), but at least the timers stop firing after the retries are exhausted.
Pull request URL and further details regarding the pull request will be provided in the comments.
Postgres, OSX, Debian