[2.7] bpo-25872: fix KeyError on race in linecache.checkcache() by cunkel · Pull Request #12061 · python/cpython
If two threads generating a traceback run checkcache() at the same time,
they may both try to delete the same entries in the line cache,
resulting in a KeyError in one. Use .pop(filename, None) instead of
del, as it will not raise the KeyError.