Comments (18)
I also see this problem on Ruby 1.9.2 p0.
from akephalos.
And ruby 1.9.2p180, and Spork 0.9
from akephalos.
It seems to be a problem with garbage collection. I tried setting the minimum memory for the VM to be 512 MB in order to minimise Garbage collection (the default is 64 mb). But the results are the same, all test fails with the recycled object error.
Upgrading to the last jruby-jar didn't solve the problem either (but hey, all akephalos' tests pass).
I tried disabling GC, but being JRuby the statement GC.disable doesn't do anything.
Mmm....
from akephalos.
doesn't help much, but I can confirm the problem for ruby 192p180, spork 084
--Frank
from akephalos.
I can also confirm the problem with akephalos 0.2.5 and spork 0.9.0.rc4
from akephalos.
I too can see this issue, Ruby 1.9.2, Spork 0.9.0.rc4, Akephalos 0.2.5
from akephalos.
Let wait for @bernerdschaefer insight :)
from akephalos.
Also have this issue on Ruby 1.9.2 spork 0.9.0.rc Akephalos 0.2.5
from akephalos.
Any ideas on this? I would be happy to delve in if someone has a place to start. Seems like a GC issue but I defer to the experts.
from akephalos.
It is a problem with the GC. Akephalos uses HTMLUnit, which runs on JRuby. I suspect that some object is being garbage collected in the JRuby part. But I haven't figure it out where and I am no an expert at JRuby either :)
I have tried increasing the available memory that the java virtual machine can use, but the problem persists.
from akephalos.
I will take a look into this over the next week during my free time.
from akephalos.
I'm totally new to akephalos and never used spork but this type of error can occur with DRb if the DRb server creates an object, doesn't keep a reference to it, and a client doesn't immediately request it. The server will GC the object and the client will get another object after the GC. The server side might need to keep a class variable hash (which won't be GC'd) with references to an object at creation and remove it when the client requests it. Either that, or don't instantiate transient objects until they're requested. You would have to see where the DRb objects are instantiated, in akephalos or in spork, and actually used.
from akephalos.
Great hint. I will boot up a new rails 3 app tonight to see if I can figure out what specifically is being GC'd then requested.
from akephalos.
@lightsofapollo: How did it go? Any improvements?
from akephalos.
Nothing yet, still working on it. Taking some time off in three weeks. I will be able to focus more on it then if I don't figure it out in my spare time before then. Like your fork by the way.
from akephalos.
I don't think this is a GC issue - the issue appears to be that when test codes talks to akephalos' remote drb object it uses the wrong uri when constructing proxy object for blocks, so ruby then tries to invoke the block in the spork parent process rather than the process actually running the features/specs (note that in the backtrace the error is thrown from druby://127.0.0.1:8989 which is the uri for the service spork advertises).
I've put a longer discussion along with a workaround that works for my cucumber specs at http://spacevatican.org/2011/7/3/sporking-with-akephalos
from akephalos.
@fchenung: Good work!
from akephalos.
@fchenung: Excellent Job. Nice write up too.
We should add this to the docs of Spork in the short term.
from akephalos.
Related Issues (20)
- encoding problem HOT 1
- Cucumber scenario fails with spork and akephalos HOT 3
- page.evaluate_script('window.history.back()') does nothing
- No such file or directory - java (Errno::ENOENT) HOT 1
- javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated (NativeException) HOT 3
- Connection refused on AWS works fine locally on osx and Linux HOT 3
- 60 second startup time HOT 1
- Unix Domain Sockets
- com.gargoylesoftware.htmlunit.ScriptException: Unexpected exception occurred while parsing HTML snippet: Property 'http://cyberneko.org/html/properties/balance-tags/fragment-context-stack' is not recognized. HOT 2
- OutOfMemoryError error HOT 1
- Unable to click delete link with confirm prompt HOT 1
- How to replace `switch_to` HOT 2
- java.lang.OutOfMemoryError HOT 5
- POST variables end up as GET variables HOT 2
- random but specific crash HOT 8
- multiple submits to/from same page only submit the first time HOT 5
- Capybara 1.0 compatibility HOT 2
- dom tree leaves end up on the wrong branches HOT 1
- MooTools Request not being submitted HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akephalos.