Hello
 I have been experimenting with my custom app that uses webkit2gtk.
For testing I use Ubuntu 14.04.1 LTS linux.
While testing I have encountered one strange thing.

Usually when WebKitWebProcess crashes or or is killed for some reason, then "web-process-crashed" signal is emitted in UI process. WebProcess is respawned and everything works fine after that.

But rarely when WebProcess is being re-spawned, process locks somewhere, leaving web session unresponsive.

The only solution (without restarting the whole app) is to kill only WebProcess, which will cause UI process to re spawn WebProcess again.
After this and reloading the page everything works fine again.

I have investigated problem further and I have discovered that locked WebProcess is running with only one system thread. This was unusual for WebKitWebProcess which usulay runs with several threads.

After attaching debuger to such process I suspect for the problem to have something to do with "dbus_launch".

Here I got one of such processes on gdb. The stack trace looks like this:

|(gdb) bt
#0   __lll_lock_wait () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1   0x00007fda3cfa4657  in  _L_lock_909 () 
from/lib/x86_64-linux-gnu/libpthread.so.0
#2   0x00007fda3cfa4480  in  __GI___pthread_mutex_lock (mutex=0x7fd9e4f7d420) 
at ../nptl/pthread_mutex_lock.c:79
#3   0x00007fd9e4d54e23  in  ?? () from 
/usr/lib/x86_64-linux-gnu/libp11-kit.so.0
#4  0x00007fda3d279f87 in __libc_fork () at 
../nptl/sysdeps/unix/sysv/linux/x86_64/../fork.c:188
#5   0x00007fda37cfe54c  in  fork_exec_with_pipes 
(intermediate_child=intermediate_child@entry=0, 
working_directory=working_directory@entry=0x0,
    argv=0x7fd9d0003e60, envp=envp@entry=0x0, 
close_descriptors=close_descriptors@entry=1, search_path=search_path@entry=1,
    search_path_from_envp=search_path_from_envp@entry=0, 
stdout_to_null=stdout_to_null@entry=0, stderr_to_null=0,
    child_inherits_stdin=child_inherits_stdin@entry=0, 
file_and_argv_zero=file_and_argv_zero@entry=0, 
cloexec_pipes=cloexec_pipes@entry=0,
    child_setup=child_setup@entry=0x0, user_data=user_data@entry=0x0, 
child_pid=child_pid@entry=0x7fd9e5fbf7e8, 
standard_input=standard_input@entry=0x0,
    standard_output=standard_output@entry=0x7fd9e5fbf7e0, 
standard_error=standard_error@entry=0x7fd9e5fbf7e4, 
error=error@entry=0x7fd9e5fbf988)
    at/build/buildd/glib2.0-2.40.2/./glib/gspawn.c:1326
#6   0x00007fda37cfee18  in  g_spawn_sync 
(working_directory=working_directory@entry=0x0, argv=<optimized out>, 
envp=envp@entry=0x0,
    flags=flags@entry=G_SPAWN_SEARCH_PATH, child_setup=child_setup@entry=0x0, 
user_data=user_data@entry=0x0,
    standard_output=standard_output@entry=0x7fd9e5fbf920, 
standard_error=standard_error@entry=0x7fd9e5fbf928, 
exit_status=exit_status@entry=0x7fd9e5fbf91c,
    error=error@entry=0x7fd9e5fbf988) 
at/build/buildd/glib2.0-2.40.2/./glib/gspawn.c:277
#7   0x00007fda37cff517  in  g_spawn_command_line_sync (
    command_line=command_line@entry=0x7fd9d0003d40  "dbus-launch 
--autolaunch=b0e3226568f3ba144a55c2e2548aba21 --binary-syntax --close-stderr",
    standard_output=standard_output@entry=0x7fd9e5fbf920, 
standard_error=standard_error@entry=0x7fd9e5fbf928, 
exit_status=exit_status@entry=0x7fd9e5fbf91c,
    error=error@entry=0x7fd9e5fbf988) 
at/build/buildd/glib2.0-2.40.2/./glib/gspawn.c:721
#8   0x00007fda3911bc00  in  get_session_address_dbus_launch 
(error=error@entry=0x7fd9e5fbf988) 
at/build/buildd/glib2.0-2.40.2/./gio/gdbusaddress.c:1073
#9   0x00007fda3911d48a  in  get_session_address_platform_specific 
(error=0x7fd9e5fbf988) at/build/buildd/glib2.0-2.40.2/./gio/gdbusaddress.c:1446
#10  g_dbus_address_get_for_bus_sync 
(bus_type=bus_type@entry=G_BUS_TYPE_SESSION, cancellable=cancellable@entry=0x0, 
error=error@entry=0x7fd9e5fbfa78)
    at/build/buildd/glib2.0-2.40.2/./gio/gdbusaddress.c:1530
#11  0x00007fda391281fe  in  get_uninitialized_connection 
(bus_type=G_BUS_TYPE_SESSION, cancellable=cancellable@entry=0x0, 
error=error@entry=0x7fd9e5fbfa78)
    at/build/buildd/glib2.0-2.40.2/./gio/gdbusconnection.c:6965
