Date: Tue, 17 Apr 2018 16:18:09 +0000 From: bugzilla-noreply@freebsd.org To: gnome@FreeBSD.org Subject: [Bug 226920] devel/glib20: pull the latest file monitor fix from upstream Message-ID: <bug-226920-6497-Ix5crYsMYK@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-226920-6497@https.bugs.freebsd.org/bugzilla/> References: <bug-226920-6497@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226920 --- Comment #16 from Ting-Wei Lan <lantw44@gmail.com> --- (In reply to lightside from comment #15) THere was an assertion failure in _kqsub_free on line 364: 360 static void 361 _kqsub_free (kqueue_sub *sub) 362 { 363 g_assert (sub->deps =3D=3D NULL); 364 g_assert (sub->fd =3D=3D -1); 365=20 366 g_source_unref ((GSource *) sub->source); 367 g_free (sub->filename); 368 g_slice_free (kqueue_sub, sub); 369 } _kqsub_free was called by g_kqueue_file_monitor_cancel on line 326. 323 if (kqueue_monitor->sub) 324 { 325 _kqsub_cancel (kqueue_monitor->sub); 326 _kqsub_free (kqueue_monitor->sub); 327 kqueue_monitor->sub =3D NULL; 328 } The previous function call, _kqsub_cancel, set sub->fd to -1 when it succee= ded. 371 static gboolean 372 _kqsub_cancel (kqueue_sub *sub) 373 { 374 struct kevent ev; 375=20 376 if (sub->deps) 377 { 378 dl_free (sub->deps); 379 sub->deps =3D NULL; 380 } 381=20 382 _km_remove (sub); 383=20 384 /* Only in the missing list? We're done! */ 385 if (sub->fd =3D=3D -1) 386 return TRUE; 387=20 388 EV_SET (&ev, sub->fd, EVFILT_VNODE, EV_DELETE, NOTE_ALL, 0, sub); 389 if (kevent (kq_queue, &ev, 1, NULL, 0, NULL) =3D=3D -1) 390 { 391 g_warning ("Unable to remove event for %s: %s", sub->filename, g_strerror (errno)); 392 return FALSE; 393 } 394=20 395 close (sub->fd); 396 sub->fd =3D -1; 397=20 398 return TRUE; 399 } For _kqsub_cancel to return without setting sub->fd to -1, it must return on line 392, which means the kevent call failed. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226920-6497-Ix5crYsMYK>