Kristian
> --
> You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
> To post to this group, send email to selenium-...@googlegroups.com.
> To unsubscribe from this group, send email to selenium-develo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/selenium-developers?hl=en.
>
--
Patrick Lightbody
+1 (415) 830-5488
I fixed it for 2.x clients in
http://code.google.com/p/selenium/source/detail?r=11872
As we know there are some interesting dependencies between
the 2.x server logic and the 1.x server logic, parts of which
caused the resurfacing of the memory leak; so this was fixed - twice ;)
The first time I fixed this bug, I believe I also "observed" this
same leak in the 1.x code, but it was a different code path (alternate
reality?) an I didn't touch it. I was/am a bit short of 1.x test
projects so I haven't really gotten around to fixing it for 1.x .
Kristian
I am a complete newbie here so please excuse any silly assumptions
that I have made... ;-P
I also found that 2.0b2 and 2.0b3 were "leaking" memory in the
logging... so I just wrote a quick hack... not actually knowing the
consequences... ;-P The "leak" would probably not manifest if logging
was turned off.
But I would like to know... what is/are "perThreadTempRecords" used
for? Non-session related log messages?
Regardless, here is the hack... and the server is not leaking
anymore... ;-O
Index: java/server/src/org/openqa/selenium/server/log/PerSessionLogHandler.java
===================================================================
--- java/server/src/org/openqa/selenium/server/log/PerSessionLogHandler.java (revision 12071)
+++ java/server/src/org/openqa/selenium/server/log/PerSessionLogHandler.java (working copy)
@@ -79,6 +79,14 @@
}
records.add(record);
perThreadTempRecords.put(threadId, records);
+ /* XXX. ben. memory appears to *leak* here
+ * just clear()
+ * has the message already been logged? I think so
+ * */
+ if (records.size() > capacity) {
+ records.clear();
+ perThreadTempRecords.put(threadId, records);
+ }
}
}
# watch 'jmap -histo:live 17658 | cut -c6- | sort -n | tail -n20'
On Tuesday, 2011-04-26 at 08:54:07 PM, Kristian Rosenvold scribbled:
*snip*
--
Benjamin Lee mailto:benjam...@realthought.net
Melbourne, Australia http://www.realthought.net
Linux / BSD / GNU tel:+61 4 16 BEN LEE
Open Source "... invest in your world, not a company..."
__________________________________________________________________________
History, n.:
Papa Hegel he say that all we learn from history is that we
learn nothing from history. I know people who can't even learn from
what happened this morning. Hegel must have been taking the long view.
-- Chad C. Mulligan, "The Hipcrime Vocab"
Kristian
Yes, 1.x. I was / am using the Ruby client... from gems
selenium-client-1.2.18
I will move to the 2.x client today! ;-)
Thanks again!
On Thursday, 2011-04-28 at 01:50:24 AM, Kristian Rosenvold scribbled:
> --
> You received this message because you are subscribed to the Google Groups "Selenium Developers" group.
> To post to this group, send email to selenium-...@googlegroups.com.
> To unsubscribe from this group, send email to selenium-develo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/selenium-developers?hl=en.
>
--
Benjamin Lee mailto:benjam...@realthought.net
Melbourne, Australia http://www.realthought.net
Linux / BSD / GNU tel:+61 4 16 BEN LEE
Open Source "... invest in your world, not a company..."
__________________________________________________________________________
Your friends will know you better in the first minute you meet than your
acquaintances will know you in a thousand years.
-- Richard Bach, "Illusions"