Sporadic phantomjs crashes
[email protected] commented:
Which version of PhantomJS are you using? Tip: run 'phantomjs --version'. 1.7.0
What steps will reproduce the problem?
- Open several phantomjs process concurrently and use them through the nodejs-phantom bridge. PhantomJS should however not crash.
What is the expected output? What do you see instead? The url is not loaded, I see an error message instead
Which operating system are you using? centos 5 - 2.6.32-279.22.1.el6.x86_64
Did you use binary PhantomJS or did you compile it from source? binary
Disclaimer: This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #1115. :star2: 2 people had starred this issue at the time of migration.
[email protected] commented:
Which version of PhantomJS are you using? Tip: run 'phantomjs --version'. 1.8.2
I retried with phantom 1.8.2, it still appears to crash under the same circumstances although I can't be sure about the reason behind.
I get lots of random crashes from phantomjs due to an out of date webkit. There was some bug (I can't find now) that has been eliminated by re-writing some of the CSS styling code. This may or may not be fixed in qt5 but it didn't make it into the last qt4 release.
Typical example partial stack dump:
Thread 0 (crashed) 0 phantomjs!WTF::RefPtrWebCore::StyleImage::get [RefPtr.h : 60 + 0x4] rbx = 0x00007f56bfc87300 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x0000000000572cba rsp = 0x00007fff73bf9160 rbp = 0x00007fff73bf9160 Found by: given as instruction pointer in context 1 phantomjs!WebCore::FillLayer::image [FillLayer.h : 68 + 0xf] rbx = 0x00007f56bfc87300 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x000000000055f496 rsp = 0x00007fff73bf9170 rbp = 0x00007fff73bf9180 Found by: call frame info 2 phantomjs!WebCore::CSSStyleSelector::loadPendingImages [CSSStyleSelector.cpp : 7053 + 0xe] rbx = 0x00007f56bfc87300 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x00000000005f3c39 rsp = 0x00007fff73bf9190 rbp = 0x00007fff73bf93e0 Found by: call frame info 3 phantomjs!WebCore::CSSStyleSelector::styleForElement [CSSStyleSelector.cpp : 1504 + 0xe] rbx = 0x00007f56bfc87300 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x00000000005d20ab rsp = 0x00007fff73bf93f0 rbp = 0x00007fff73bf9560 Found by: call frame info 4 phantomjs!WebCore::Node::styleForRenderer [Node.cpp : 1624 + 0x3f] rbx = 0x0000000000000001 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x000000000067a191 rsp = 0x00007fff73bf9570 rbp = 0x00007fff73bf95b0 Found by: call frame info 5 phantomjs!WebCore::NodeRendererFactory::createRendererAndStyle [Node.cpp : 1553 + 0x16] rbx = 0x00007f57120576a8 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x0000000000679e75 rsp = 0x00007fff73bf95c0 rbp = 0x00007fff73bf9610 Found by: call frame info 6 phantomjs!WebCore::NodeRendererFactory::createRendererIfNeeded [Node.cpp : 1592 + 0xb] rbx = 0x00007f57120576a8 r12 = 0x00007f57120576a8 r13 = 0x00007fff73bfa930 r14 = 0x0000000000000000 r15 = 0x0000000000000000 rip = 0x000000000067a07c rsp = 0x00007fff73bf9620 rbp = 0x00007fff73bf9650 Found by: call frame info
Found the bug in question: https://bugs.webkit.org/show_bug.cgi?id=46224
It should be noted that the fix attached to that bug isn't the final fix that completely got rid of this issue. It's just the most interesting discussion about it.
Can you try it again with PhantomJS 2.1?
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!