I realized the cause... apparently, A lot of threads get created before they can even be destroyed. This means, that in Linux, thread creation does _NOT_ obey the maximum number of threads limited.
So, in plain terms, this whole thread business has to be reengineered. What I'm going to do, is NOT deleteing the threads when they finish their job. Instead, they're moved back into the "available threads" store, so they can perform their job, without having to create new threads. I really hope this can get rid of all the codecompletion crashing.
Oh, I realized why it crashes on config. It creates sample classes by doing a "mini-parsing" stage. This triggers the problem again, and the crashes happen.