Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369285 - [Browser] libjavascriptcoregtk can crash at shutdown in WebKitGTK >= 1.4.x
Summary: [Browser] libjavascriptcoregtk can crash at shutdown in WebKitGTK >= 1.4.x
Status: CLOSED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Linux-GTK
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2012-01-20 15:15 EST by Grant Gayed CLA
Modified: 2018-04-10 09:17 EDT (History)
3 users (show)

See Also:


Attachments
dump (62.28 KB, text/x-log)
2012-01-20 15:15 EST, Grant Gayed CLA
no flags Details
minimal WebKit Browser implementation, still shows the problem (3.68 KB, text/x-java)
2012-01-20 15:17 EST, Grant Gayed CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2012-01-20 15:15:35 EST
Created attachment 209852 [details]
dump

- observed on 64-bit Fedora 15 (WebKitGTK 1.4.x) and 16 (WebKitGTK 1.6.x)
- not a problem on 64-bit Ubuntu 10.04 (WebKitGTK 1.2.x)
- don't currently have access to a 32-bit WebKitGTK >= 1.4.x to try this on

- open eclipse's Internal Web Browser view
- navigate it to eclipse.org
- give focus to the eclipse.org page's search field, type some characters
- shut down eclipse and a crash occurs, dump is attached

It appears that a string is being invalidly freed as libjavascriptcoregtk is shutting down.  I strongly suspect that this is a bug in JavaScriptCore, because the problem still happens if swt's WebKit class is reduced to its bare minimum (will attach it in the next comment), and it appears that a similar problem may be happening on win32 (bug 368648), even though swt's Browser implementations on gtk and win32 are different (JavaScriptCore is common across the platforms).

However I have not been able to get WebKitGTK's stand-alone GtkLauncher example to show the crash.  No bug has been logged with WebKit yet as I am working on getting more compelling evidence of that being where the problem is.  Stand-alone Snippet128 only shows the crash ~20% of the time, but when run within Eclipse's process it shows it 100% of the time, so it could just be a case of JavaScriptCore getting lucky in lower-memory-usage contexts.
Comment 1 Grant Gayed CLA 2012-01-20 15:17:20 EST
Created attachment 209854 [details]
minimal WebKit Browser implementation, still shows the problem
Comment 2 Eric Williams CLA 2016-12-19 15:42:10 EST
I can't get the snippet to run, maybe Leo can shed some light on this (when time permits).
Comment 3 Leo Ufimtsev CLA 2016-12-20 12:10:31 EST
(In reply to Eric Williams from comment #2)
> I can't get the snippet to run, maybe Leo can shed some light on this (when
> time permits).

Thank you for pointing this out. I will investigate once webkit2 port is complete.
Comment 4 Leo Ufimtsev CLA 2018-04-10 09:17:51 EDT
In the meantime this crash is resolved in Webkit2 in recent Eclipse builds.