#12  0x00007fda3912d6bb  in  g_bus_get_sync (bus_type=<optimized out>, 
cancellable=0x0, error=0x7fd9e5fbfa78)
    at/build/buildd/glib2.0-2.40.2/./gio/gdbusconnection.c:7042
#13  0x00007fd9ec18cf90  in  ?? () from 
/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#14 0x00007fd9ec18d06d in ?? () from 
/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#15 0x00007fda37cbace5 in g_main_dispatch (context=0x1cbcce0) at 
/build/buildd/glib2.0-2.40.2/./glib/gmain.c:3064
#16  g_main_context_dispatch (context=context@entry=0x1cbcce0) 
at/build/buildd/glib2.0-2.40.2/./glib/gmain.c:3663
#17  0x00007fda37cbb048  in  g_main_context_iterate (context=context@entry=0x1cbcce0, 
block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
    at/build/buildd/glib2.0-2.40.2/./glib/gmain.c:3734
#18  0x00007fda37cbb0ec  in  g_main_context_iteration (context=0x1cbcce0, 
may_block=1) at/build/buildd/glib2.0-2.40.2/./glib/gmain.c:3795
#19  0x00007fd9ec18d1ad  in  ?? () from 
/usr/lib/x86_64-linux-gnu/gio/modules/libdconfsettings.so
#20 0x00007fda37cdff05 in g_thread_proxy (data=0x1c71cf0) at 
/build/buildd/glib2.0-2.40.2/./glib/gthread.c:764
#21  0x00007fda3cfa2182  in  start_thread (arg=0x7fd9e5fc0700) at 
pthread_create.c:312
#22  0x00007fda3d2b330d  in  clone () at 
../sysdeps/unix/sysv/linux/x86_64/clone.S:111
|

It seems everything hangs in frame 7: when spawning a dbus-launch:

|(gdb) f7
#7   0x00007fda37cff517  in  g_spawn_command_line_sync (
    command_line=command_line@entry=0x7fd9d0003d40  "dbus-launch 
--autolaunch=b0e3226568f3ba144a55c2e2548aba21 --binary-syntax --close-stderr",
    standard_output=standard_output@entry=0x7fd9e5fbf920, 
standard_error=standard_error@entry=0x7fd9e5fbf928, 
exit_status=exit_status@entry=0x7fd9e5fbf91c,
    error=error@entry=0x7fd9e5fbf988) 
at/build/buildd/glib2.0-2.40.2/./glib/gspawn.c:721
721      in  /build/buildd/glib2.0-2.40.2/./glib/gspawn.c

|

And a little later in frame 5:

|#5  0x00007fda37cfe54c in fork_exec_with_pipes 
(intermediate_child=intermediate_child@entry=0, 
working_directory=working_directory@entry=0x0,
    
argv=0x7fd9d0003e60,envp=envp@entry=0x0,close_descriptors=close_descriptors@entry=1,search_path=search_path@entry=1,
    
search_path_from_envp=search_path_from_envp@entry=0,stdout_to_null=stdout_to_null@entry=0,stderr_to_null=0,
    
child_inherits_stdin=child_inherits_stdin@entry=0,file_and_argv_zero=file_and_argv_zero@entry=0,cloexec_pipes=cloexec_pipes@entry=0,
    
child_setup=child_setup@entry=0x0,user_data=user_data@entry=0x0,child_pid=child_pid@entry=0x7fd9e5fbf7e8,standard_input=standard_input@entry=0x0,
    
standard_output=standard_output@entry=0x7fd9e5fbf7e0,standard_error=standard_error@entry=0x7fd9e5fbf7e4,error=error@entry=0x7fd9e5fbf988)
    at /build/buildd/glib2.0-2.40.2/./glib/gspawn.c:1326
1326     in  /build/buildd/glib2.0-2.40.2/./glib/gspawn.c
(gdb) i locals
pid =  -1
stdin_pipe =  {-1, -1}
stdout_pipe =  {18,19}
stderr_pipe =  {20,21}
child_err_report_pipe =  {14,17}
child_pid_report_pipe =  {-1, -1}
pipe_flags =  0
status =  4

|

And frame 8:

|(gdb) f8
#8   0x00007fda3911bc00  in  get_session_address_dbus_launch 
(error=error@entry=0x7fd9e5fbf988) 
at/build/buildd/glib2.0-2.40.2/./gio/gdbusaddress.c:1073
1073     /build/buildd/glib2.0-2.40.2/./gio/gdbusaddress.c:  No such file or 
directory.
(gdb) i locals
ret =0x0
machine_id =0x7fd9d0003d10  "b0e3226568f3ba144a55c2e2548aba21"
command_line =0x7fd9d0003d40  "dbus-launch 
--autolaunch=b0e3226568f3ba144a55c2e2548aba21 --binary-syntax --close-stderr"
launch_stdout =0x0
launch_stderr =0x0
exit_status =32729
old_dbus_verbose =0x0
restore_dbus_verbose =0

Best

Miha
|




_______________________________________________
webkit-gtk mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-gtk

Reply via email to