Bug#712848: FTBFS on kfreebsd-*: test-suite hangs and is killed after a timeout

Steven Chamberlain steven at pyro.eu.org
Wed Dec 16 01:23:39 UTC 2015


Hi,

I propose the attached patch for this.

Upstream hasn't replied on this issue in their tracker in months, but
for kfreebsd we need to do something, as a large backlog of packages are
BD-Uninstallable in sid due to this.

I think it is a recursion from the GUnixMountMonitor constructor, to a
GLocalFileMonitor on /etc/fstab, and into GUnixMountMonitor again, now
with a mutex already held, so it deadlocks.
https://bugzilla.gnome.org/page.cgi?id=traceparser/trace.html&trace_id=235354

That mutex in glocalfile.c:g_local_file_find_enclosing_mount() doesn't
seem necessary any more IMHO.  Inside it, only 'mount' is modified, but
that's just a stack variable local to this function.  When
klass->get_mount_for_mount_path is called, it's given one const
parameter and the other is unused, so they're unchanged. 'klass'
doesn't seem it could be modified either inside that function.

It doesn't recurse infinitely, but seems to work correctly and pass the
testsuite after this change.

The FreeBSD project already applied my patch in their ports tree, and
their users seem happy with it.

If you don't want to apply the patch, because you have concerns it could
create a regression on Linux, the mutex lock/unlock could be wrapped in
#ifndef __FreeBSD_kernel__ instead.

But I'm surprised the deadlock issue hasn't been seen on Linux, as the
same generic "unix" implementation is used there as for kfreebsd.

Thanks.
Regards,
-- 
Steven Chamberlain
steven at pyro.eu.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bug712848-volume-monitor-deadlock-kfreebsd.patch
Type: text/x-diff
Size: 557 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20151216/c33a7d4c/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20151216/c33a7d4c/attachment.sig>


More information about the pkg-gnome-maintainers mailing list