| Summary: | Eclipse crashes with a seg fault when using WebKit (while the Google Talk plugin is installed) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Ian Bull <irbull> | ||||
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> | ||||
| Status: | CLOSED NOT_ECLIPSE | QA Contact: | Grant Gayed <grant_gayed> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | adietish, akurtakov, alkazako, arunkumar.thondapu, dgolovin, eclipse.felipe, eric.sirianni, germano.massullo, hendy, janek.lb, jni.viens, kdevolder, kingjon3377, Lars.Vogel, legume1, mail, martin.monperrus, martin, matthias.mailaender, mattias.eriksson, mike, mknauer, p91paul, peter, remy.suen, stryker, swagiaal, tamsler, vadim.peretokin | ||||
| Version: | 3.7 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=433606 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Ian Bull
It doesn't mean anything to me. Grant, have you ever seen this before ? No, but I suspect it's WebKitGTK having a problem. I think your plug-in would also fail in 3.6 if you launched eclipse with additional vm arg -Dorg.eclipse.swt.browser.UseWebKitGTK=true . Does the Internal Web Browser view work for you? -> if not, which linux distro are you running on? -> if so, what is your plug-in trying to show in the Browser when it crashes? (In reply to comment #2) > No, but I suspect it's WebKitGTK having a problem. I think your plug-in would > also fail in 3.6 if you launched eclipse with additional vm arg > -Dorg.eclipse.swt.browser.UseWebKitGTK=true . > > Does the Internal Web Browser view work for you? > -> if not, which linux distro are you running on? > -> if so, what is your plug-in trying to show in the Browser when it crashes? Sorry guys, I ended up forcing SWT.MOZILLA and the problem went away. However, today I thought I would try webkit again, and still no luck. I spent the better part of the day trying to understand what's going on, and I really got nowhere. Some things I noticed: SWT.MOZILLA problem doesn't happen SWT.NONE (default to webkit) the whole Eclipse / RCP crashes It doesn't necessarily happen when I'm showing something in the browser. Simply having the browser open and clicking on other buttons causes it. I wasn't able to produce a self contained snippet :-(. I think there must be something going on at a lower level. For example, my plug-in uses HTTPClient (1.4), so maybe there is something happening at the network level between Webkit and HttClient (although I tried to create a snippet that did that too). I'm using webkit 1.2.5. If you have any other suggestions on how I can help debug this issue (flags I can enable) please let me know. I tried to get WebKit 1.4 and compile it from source, but that experiment failed misserably :-(. This is helpful info, but of course is difficult to investigate without a means of reproducing it. From the description it could be a problem in WebKitGTK or its libsoup dependency. I did some more hacking on this, and it appears to happen after I send some Http Post request using Apache HttpClient 4.x. After this, the Webkit seg faults. It also depends on what's in the post request (or at least how big it is).
After I upgraded my system, the problem went away. (I'm not sure which libwebkit I'm using now, I appear to have two installed):
libwebkitgtk-3.0.so.0 -> libwebkitgtk-3.0.so.0.6.0
libwebkitgtk-1.0.so.0 -> libwebkitgtk-1.0.so.0.6.0
What's also interesting is that the console output happens long before the crash. It appears that whatever version crashes, also prints a bunch of debug output too.
I doubt there is much we (eclipse) can do here. I guess we can leave this bug report around to see if others experience this too.
If this now works following a system upgrade then this should be closed. It's not obvious whether there was an explicit fix made that fixes this case as a side effect or not, but regardless, the behaviour is coming from outside of Eclipse. Closing as NOT_ECLIPSE. *** Bug 352819 has been marked as a duplicate of this bug. *** *** Bug 362416 has been marked as a duplicate of this bug. *** FWIW, I have managed to find a 'solution' to this problem. I realized that this only happens (for me at least) if I load an image URL into the browser. If I wrap the image in an <img src... tag, and load that, it doesn't appear to crash. Ok, maybe solution is the wrong word, but it appears I may have a workaround (fingers crossed). I hate to add a 'me too' without much new information. But I guess at least its another datapoint that Ian is not alone :-) I get almost exactly the same error as Ian when I use Eclipse 3.8 internal web browser view and point it at a website like http://www.springsource.org/ The internal web-browser is quite simply unusable for me. It invariably crashes Eclipse within a minute or two of opening on *any* non-trivial website. It seems ok however on very plain looking html content with not much fancy markup or images. I'm on a rather old version of Linux (Ununtu 10.04) so I will try an upgrade to see if it changes anything. I'll post a follow up after that. ** (Eclipse:15242): DEBUG: NP_Initialize ** (Eclipse:15242): DEBUG: NP_Initialize succeeded No bp log location saved, using default. [000:000] Browser XEmbed support present: 1 [000:000] Browser toolkit is Gtk2. [000:000] Using Gtk2 toolkit No bp log location saved, using default. [000:000] Warning(optionsfile.cc:47): Load: Could not open file, err=2 [000:000] No bp log location saved, using default. [000:001] Warning(optionsfile.cc:47): Load: Could not open file, err=2 [000:001] No bp log location saved, using default. [000:001] Browser XEmbed support present: 1 [000:001] Browser toolkit is Gtk2. [000:001] Using Gtk2 toolkit ** (Eclipse:15242): DEBUG: NP_Initialize ** (Eclipse:15242): DEBUG: NP_Initialize succeeded ** (Eclipse:15242): DEBUG: NP_Initialize ** (Eclipse:15242): DEBUG: NP_Initialize succeeded ** (Eclipse:15242): DEBUG: NP_Initialize ** (Eclipse:15242): DEBUG: NP_Initialize succeeded Segmentation fault I've got the same issue with Eclipse 4.2.2. But I'm still on the same old version of Linux (Ubuntu 10.04). Happy to report that internal web browser seems quite stable after upgrading ubuntu to 12.04.
Although at first it didn't start up at all with a cryptic "no more handles". That problem was solved by doing this:
sudo apt-get install libwebkitgtk-1.0-0
Answer found here:
http://stackoverflow.com/questions/12125044/open-eclipse-juno-with-error-no-more-handles-in-ubuntu-12-04
Just to add yet some more info. I have to revoke my previous comment. The problem goes away... but it comes back when one installs google talk plugin (i.e. setup one's machine to use google hangouts). The only solution that works for me on Ubuntu 12.04 is use a manually downloaded XUlRunner 10.x.x and make Eclipse use that by setting the system properties as explained SW FAQ in my eclipse.ini. On Ubuntu 13.04 there is no workable solution that I have found because the XUlRunner 10.0.2 doesn't work at all and just crashes (I guess it is just too old and no longer compatible with whatever native libraries ship with 13.04). I hate to be 'alarmist' but feels like the embedded browser situation is deteriorating: - Ubuntu 10.04: works out of the box - Ubuntu 12.04: can be made to work with old XULRunner after some research and trial and error - Ubuntu 13.04: can be made to work with old libwebkit if you can live without using google hangouts. That's 3 Data points on a downward curve! Practically speaking, today, the internal browser widget is unusable on Linux systems in the sense that we really can't build Eclipse plugins that depend on it if we have to put our Linux users through such pain to get it working (assuming they can even get it to work on their version of Linux). So it is a bit sad to see this closed as 'NOT ECLIPSE'. I thought we could address the problem by shipping a XUlRunner 10.0.2 inside our product (STS) but since that doesn't work on 13.04 (and probably other recent linux distros). It seems to me this *is* in fact Eclipse's problem in the sense that Eclipse embedded browser hasn't evolved along with current Linux versions. Eclipse now demands old binary libraries. As these libraries age, most people will have an increasingly hard time to get them to work on their current linux systems. The report was closed in comment 6 when it appeared that a system upgrade fixed the problem, and comment 12 gave the same impression. Reopening report since the latest comment indicates this is not the case, and now provides a possible contributing factor (the googletalk plugin). This could still turn out to be a not-eclipse issue if it's a WebKitGTK<->googletalk interaction problem, especially given reports like https://bugs.webkit.org/show_bug.cgi?id=100622 , but this is yet to be determined. SWT stays up-to-date with the default native renderers on all platforms (Trident, WebKitGTK, WebKit on OSX), along with specific XULRunner releases (no longer the default renderer on any recent platforms). Substituting XULRunner for the default native renderer is sometimes given as an individual workaround, but is never considered to be the final/correct resolution. The platform-default native renderer should generally be relied on unless a client really wants a specific renderer for some reason. There's a bug when WebKitGTK is used with googletalk installed, but I do not think this indicates a trend. Lakshmi, can you or Arun try this? Use an Ubuntu 13.x release if possible, ensure that the native webkitgtk library is installed, install the google plugin or app that brings the google plugin with it, and see how the Browser does? If you're looking for a stand-alone native case to compare to then you can compile WebKitGTK from source and it will create an executable in your Tools directory called GtkLauncher. When WebKitGTK is compiled from source it leaves its libraries in directory ".libs". Thanks for having another look at this. Let me know if I can help, e.g. test something. Also some new information I recently learned from Alex Kurtatov's comment here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=420030#c5 It is possible to have Eclipse use libwebkitgtk-3.0 instead of libwebkitgtk-1.0. Although Alex seems to think using libwebkitgtk-3.0 is still experimental and might have issues... it seems to work well enough for me and doesn't JVM crash with googletalk plugins installed. To use libwebkitgtk-3.0 one needs to do two things: - make sure it is installed (e.g "sudo apt-get install libwebkitgtk-3.0") - set an env variable SWT_GTK3=1 I haven't tried this on 13.04 (I'm on 12.04) but I am guessing it this workaround will work there just as well. Kris, I have to clarify libwebkitgtk-3.0 is not experimental and it's as stable (I would dare to say even more than) libwebkitgtk-1.0. The difference between the two is the former being compiled against gtk 3.x while the later being compiled against gtk 2.x. It is official recommendation from gtk developers to not mix wildly gtk versions in the same process . So in order to minimize changes for other crashes when one tries to use libwebkitgtk-3.0 he would better do it in pure gtk 3.x environment. But gtk 3.x port of swt has some other issues that are not related to browser support thus not yet default. End result being that each port having better and worse parts compared to the other so no clean winner for now but as time pass gtk 2.x port will get harder and harder to support. Thanks for the clarification Alex. I didn't mean to put (incorrect) words into your mouth, sorry about that. I guess this comment might be avoided if webkit is instanciated with out plugins support. Something like: webview.getSettings().setPluginsEnabled(false); FYI this affects fedora 20 (which I'm using). http://eclipseandlinux.blogspot.se/2013/10/google-talk-plugin-presence-breaks.html (In reply to Mattias Eriksson from comment #18) > I guess this comment might be avoided if webkit is instanciated with out > plugins support. Something like: > webview.getSettings().setPluginsEnabled(false); Grant, does this sound as viable solution to you ? (In reply to Alexander Kurtakov from comment #20) > Grant, does this sound as viable solution to you ? It looks like it may be possible to detect and disable just the problematic plug-in, rather than disabling all of them all of the time, or requiring a user to set a disable flag of some sort at runtime. webkit_web_plugin_database_get_plugins() webkit_web_plugin_get_name() webkit_web_plugin_set_enabled(gboolean) Sami, would you please try blacklisting googletalk plugin? Hello all, Here is a preliminary patch implementing the suggestion in comment #21: http://paste.fedoraproject.org/61171/86860757/ It does not seem to work unfortunately. The crash still occurs. Investigating further.... (In reply to Sami Wagiaalla from comment #23) > Hello all, > > Here is a preliminary patch implementing the suggestion in comment #21: > > http://paste.fedoraproject.org/61171/86860757/ > > It does not seem to work unfortunately. The crash still occurs. > Investigating further.... Please submit your patches to gerrit. I confirm that removing Google Talk plugin (google-talkplugin) fixes the systematic crash with segfault. Is there a way to tell Eclipse not to load Webkit or to tell Webkit not to load plugins? I was able to work around this issue by adding the following to eclipse.ini: -Dorg.eclipse.swt.browser.DefaultType=mozilla Fedora 20 (In reply to Martin from comment #25) > Is there a way to tell Eclipse not to load Webkit or to tell Webkit not to > load plugins? Please see this faq entry to force eclipse to use Xulrunner instead of Webkit --> http://eclipse.org/swt/faq.php#howusemozilla
> Is there a way to tell Eclipse not to load Webkit or to tell Webkit not to
> load plugins?
I have been trying to find a way to do the latter but unfortunately there is not. Using WebKit API to disable plugins does not help because simply loading the .so (or .so's) of the google-talkplugin is enough to cause the crash
I am also effected on KDE 4.12.1 and openSUSE 13.1. Easily reproducible with the Marketplace. Error is only logged to console. eclipse -vmargs -Dorg.eclipse.swt.browser.DefaultType=mozilla seems to be a valid workaround. Via http://www.eclipse.org/forums/index.php/t/278337/ Forgot to mention that I also have the Google Talk plugin installed (which also crashes on startup). It is called google-talkplugin version 4.9.1 and installed via RPM. https://developers.google.com/talk/ tells me that it is replaced by Google Hangout and has nothing to do with the old open XMPP/libjingle based system. This is confusing. Not sure where to tell Google developers about it. *** Bug 424419 has been marked as a duplicate of this bug. *** FWIW, there is initial implementation of WEBKIT2 support in master now (not available in any build yet), one can enable it with export SWT_WEBKIT2=1 to try it. The difference is that webkit 2 runs plugins out of process so having them crashed would not bring down the whole IDE. Note that this is work in progress so use it at your own risk and please report bugs to improve it. *** Bug 430320 has been marked as a duplicate of this bug. *** I had the same problems on OpenSUSE 13.1 with Googletalk 5.1.5.0.1 - removing the plugin helped. Googletalk 5.2.4.0 no longer causes crash for me. I can confirm this fix too. google-talkplugin (in AUR on archlinux) needs to be 5.2.4.0 and this bug goes away. Seems to affect all webkit-based creatures aside from chromium (go figure), midori was affected too. I'm closing this bug as not_eclipse as this doesn't happen for people without googletalk plugin or having version 5.2.4.0 or newer. If someone can reproduce it without googletalk plugin please reopen with clean reproducing steps. http://software.opensuse.org/package/chromium was also affected, but I can confirm that this has been silently fixed in google-talkplugin 5.2.4.0-1-i386. Even though this bug is closed, I'd still like to comment that I cannot confirm that things were fixed with some newer google-talk plugin. I am running FC20 and have google-talkplugin-5.2.4.0-1.x86_64 installed. Eclipse is still crashing for me. The only "working" workaround for me is to disable webkit via eclipse.ini: -Dorg.eclipse.swt.browser.DefaultType=mozilla This disables the embedded browser for me but I have at least no further crashes. Linux localhost.localdomain 3.13.7-200.fc20.x86_64 #1 SMP Mon Mar 24 22:01:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux Using google-talkplugin-5.2.4.0-1.x86_64 does not fix the problem at all. It still crashes my eclipse. Robert, can you post a stacktrace here when a crash occurs? Matthias:
I seriously can't find a stacktrace anywhere. There's no hs***.pid file, and when I check {workspace}/.metadata/.log, There's nothing in there to indicate a crash. It's just... boom... gone. If I don't use any of the workarounds, it happens the moment I do any code-complete.
I've recently even gone so far as to uninstall the rpm for google talk, but it hasn't fixed the issue. It's possible it's some other google rpm that was installed as part of the 'collection', but I don't know how to identify which one.
* update *
I just discovered the offending rpm is rbjnplugin-2.5.111.8-1.x86_64
I realized my problem started yesterday and so I queried for most recently-installed rpms and saw that one at the top of the list.
I've re-installed google-talk and it works now... so the bluejeans rpm was the broken one.
(In reply to Rob Stryker from comment #42) > Matthias: > > I seriously can't find a stacktrace anywhere. There's no hs***.pid file, > and when I check {workspace}/.metadata/.log, There's nothing in there to > indicate a crash. It's just... boom... gone. If I don't use any of the > workarounds, it happens the moment I do any code-complete. > > > I've recently even gone so far as to uninstall the rpm for google talk, but > it hasn't fixed the issue. It's possible it's some other google rpm that was > installed as part of the 'collection', but I don't know how to identify > which one. > > * update * > > I just discovered the offending rpm is rbjnplugin-2.5.111.8-1.x86_64 > > I realized my problem started yesterday and so I queried for most > recently-installed rpms and saw that one at the top of the list. > > > I've re-installed google-talk and it works now... so the bluejeans rpm was > the broken one. Rob, would you please open a separate bug about the bluejeans problem. Created attachment 242352 [details] error report file I think it is time to re-open this bug report. My environment: - Eclipse Luna M6 Release (4.4.0M6) - Ubuntu 14.04 LTS - google-talkplugin 5.2.4.0-1 - libwebkitgtk-1.0-0 2.4.0-1ubuntu2 - Oracle Java 8.0_05-b13 # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f37662f6ca9, pid=7373, tid=139878990538496 # # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libwebkitgtk-1.0.so.0+0x461ca9] webkit_web_view_get_type+0x2489 # # Core dump written. Default location: /opt/eclipse/64/eclipse.rcp.luna/core or core.7373 # # An error report file with more information is saved as: # /opt/eclipse/64/eclipse.rcp.luna/hs_err_pid7373.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Quite the same as Markus, but I removed google-talk. Still having a problem with WebKitGTK The console message: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fbfc60c32a1, pid=14269, tid=140464662484736 # # JRE version: Java(TM) SE Runtime Environment (8.0_05-b13) (build 1.8.0_05-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.5-b02 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11 # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /home/martin/hs_err_pid14269.log In the error report: Stack: [0x00007fc07a3f9000,0x00007fc07a4fa000], sp=0x00007fc07a4f71b0, free space=1016k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libsoup-2.4.so.1+0x6c2a1] soup_session_feature_detach+0x11 Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) j org.eclipse.swt.internal.webkit.WebKitGTK._soup_session_feature_detach(JJ)V+0 j org.eclipse.swt.internal.webkit.WebKitGTK.soup_session_feature_detach(JJ)V+9 [...] This helped me to avoid crashes: Add -Dorg.eclipse.swt.browser.DefaultType=mozilla to your eclipse.ini See: http://stackoverflow.com/questions/16383992/why-does-my-eclipse-indigo-crash-on-ubuntu-13-04-with-oracle-jdk-64bit (In reply to Martin Scheerer from comment #46) It looks like you're seeing bug 404776, which was fixed in the 4.3 release. Upgrading to 4.3.2 (if you can) is a better way to avoid this crash. I still had the issue in Eclipse 4.3.2: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007eff28651159, pid=4652, tid=139636853184256 # # JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17) # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libwebkitgtk-1.0.so.0+0x462159] webkit_web_view_get_type+0x2489 (In reply to Vadim Peretokin from comment #48) > # C [libwebkitgtk-1.0.so.0+0x462159] webkit_web_view_get_type+0x2489 That should work fine in Eclipse 4.4. I can confirm that using Eclipse Luna v4.4 on Ubuntu 14.04 this doesn't happen anymore. For older Eclipse versions (e.g. 3.7.2) the -Dorg.eclipse.swt.browser.DefaultType=mozilla works for me. |