Fatal python error with threaded unit test

Issue #583 resolved
Mike McLean created an issue

I get this scary error when running coverage through nosetests on python3

Fatal Python error: deallocating None

More details and replication bits here: https://github.com/mikem23/replicate-coverage-bug

Comments (7)

  1. Ned Batchelder repo owner

    Can you verify what version of coverage.py you are using? I recently fixed a "deallocating None" bug in 4.3.2. The output of "coverage debug sys" will show the details.

  2. Mike McLean reporter

    The test in question simply runs a bunch of do-nothing threads in parallel, and repeats this several times.

    def test_threading(self):
        """Make a bunch of threads"""
        for i in range(20):
            threads = [threading.Thread(target=noop, args=()) for _ in range(100)]
            for t in threads:
            for t in threads:

    Tweaking those numbers (# threads, # loops) affects the likelihood of hitting the issue.

  3. Log in to comment