Creo que esta podría ser una forma más sencilla de alcanzar tu objetivo:
SELECT
start_log.name,
MAX(start_log.ts) AS start_time,
end_log.ts AS end_time,
TIMEDIFF(MAX(start_log.ts), end_log.ts)
FROM
log AS start_log
INNER JOIN
log AS end_log ON (
start_log.name = end_log.name
AND
end_log.ts > start_log.ts)
WHERE start_log.eventtype = 'start'
AND end_log.eventtype = 'stop'
GROUP BY start_log.name
Debería ejecutarse considerablemente más rápido, ya que elimina una subconsulta.