I thought it was a pypy problem because it usually happened there so I upgraded the pypy version we use in travis. However it, apparently, also happens in regular python 2.7 it's just much rarer
See:
The pypy and python 2.6 tests went well and then it deadlocked in python 2.7
Any ideas? Could it be because of sqlite? subprocess.call doesn't pipe so it shouldn't deadlock. Could it be travis running the scheduler process on really really low priority?
The only thing I can think off is to make the scheduler run on verbose so it keeps writing stuff and the build doesn't timeout.