I can reproduce this bug on latest master. The problem is that if a check command takes a long time, the following can happen: 1. The user modifies the buffer, making flymake-proc start a process A which reads from a temporary file T containing the buffer content. 2. Before process A has finished, the user modifies the buffer again, making flymake-proc start a new process B reading from the same temporary file T. 3. A is marked as obsolete. 4. When A's sentinel detects that A has died, it runs A's cleanup function which deletes T. 5. B may fail since T is gone. Attached is a patch which solves the issue, at least for me: simply don't run the cleanup function for an obsolete process. This should work well for checks that use flymake-proc-simple-cleanup or one of the other cleanup functions defined in flymake-proc.el. I'm not sure if the fix is appropriate for the general case with a user-supplied custom cleanup function, though. But I see no other quick fix for the issue since the name of the temporary file is kept in a single buffer-local variable and there is no way for the cleanup function to know that it's being called for an obsolete process. -- Joel