Unladen Swallow

I recently Ding!ed committer for Unladen Swallow 8-)

I’m currently trying to teach Unladen to recompile functions. This turned out to be more complicated than I anticipated.

There is one especially obscure ‘bug’. Enabling recompilation makes the subprocess module tests hang, but only if it is executed after the pickle tests. The hanging test tries to start a none-existent program around 2000 times. The subprocess module forks and tries to exec the command in the child process. If an exception occurs, it is pickled and send back to the parent via pipes.

Executing the pickle tests makes two functions considered hot and some command in the child process triggers a recompilation of these two functions.

Apparently the invocation of the JIT leads to a lot of memory being duplicated, which slows down the child process considerably.  Ugh.



Leave a Reply