⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286132 in webkit


Ignore:
Timestamp:
Nov 23, 2021, 5:20:27 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Many network process crashes when running WPT tests
https://bugs.webkit.org/show_bug.cgi?id=232629

Reviewed by Martin Robinson.

For some reason there's a runtime critical warning coming from GLib under flatpak when trying to inherit the
current thread scheduler settings in newly created ones. As a workaround we don't use QOS::Background for
network cache background IO queue when running under flatpak.

  • NetworkProcess/cache/NetworkCacheStorage.cpp:

(WebKit::NetworkCache::qosForBackgroundIOQueue):
(WebKit::NetworkCache::Storage::Storage):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r286130 r286132  
     12021-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Many network process crashes when running WPT tests
     4        https://bugs.webkit.org/show_bug.cgi?id=232629
     5
     6        Reviewed by Martin Robinson.
     7
     8        For some reason there's a runtime critical warning coming from GLib under flatpak when trying to inherit the
     9        current thread scheduler settings in newly created ones. As a workaround we don't use QOS::Background for
     10        network cache background IO queue when running under flatpak.
     11
     12        * NetworkProcess/cache/NetworkCacheStorage.cpp:
     13        (WebKit::NetworkCache::qosForBackgroundIOQueue):
     14        (WebKit::NetworkCache::Storage::Storage):
     15
    1162021-11-23  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp

    r284135 r286132  
    4343#include <wtf/text/StringToIntegerConversion.h>
    4444
     45#if USE(GLIB)
     46#include <wtf/glib/Sandbox.h>
     47#endif
     48
    4549namespace WebKit {
    4650namespace NetworkCache {
     
    262266}
    263267
     268static WorkQueue::QOS qosForBackgroundIOQueue()
     269{
     270#if USE(GLIB)
     271    // FIXME: for some reason there's a runtime critical warning coming from GLib under flatpak when trying to
     272    // inherit the current thread scheduler settings in newly created ones. See https://bugs.webkit.org/show_bug.cgi?id=232629.
     273    if (isInsideFlatpak())
     274        return WorkQueue::QOS::Default;
     275#endif
     276    return WorkQueue::QOS::Background;
     277}
     278
    264279Storage::Storage(const String& baseDirectoryPath, Mode mode, Salt salt, size_t capacity)
    265280    : m_basePath(baseDirectoryPath)
     
    271286    , m_writeOperationDispatchTimer(*this, &Storage::dispatchPendingWriteOperations)
    272287    , m_ioQueue(ConcurrentWorkQueue::create("com.apple.WebKit.Cache.Storage"))
    273     , m_backgroundIOQueue(ConcurrentWorkQueue::create("com.apple.WebKit.Cache.Storage.background", WorkQueue::QOS::Background))
     288    , m_backgroundIOQueue(ConcurrentWorkQueue::create("com.apple.WebKit.Cache.Storage.background", qosForBackgroundIOQueue()))
    274289    , m_serialBackgroundIOQueue(WorkQueue::create("com.apple.WebKit.Cache.Storage.serialBackground", WorkQueue::QOS::Background))
    275290    , m_blobStorage(makeBlobDirectoryPath(baseDirectoryPath), m_salt)
Note: See TracChangeset for help on using the changeset viewer.