Extensions :  K-Meleon Forum
All about K-Meleon extensions. 
adblockplus.dll memory leak
Posted by: disrupted
Date: June 16, 2010 12:10AM

ever since the release of 1.5.x there have been several complaints about memory leaks in kmeleon, unfortunately triggering a war of flaming words between developers/support providers and users with those concerns.

the developers naturally test the browser in its default or nearly default settings, the users have certain extensions installed which will not be installed by default. the developers finding no fault in memory management discarded such complaints, the users could not accept that since they had valid reports about memory leaks

both are right..there is no memory leak in kmeleon and users with the adblockplus extension will suffer from a memory leak.

the culprit here is the abp k-plugin library 'adblockplus.dll'. after several tests i can confirm this bug in the dll.

the leak is not triggered right away but it takes at least half an hour till it becomes noticeable. users complained that this leak did not exist in 1.1.x which confused everybody and sent the testers on the wrong path trying to figure where the problem lies..since the major change in 1.5.x was the adaptation of true tabs so no one suspected it could be a 3rd party plugin esecially that abp was available for 1.1.x and no one complained then about a leak.

the leak is persistent on both versions, however it is has more dramatic effects on 1.5.x in particular for those reasons:
1- intially 1.5.x memory usage is slightly more than 1.1.x, this causes the leak to have more significant affect after a long usage.

2- the layers in 1.1.x ensured that the leak was somewhat under control since every layer had own process limiting the leak for each layer(tab) separately. once that layer was closed the leak was terminated for that layer.

3- the leak becomes disastrous in true tabs since it overrides kmeleon memory management meaning when a tab was closed, the normal management for releasing ram when a tab was closed was halted as the plugin overrides the normal management which what was reported by newuser: http://kmeleon.sourceforge.net/forum/read.php?3,106832

tests for this bug were executed with 1.5.x with and without adp and 1.1.x with and without adp with 1 and 2 tabs/layers for a duartion of 1 hour, 2 hours and overnight(approx 11 hours)

this is the conclusive test showing the memory leak
the first kmeleon instance is 1.5.4 with the adp plugin disabled
the second instance is 1.1.4 with adp plugin enabled
the third instance is 1.5.4 with adp plugin enabled

the test was initiated before the kick off (portugal vs ivory coast), with 2 tabs open for all 3 browsers with the exact websites(kmeleon home and kmeleon forum)..no js or np plugin invoked(normal browsing) and while kmeleon is idling


the second snapshot is taken during half-time(45 minutes)


this was taken 70 minutes into the match


this was taken after the match has ended


the final snapshot was taken 30 minutes after the match(assuming they had to play an extra time)


it's obvious that the memory without adp plugin is constant. with the plugin the memory increases in small bits (20-40kb) every couple of seconds. the accumulating ram is insignificant and hardly noticeable if you use the browser for brief sessions but those little bits increase exponentially with time..meaning after 2 hours the memory usage becomes unacceptable. the unchanged virtual memory is a clear indicator of the leak.

the leak in itself is not severe at least at startup but it's a bad leak especially for a browser like kmeleon where memory handling is a strong and major 'selling' point. but we can't blame the developers because it isn't a browser bug and only official k-plugins are supported and even if, this is clearly a memory leak at os level not at browser level.. nor can we blame palant because he wasn't given feedback about it and he isn't an everyday kmeleon user so he couldn't have found it out. i'm not sure if palant will develop abp for 1.6, he seems reluctant to support kmeleon but just in case he should be notified because the same plugin(with the same bug) can be used and compiled unicodely for 1.6 causing the same problem.

for now, users are strongly advised to disable the abp k-plugin in kmeleon preferences>k-plugins..this will not prevent the extension from working..all ads will be blocked as normal and all your subscriptions will work as usual since the chrome and component parts of adp are responsible for eventlistening/blocking ads and not the k-plugin

what the k-plugin affects is the context menu entries (adblock image/adblock frame) and the status bar icon indicator. the plugin is also responsible for opening the subscriptions page when it's installed for the first time.

