- There is a sigsegv that is only visible when amule runs in gdb. Up to this everything is fine, only after this aMule creates events like mad and eats up all the mem.
I'm not seeing this sigsegv, and I'm running gdb all the time. I did see it but was due some bad interaction of connections getting dropped
Try it yourself, get a lot of downloads so you are able to download at very high speed, then limit amule to 10Kb/s download. See what happens.
- Your theory says in short, network events are still created, but not processed anymore. This would mean incoming data (plus a little overhead) would be stored in RAM instead of being flushed to disk.
My debugging shows that millions of events are being created and that no wx event processing takes place. The memory is being eaten by the events itself (see OnRequest in wx sources, socket.cpp and the code of AddPendingEvent). Indeed, a wxSocketEvent has quite a small memory footprint and uses not network data. The network data is store in kernel buffers.
Well, the oom happens within a very short time after things start going wrong. Memory is eaten up much faster than you could download.
Memory is eaten by wxSocketEvent objects. From my last crash: number of pending events: 1326118478.
And even if you are on a high speed line - if processing stops, no new blocks are requested from sources, and everything comes to a screeching halt.
Of course, when the OOM starts amule is not responsive, the app is trapped a loop. Indeed as you said, the OOM takes place in a very short time, it fills my 8Gb RAM in about 20/30 seconds. Indeed, log stops responding, etc...
Let me clarify that I have verified with debugging all what I said. What I'm not so sure is why glib never calls their idle handler anymore, I guess that is because 100% cpu use, but I'm not sure. However I have checked that this is what happens, my debugging shows g_main_iterate_context polling and creating new sockets events continuosly.
- Where does the influence of the Kernel change fit into the picture?
I can reproduce this with old kernels and all wx versions.
BTW, the patch doesn't work
