On linux, arduino-1.8.8-teensyduino-1.45, my teensy was working until today when I kept getting
Opening Teensy Loader...
Unable find Teensy Loader. (p) Is the Teensy Loader application running?

I restarted arduino-teensy, still no dice.
Then I tried to start /var/local/arduino-teensy/hardware/tools/teensy and it exited right away.

Strace finally gave me the clue:
stat("/tmp/instance-Teensy-merlin", {st_mode=S_IFREG|0600, st_size=5, ...}) = 0
getuid() = 500
openat(AT_FDCWD, "/tmp/instance-Teensy-merlin", O_RDONLY) = 5
read(5, "4512\0", 256) = 5
kill(4512, SIG_0) = 0
close(5) = 0
getpid() = 19478
exit_group(4294967295) = ?

saruman:/var/local/arduino-teensy/hardware/tools$ cat /tmp/instance-Teensy-merlin
4512

I didn't have anything with that PID, but eventually I just ran
saruman:/var/local/arduino-teensy/hardware/tools$ rm /tmp/instance-Teensy-merlin

and now things work again.
Stale lock file code seems buggy, but even then, checking that the PID exists doesn't mean anything, another process could just use it if you're not lucky
Is it possible to try talking to the arduino gateway code and just remove the lockfile if it's stale?