When ThreadPool self-prunes after a thread is idle for 10 minutes that thread is ended but not joined. This leaves a large amount of stack behind (8MB per thread in my machine). This turns into a large memory leak very quickly, especially hitting the limits of VIRT allocation.
How to reproduce:
1. Run the attach script (requires tpch1 lineitem table)
2. Get the pid of ExeMgr (25001 in this example)
3. Get the output of ulimit -s (8192 in this example)
4. Run the following replacing the values above where appropriate:
5. Run the following replacing the values above where appropriate:
6. You should note the two numbers are very similar. Only 1 or two apart
7. Wait > 10 minutes
8. Do steps 4 and 5 again. You should notice the two numbers are now very different. This indicates a thread stack memory leak.