the adp extension on kmext has been updated so the k-plugin is disabled by default and this is now the recommended setting for this extension..it's the user choice to enable the plugin if they wish for the addiitonal features which i think are not that essential and trivial compared to what could be prevented..i will try to work on a macro that adds adblock image/frame menu commands and link them directly to the compose.xul without the need for the k-plugin

special thanks to newuser and eugene miele for reporting and persistence

(tilte edited)



Edited 1 time(s). Last edit at 06/16/2010 12:55AM by disrupted.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: guenter
Date: June 16, 2010 01:17AM

@disrupted, I can see no reason to thank Mr. Eugen Mezei.

I thank YOU for finding the reason for the leak!

And I thank Wladimir Palant for including K-Meleon in his extension's supported list. He suggested already that K-Meleon users should take over the care for the port. Probably best to do a kmm instead of the dll. Kmm cannot leak smiling smiley

p.s. Mr. Eugen Mezei came here, claimed that K-Meleon had a major memory leak, when he himself had installed an insufficiently tested 3rd party extension.

He had claimed that he was capable in IT. He belittled the knowledge of a person that does K-Meleon support here for more than 6 years because that person could not reproduce his so called "K-Meleon memory leaks".

This will certainly not encourage further support.



Edited 2 time(s). Last edit at 06/16/2010 07:36AM by guenter.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: siria
Date: June 16, 2010 01:28AM

Same as Guenter here.
Great job disrupted! Especially seeing that YOU did not have that problem yourself, so such stuff is getting nearly impossible to figure out!
Hardly without any help from those who have it but only complain and offend, instead of a bit testing. As far as I see everyone who comes here with strange problems that no one else can reproduce, is told to test with a new profile and if it doesnt help with a native and unchanged download of K-Meleon. This would have shown instantly that KM itself does not produce that problem, and it would have been rather easy to find the 'culprit' by adding the users customizations one by one and then check again. But no, who would expect a bit testing from people who claim themselves as IT pros, doing nothing and instead only attacking seems much more fun mad smiley

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: SoerenB
Date: June 16, 2010 03:41PM

Quote
siria
But no, who would expect a bit testing from people who claim themselves as IT pros, doing nothing and instead only attacking seems much more fun mad smiley

Gut gebrüllt, Löwe, oder auch:

Full ACK

PLUS Thanks a lot, disrupted, from me, too!

Cheers
SoerenB

is: I'm back, on wine in some (!) linuxes - speaking of addiction ...

was: No more own machines, because of addiction.
Don't know when I'll be back to normal ...



Edited 1 time(s). Last edit at 06/16/2010 03:43PM by SoerenB.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: desga2
Date: June 17, 2010 02:54AM

Great work disrupted!

I never used adblockplus and for this reason I never noted this memory leak in K-Meleon.

K-Meleon in Spanish

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: ndebord
Date: June 17, 2010 07:51AM

disrupted,

Is this the adp plugin you are referring to?

=========

Privacy & Security Extensions


AdBlockPlus

a content-filter based extension to remove image or flash advertisements from websites by using an up-to-date and constantly maintained filter-subscriptions.
menu entry: edit>configuration>adblockplus
extra notes: extension uses components. please read FAQ for install help.
versions supported: 1.1.x - 1.5.x

===========

Tks

N

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: disrupted
Date: June 18, 2010 12:46AM

yes, that's the extension..what i mean by plugin is the k-plugin adblockplus.dll, it's the one with the memory leak. the rest of the extension doesn't have any problems..just disable the k-plugin in prefeneces>k-plugins and uncheck the adblockplus.dll from the list and restart kmeleon.

disabling the k-plugin will not prevent the extension from working and will still be fully fnctional..all blocking will work as normal and you can still add subscriptions and custom filters from(edit>configuration>adblock plus). some features will be removed like statusbar icon and toolbar icon when the k-plugin is disabled. apart from the status bar icon..other features can be added with macro , hopefully soon will be updated with a macro compensating for the kplugin.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: guenter
Date: June 18, 2010 04:06AM

