PyLint not terminating, leaving orphaned pylint and lintcmd processes

Hey folks!

I have my Python lintcmd set to the Wiki’s recommendation, set-option window lintcmd %{ run() { pylint --msg-template='{path}:{line}:{column}: {category}: {msg_id}: {msg} ({symbol})' "$1" | awk -F: 'BEGIN { OFS=":" } { if (NF == 6) { $3 += 1; print } }'; } && run }

To lint my code, I also have

hook global BufWritePre .*\.py %{
  lint
}

However I noticed that after a day or so of coding I would have dozens of orphaned pylint processes and lintcmd scripts which were consuming memory.

The quick fix was easy, just use timeout 5 pylint instead of pylint, but that’s just a patch. The root of problem seems to be that when pylint is using astroid to parse the code, it gets into an infinite loop while astroid’s transformer is walking code’s tree here I havent been able to reproduce outside of Kakoune, but I’ve found that invoking pylint directly on the temporary file of an orphaned lintcmd will hang as well.

I’m curious if anyone else has experienced this before?

Oh, one additional weirdism is that while separately running pylint /path/to/lintcmd/tmp/file.py will fall into the infinite loop, invoking pylint on a copy or link of the file will not fall into the loop. A symlink will still hang, however

sounds like a bug in astroid