Bug 179909 - [GLIB] Test FileMonitorTest.DetectChangeAndThenDelete sometimes crashes
Summary: [GLIB] Test FileMonitorTest.DetectChangeAndThenDelete sometimes crashes
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
Keywords: Gtk, InRadar
Depends on:
Reported: 2017-11-21 01:12 PST by Carlos Garcia Campos
Modified: 2017-12-22 14:22 PST (History)
3 users (show)

See Also:

Patch (3.90 KB, patch)
2017-11-21 01:16 PST, Carlos Garcia Campos
mcatanzaro: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2017-11-21 01:12:36 PST
#0  _ih_sub_free (sub=0xaaaaaaaaaaaaaaaa) at inotify-sub.c:67
#1  0x00007f7346d8925e in g_inotify_file_monitor_cancel (monitor=<optimized out>) at ginotifyfilemonitor.c:76
#2  0x00007f7346ccda33 in g_file_monitor_cancel (monitor=0x5581b1bac380) at gfilemonitor.c:237
#3  0x00007f7346ccdabc in g_file_monitor_dispose (object=0x5581b1bac380) at gfilemonitor.c:122
#4  0x00007f7346d5c071 in g_local_file_monitor_dispose (object=0x5581b1bac380) at glocalfilemonitor.c:791
#5  0x00007f7347e61353 in g_object_unref (_object=0x5581b1bac380) at gobject.c:3293
#6  0x00005581af86e183 in WTF::RunLoop::performWork() ()
#7  0x00005581af8adab9 in WTF::RunLoop::RunLoop()::{lambda(void*)#1}::_FUN(void*) ()
#8  0x00007f7347b85405 in g_main_dispatch (context=0x7f73240008c0) at gmain.c:3148
#9  g_main_context_dispatch (context=context@entry=0x7f73240008c0) at gmain.c:3813
#10 0x00007f7347b857a8 in g_main_context_iterate (context=0x7f73240008c0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at gmain.c:3886
#11 0x00007f7347b85ab2 in g_main_loop_run (loop=0x7f7324001200) at gmain.c:4082
#12 0x00005581af8ae488 in WTF::RunLoop::run() ()
#13 0x00005581af8ad452 in WTF::Function<void ()>::CallableWrapper<WTF::WorkQueue::platformInitialize(char const*, WTF::WorkQueue::Type, WTF::WorkQueue::QOS)::{lambda()#1}>::call() ()
#14 0x00005581af86f83b in WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*) ()
#15 0x00005581af8ac5c9 in WTF::wtfThreadEntryPoint(void*) ()
#16 0x00007f7342c6f494 in start_thread (arg=0x7f732b1ff700) at pthread_create.c:333
#17 0x00007f733cb6fabf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97

I think the problem is that the GFileMonitor is created in the main thread, but destroyed in the work queue thread.
Comment 1 Carlos Garcia Campos 2017-11-21 01:16:32 PST
Created attachment 327393 [details]
Comment 2 Michael Catanzaro 2017-11-21 08:25:53 PST
Comment on attachment 327393 [details]

Aaah, this one had stumped me.

I think it's correct.
Comment 3 Carlos Garcia Campos 2017-11-21 08:53:50 PST
Committed r225081: <https://trac.webkit.org/changeset/225081>
Comment 4 Radar WebKit Bug Importer 2017-11-21 08:54:23 PST