PhantomJS Crashes consistently with bus error 10 #14388
Comments
Tried on a different OSX and noticed that the line: works once, and then any subsequent runs produce the crash from then on. This was also duplicated on Ubuntu: Same result: first run works fine, subsequent runs produce a segmentation fault with a core dump. |
Issue remains post reboot! |
Closed by mistake! |
Unless you can dig into this with a debug build and run through the stack trace and figure out exactly what is causing the crash, it's unlikely that this will get fixed. Tsk, tsk... running PhantomJS in production; you should know better! ;) This is a small, community-maintained project with basically no active maintainers (those who do contribute, do so on their own agenda, and rarely look at issues unless it affects them in their workload). You won't find much support here I'm afraid. Anyway..... if you were using the Selenium interface to PhantomJS, you could have easily swapped out PhantomJS for something better, like jBrowserDriver (uses the Java VM's built-in webkit engine), or temporarily swap in a "headed" browser like Firefox just to get your work done. For your own sanity I would recommend you investigate porting your work over to Selenium ASAP. Even if you end up using Selenium with PhantomJS via GhostDriver, in the long run you'll benefit by being able to swap out PhantomJS for something else with minimal code changes. |
Agree on all points - the original plan was to integrate our tools directly using WebDriver to talk to any target browser we like, but as ever, time can always be better spent elsewhere. Anyway, I actually have pinned this issue down exactly, and have fix for this in place, so once I've finished testing I'll update the issue. It appears that the issue has something to do with the ApplicationCache.db file - there are entries in there that do not match files on the FS, so I think its crashing there - clearing the tables (or even better, I'm hoping to use --disk-cache-path to specify a file I can delete after each request) appears to magically spring phantomjs back to life. I should note that we do NOT want any caching of any kind occurring as we use our own huge systems cache, so I appreciate this fix may not be appropriate for everyone |
I've found a non-breaking fix for those who are happy to disable the PhantomJS cache to get this working. Simple run the following sqlite queries on the ApplicationCache.db. The location of this file differs depending on your OS: OSX: Ubuntu: The following SQL deletes all entries from the cache, and adds triggers which prevent new entries being added to the cache. This effectively stops the crashing.
|
You can simply disable cache by command line parameter: I checked, I deleted the cache directory, and it is not created again. With this parameters. |
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution! |
phantomjs --version
.2.1.1
$ phantomjs --debug=true netsniff.js https://www.hertz.com/
Crashes for any url on the above domain
OSX El Capitan v10.11.5
Binary I think (maybe homebrew)
Couldn't produce a stack trace but have attached the crash dump.
hertz-crash-output.txt
phantomjs_2016-07-04-151957_C07JVKD6DWYL-2.crash.zip
The text was updated successfully, but these errors were encountered: