diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2017-07-19 23:32:30 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2017-08-27 16:37:08 +0000 |
commit | db0585d63ad44756c9b9476a53413ccd061c52d8 (patch) | |
tree | cef77ff31b1b8eab4a6103b35958657ef58f6edc /src/network/kernel/kernel.pri | |
parent | 0f11fab6f75dec78d3721280971448cc2edd6e72 (diff) |
Fix crashes with libproxy+webkitgtk: it's not threadsafe
I'm getting crashes in Akonadi processes due to libproxy. I don't have
direct evidence that this was caused by a threading condition, but it's
clear from the source code of libproxy that the plugins it runs for
expanding PAC scripts are not thread-safe. To overcome this problem, we
only run libproxy functions in one thread only.
#0 0x00007f745f0ac1d8 in JSC::HeapTimer::timerDidFire() () at /usr/lib64/libjavascriptcoregtk-4.0.so.18
#1 0x00007f745f0ac287 in () at /usr/lib64/libjavascriptcoregtk-4.0.so.18
#2 0x00007f748e5ae9c5 in g_main_context_dispatch () at /usr/lib64/libglib-2.0.so.0
#3 0x00007f748e5aed88 in () at /usr/lib64/libglib-2.0.so.0
#4 0x00007f748e5aee1c in g_main_context_iteration () at /usr/lib64/libglib-2.0.so.0
#5 0x00007f7494f4268f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#6 0x00007f7494eeb35a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib64/libQt5Core.so.5
#7 0x00007f7494d1b31a in QThread::exec() () at /usr/lib64/libQt5Core.so.5
#8 0x00007f7494d1fd2e in () at /usr/lib64/libQt5Core.so.5
#9 0x00007f74913174e7 in start_thread () at /lib64/libpthread.so.0
The pacrunner implementation of libproxy uses libdbus-1 which
(officially) is thread-safe, but experience tells that it has
problems. Since it is not running a JS engine, we don't need a thread,
but we do need to lock around it.
Change-Id: I84e45059a888497fb55ffffd14d2f638f21e807d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/network/kernel/kernel.pri')
-rw-r--r-- | src/network/kernel/kernel.pri | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/kernel.pri b/src/network/kernel/kernel.pri index a80b2d387e..2c5975182f 100644 --- a/src/network/kernel/kernel.pri +++ b/src/network/kernel/kernel.pri @@ -63,6 +63,6 @@ osx:SOURCES += kernel/qnetworkproxy_mac.cpp else:win32:SOURCES += kernel/qnetworkproxy_win.cpp else: qtConfig(libproxy) { SOURCES += kernel/qnetworkproxy_libproxy.cpp - QMAKE_USE_PRIVATE += libproxy + QMAKE_USE_PRIVATE += libproxy libdl } else:SOURCES += kernel/qnetworkproxy_generic.cpp |