Environment Trac 0.12 (Bitten 0.6)
I'm running into an issue where build#1 is started on slave#1, then slave#2 asks for a build triggering reset_orphaned_builds() before build#1's last_activity time has been populated(still showing 0), which causes build#1 to go back into pending.
Not sure how long it takes for the last_activity time to be updated, but since you never know when reset_orphaned_builds(), should last_activity be updated before/as a build is started?