Bug 166740 - [GTK] WebProcess from patched WebKitGtk+ 2.15.x receives BadAccess X Error
Summary: [GTK] WebProcess from patched WebKitGtk+ 2.15.x receives BadAccess X Error
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-05 12:51 PST by Andres Gomez Garcia
Modified: 2017-02-05 04:14 PST (History)
2 users (show)

See Also:


Attachments
BT from gdb for the WebProcess (405.93 KB, text/plain)
2017-01-05 12:51 PST, Andres Gomez Garcia
no flags Details
Another BT from gdb for the WebProcess (515.56 KB, text/plain)
2017-02-04 08:38 PST, Andres Gomez Garcia
no flags Details
Yet another similar BT from gdb (514.50 KB, text/plain)
2017-02-04 08:39 PST, Andres Gomez Garcia
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gomez Garcia 2017-01-05 12:51:47 PST
Created attachment 298126 [details]
BT from gdb for the WebProcess

I'm using WebKitGtk+ with my own JHBuild setting:
https://github.com/tanty/jhbuild-epiphany/tree/master

Epiphany 3.20.3 and WebKit 2.15.2 with the attached patches for bug 164049, bug 165200, bug 165283 and bug 164052, applied, and also the modification suggested at https://bugs.webkit.org/show_bug.cgi?id=165848#c18

I'm running Epiphany with the dconf key:

"process-model" = "shared-secondary-process"

And the env variable:

"export LIBGL_DRI3_DISABLE=1"

The compilation was done with CMake args:

'-DPORT=GTK -DCMAKE_BUILD_TYPE=Release -DENABLE_MINIBROWSER=ON -DCMAKE_C_FLAGS_RELEASE="-O0 -g -DNDEBUG -DG_DEBUG=fatal-criticals -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g -DNDEBUG -DG_DEBUG=fatal-criticals -DG_DISABLE_CAST_CHECKS"'

After visiting several pages, eventually, the WebProcess hits a SIGTRAP.

This bug is not reproducible in a predictable way.


This the error message:


-- 8< -- 8< -- 8< -- 8< -- 8< -- 8< -- 8< --

(WebKitWebProcess:20587): Gdk-ERROR **: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 13421095 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

-- 8< -- 8< -- 8< -- 8< -- 8< -- 8< -- 8< --
Comment 1 Andres Gomez Garcia 2017-02-04 08:38:50 PST
Created attachment 300626 [details]
Another BT from gdb for the WebProcess

Also with Epiphany 3.22.5 and WebKit 2.15.4.

I'm running Epiphany with the dconf key:

"process-model" = "shared-secondary-process"

And the env variable:

"export G_DEBUG=fatal-criticals"

The compilation was done with CMake args:

'-DENABLE_THREADED_COMPOSITOR=OFF -DPORT=GTK -DCMAKE_BUILD_TYPE=Release -DENABLE_MINIBROWSER=ON -DCMAKE_C_FLAGS_RELEASE="-O0 -g -DNDEBUG  -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g -DNDEBUG -DG_DISABLE_CAST_CHECKS"'

The WebProcess, eventually, receives a SIGTRAP.

---

The error in the terminal is:

(WebKitWebProcess:26855): Gdk-ERROR **: The program 'WebKitWebProcess' received an X Window System error.                                             
This probably reflects a bug in the program.                                                                                                          
The error was 'BadAccess (attempt to access private resource denied)'.                                                                                
  (Details: serial 1923949 error_code 10 request_code 130 (MIT-SHM) minor_code 1)                                                                     
  (Note to programmers: normally, X errors are reported asynchronously;                                                                               
   that is, you will receive the error a while after causing it.                                                                                      
   To debug your program, run it with the GDK_SYNCHRONIZE environment                                                                                 
   variable to change this behavior. You can then get a meaningful                                                                                    
   backtrace from your debugger if you break on the gdk_x_error() function.)
Comment 2 Andres Gomez Garcia 2017-02-04 08:39:34 PST
Created attachment 300627 [details]
Yet another similar BT from gdb

And, immediately, the WebProcess received yet another SIGTRAP.
Comment 3 Carlos Garcia Campos 2017-02-05 01:24:54 PST
(In reply to comment #1)
> Created attachment 300626 [details]
> Another BT from gdb for the WebProcess
> 
> Also with Epiphany 3.22.5 and WebKit 2.15.4.
> 
> I'm running Epiphany with the dconf key:
> 
> "process-model" = "shared-secondary-process"
> 
> And the env variable:
> 
> "export G_DEBUG=fatal-criticals"
> 
> The compilation was done with CMake args:
> 
> '-DENABLE_THREADED_COMPOSITOR=OFF -DPORT=GTK -DCMAKE_BUILD_TYPE=Release
> -DENABLE_MINIBROWSER=ON -DCMAKE_C_FLAGS_RELEASE="-O0 -g -DNDEBUG 
> -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g -DNDEBUG
> -DG_DISABLE_CAST_CHECKS"'
> 
> The WebProcess, eventually, receives a SIGTRAP.

I don't think you mare building with -DENABLE_THREADED_COMPOSITOR=OFF or the build option doesn't work, because your bts have a compositing thread :-)

> ---
> 
> The error in the terminal is:
> 
> (WebKitWebProcess:26855): Gdk-ERROR **: The program 'WebKitWebProcess'
> received an X Window System error.                                          
> 
> This probably reflects a bug in the program.                                
> 
> The error was 'BadAccess (attempt to access private resource denied)'.      
> 
>   (Details: serial 1923949 error_code 10 request_code 130 (MIT-SHM)
> minor_code 1)                                                               
> 
>   (Note to programmers: normally, X errors are reported asynchronously;     
> 
>    that is, you will receive the error a while after causing it.            
> 
>    To debug your program, run it with the GDK_SYNCHRONIZE environment       
> 
>    variable to change this behavior. You can then get a meaningful          
> 
>    backtrace from your debugger if you break on the gdk_x_error() function.)

This is tricky because the error is always processed in the next run loop iteration, so we don't really know what caused it. There are always gst threads there, so the media player is involve, and in two of the bts the threaded compositor is waiting for something after a xcb_present_pixmap done in swap buffers. Maybe you really need to run with GDK_SYNCHRONIZE to make sure the errors is processed right when it happens and we can see in the bt what caused it.
Comment 4 Andres Gomez Garcia 2017-02-05 04:14:15 PST
(In reply to comment #3)
...
> (In reply to comment #1)
> > '-DENABLE_THREADED_COMPOSITOR=OFF -DPORT=GTK -DCMAKE_BUILD_TYPE=Release
> > -DENABLE_MINIBROWSER=ON -DCMAKE_C_FLAGS_RELEASE="-O0 -g -DNDEBUG 
> > -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g -DNDEBUG
> > -DG_DISABLE_CAST_CHECKS"'
> > 
> > The WebProcess, eventually, receives a SIGTRAP.
> 
> I don't think you mare building with -DENABLE_THREADED_COMPOSITOR=OFF or the
> build option doesn't work, because your bts have a compositing thread :-)

Sorry, you are right. Too many reported bugs and I tend to copy and paste. This is wrong.