Skip to content

Commit

Permalink
Slightly relax logger semaphore threshold.
Browse files Browse the repository at this point in the history
Rather than possibly deadlocking, we reset the logger semaphore if it appears
to be in a bad state. This means it's possible that incorrect interleaving
could occur in the log file. We accept this tradeoff for not deadlocking a
process.

We attempt to make the threshold high enough to avoid spurious failures but
not high enough to lock up a process too long because a Thread may write to
the log when the process is trying to checkpoint for eg garbage collection.
  • Loading branch information
brixen committed Jun 13, 2016
1 parent ddf9703 commit 2f04021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion machine/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace rubinius {
class SemaphoreLock {
sem_t* semaphore_;

const static uint64_t cLockLimit = 500000000;
const static uint64_t cLockLimit = 1000000000;

public:
SemaphoreLock(sem_t* semaphore)
Expand Down

0 comments on commit 2f04021

Please sign in to comment.