AFAIK toolbar icon is possible via kmm. Dispense with the status bar icon.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: ndebord
Date: June 20, 2010 07:46PM

Quote
guenter
AFAIK toolbar icon is possible via kmm. Dispense with the status bar icon.

Guenter,

Thanks much, I've zipped up the offending file for now and will look into a toolbar icon in Early Blue's Privacy Bar.

N

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: forever
Date: June 21, 2010 07:30AM

thank u so much disrupted

i wondered why my memory increased to 300 MB

after disable the plugin it stays at approximately 55 MB

thats a big difference ;)

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: Wladimir_Palant
Date: June 24, 2010 12:28AM

Fortunately, somebody mentioned this issue in a mail that was dealing with a different topic - nobody bothered to report this issue to me. I am looking into this, tracking down memory leaks with the Task Manager as the only tool available is tricky unfortunately. Once the issue is fixed I will re-release Adblock Plus 1.0.2 for K-Meleon.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: guenter
Date: June 24, 2010 12:57AM

Quote
Wladimir_Palant
Fortunately, somebody mentioned this issue in a mail that was dealing with a different topic - nobody bothered to report this issue to me.

AFAIK it was tried to get Your attention (kargas=disrupted posted IMHO in Your forum).

disrupted and jsnj have been re engineering as much of the leaking dll as they could using K-Meleon native techniques and autoit.

Some info by You could probably help them.

And what is already done could perhaps make it easier to fix the leak.
With luck it can replace the part that causes the leak.

My perhaps naive wishful thinking smiling smiley



Edited 1 time(s). Last edit at 06/24/2010 01:01AM by guenter.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: Wladimir_Palant
Date: June 24, 2010 01:03AM

Ah, if kargas=disrupted then he was the one who sent the mail smiling smiley It was mistakenly marked as spam which is why I only saw it today.

Anyway, turns out I already found the leak several hours ago, this is it: https://hg.adblockplus.org/adblockplus/rev/f31040367dc5. I could still see memory increasing over time but that's simply effects of increased memory fragmentation due to Adblock Plus. The memory use will reach a stable level eventually. Memory fragmentation should hopefully get better in K-Meleon 1.7, Gecko improved a lot in this area.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: Wladimir_Palant
Date: June 24, 2010 01:21AM
Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: guenter
Date: June 24, 2010 04:26AM

Thx.

p.s.

Quote
Wladimir_Palant
It was mistakenly marked as spam which is why I only saw it today.

Spam defence results in a lot of problems. sad smiley

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: ndebord
Date: June 24, 2010 04:54AM

Quote
Wladimir_Palant
Here is the official announcement: https://adblockplus.org/releases/adblock-plus-102-for-k-meleon-re-released

Wladmir,

Thanks for the prompt update.

Much appreciated.

N

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: snuz2
Date: June 27, 2010 03:22AM

I have installed the rerelease and I've got problems with the ABP toolband, can't move it. Can be hidden though, wait scratch that, can't hide it either... I informed Wladimir.

I am thinking of writing a "translator" to convert ABP block lists ( subscriptions like EasyList ) from 1.2 to 1.02 format. Some things will have to be lost, but at least we will have something fairly recent. Any thoughts? someone already does this?

Propose moving this thread to General area or Extensions, it's not a KM bug.



Edited 1 time(s). Last edit at 06/27/2010 03:23AM by snuz2.

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: VNK
Date: July 01, 2010 02:34PM

Quote
guenter
AFAIK toolbar icon is possible via kmm. Dispense with the status bar icon.
Can you please tell me how to enable ABP toolbar icon via kmm?

Options: ReplyQuote
Re: adblockplus.dll memory leak
Posted by: desga2
Date: July 03, 2010 03:14AM

Quote
VNK
Quote
guenter
AFAIK toolbar icon is possible via kmm. Dispense with the status bar icon.
Can you please tell me how to enable ABP toolbar icon via kmm?

Read this other thread in forum.

K-Meleon in Spanish

Options: ReplyQuote


K-Meleon forum is powered by Phorum.