App using Oxide and QtWebKit hangs on exit

Bug #1367388 reported by Robert Schroll
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Won't Fix
Medium
Unassigned

Bug Description

The app Beru (https://github.com/rschroll/beru) uses an Oxide WebView. Up until a few days ago, it worked fine. But now, it hangs on exit. This is not due to a change in Beru itself; old versions show this behavior now. I'm running 14.04 with the SDK team PPA.

Breaking the execution in GDB at this point seems to indicate that the main loop is in Oxide code. I've attached traces both with and without the Oxide debug symbols. They look similar, but are slightly different.

A very odd thing is that, if I continue the execution in GDB, the program exits normally. But it will never exit before it is interrupted or if it isn't running under GDB.

Please let me know if there's any further debugging I can do. I haven't yet been able to make a test case that exhibits the hang.

Revision history for this message
Robert Schroll (rschroll) wrote :
Revision history for this message
Robert Schroll (rschroll) wrote :
Revision history for this message
Chris Coulson (chrisccoulson) wrote :
Download full text (4.1 KiB)

The main thread is blocked on waiting for the sandbox IPC helper thread to exit:

#0 0x00007ffff4b9d66b in pthread_join (threadid=140736733370112,
    thread_return=0x0) at pthread_join.c:92
#1 0x00007fffb866f56f in base::PlatformThread::Join (thread_handle=...)
    at ../../../../third_party/chromium/src/base/threading/platform_thread_posix.cc:235
#2 0x00007fffb8672e01 in base::SimpleThread::Join (this=0x9fd410)
    at ../../../../third_party/chromium/src/base/threading/simple_thread.cc:41
#3 0x00007fffba8b9da4 in content::RenderSandboxHostLinux::~RenderSandboxHostLinux (this=0x9f30a0, __in_chrg=<optimized out>)
    at ../../../../third_party/chromium/src/content/browser/renderer_host/render_sandbox_host_linux.cc:70
#4 0x00007fffba8b9e75 in Delete (x=0x9f30a0)
    at ../../../../third_party/chromium/src/base/memory/singleton.h:59
#5 Singleton<content::RenderSandboxHostLinux, DefaultSingletonTraits<content::RenderSandboxHostLinux>, content::RenderSandboxHostLinux>::OnExit ()
    at ../../../../third_party/chromium/src/base/memory/singleton.h:281
#6 0x00007fffb86156db in Run (this=0x7fffffffd7e0)
    at ../../../../third_party/chromium/src/base/callback.h:401
#7 base::AtExitManager::ProcessCallbacksNow ()
    at ../../../../third_party/chromium/src/base/at_exit.cc:72
#8 0x00007fffb8615784 in base::AtExitManager::~AtExitManager (this=0x9e17b0,
    __in_chrg=<optimized out>)
    at ../../../../third_party/chromium/src/base/at_exit.cc:40
#9 0x00007fffb8df74e7 in operator() (this=0x9e1730, ptr=0x9e17b0)
    at ../../../../third_party/chromium/src/base/memory/scoped_ptr.h:137
---Type <return> to continue, or q <return> to quit---
#10 reset (p=0x0, this=0x9e1730)
    at ../../../../third_party/chromium/src/base/memory/scoped_ptr.h:246
#11 reset (p=0x0, this=0x9e1730)
    at ../../../../third_party/chromium/src/base/memory/scoped_ptr.h:367
#12 content::ContentMainRunnerImpl::Shutdown (this=0x9e16f0)
    at ../../../../third_party/chromium/src/content/app/content_main_runner.cc:790
#13 0x00007fffb85dce84 in oxide::BrowserProcessMainImpl::ShutdownInternal (
    this=0x7fffbbfb5260 <oxide::(anonymous namespace)::GetInstance()::g_instance>) at ../../../../shared/browser/oxide_browser_process_main.cc:154
#14 0x00007ffff5f936a0 in qt_call_post_routines() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff6b58966 in QApplication::~QApplication() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00000000004041b3 in ?? ()
#17 0x00007ffff537dec5 in __libc_start_main (main=0x4038d0, argc=5,
    argv=0x7fffffffdf28, init=<optimized out>, fini=<optimized out>,
    rtld_fini=<optimized out>, stack_end=0x7fffffffdf18) at libc-start.c:287
#18 0x00000000004064e7 in ?? ()

But the sandbox IPC helper thread is still waiting for events:

#0 0x00007ffff5449c6d in poll () at ../sysdeps/unix/syscall-template.S:81
#1 0x00007fffba8d684a in poll (__timeout=-1, __nfds=2, __fds=0x7fffd2ffcc80)
    at /usr/include/x86_64-linux-gnu/bits/poll2.h:46
#2 content::SandboxIPCHandler::Run (this=0x9f3100)
    at ../../../../third_party/chromium/src/content/browser/renderer_host/sandbox_ipc_linux.cc:159
#3 0x00007fffb8672dae in base::Delegate...

Read more...

Revision history for this message
Robert Schroll (rschroll) wrote :

If it would help for me to run the application under strace or something similar, please let me know.

Revision history for this message
Robert Schroll (rschroll) wrote :

It appears that the problem is that I'm using both the new Oxide WebView and the old Qt WebView, on separate Pages. If I take out one or the other, it exits normally. If I change the Qt WebView page to be loaded on demand, instead of at startup, it won't hang unless I actually load that page.

Now that I know this, I may be able to make a test case, if that would help.

Revision history for this message
Olivier Tilloy (osomon) wrote :

That’d be helpful indeed!

Revision history for this message
Robert Schroll (rschroll) wrote :

This test case does nothing, but it hangs on exit.

Revision history for this message
Robert Schroll (rschroll) wrote :

Dunno if it's relevant, but this (and Beru) hang on start on the emulator. I guess the mobile user doesn't have time to wait until exit.

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce the issue with the test case provided by Robert.
Setting the importance to medium only because I don’t think the use case of using concurrently QtWebKit and Oxide in the same application is something we care about much (even though it would be good to understand what’s causing the hang and fix it). Additionally, we’re in the process of deprecating QtWebKit altogether.

Changed in oxide:
importance: Undecided → Medium
status: New → Confirmed
summary: - App using Oxide hangs on exit
+ App using Oxide and QtWebKit hangs on exit
Revision history for this message
Robert Schroll (rschroll) wrote :

For the record, the test case hangs on launch on a real device as well.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Robert, is still issue still observed in beru?
QtWebKit was removed from the touch images recently, it’s not officially supported any longer, so if it’s not affecting your app I’d be tempted to close the issue.

Revision history for this message
Robert Schroll (rschroll) wrote :

I removed QtWebKit from Beru some time ago.

Revision history for this message
Olivier Tilloy (osomon) wrote :

OK, thanks for the confirmation. I’m marking the bug "Won’t Fix", as QtWebKit is not supported any longer.

Changed in oxide:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.