Bug 239100 - r348991 breaks unionfs
Summary: r348991 breaks unionfs
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-10 02:48 UTC by t_uemura
Modified: 2019-07-10 02:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description t_uemura 2019-07-10 02:48:10 UTC
With the following commit applied, my unionfs mount is almost dying.

https://svnweb.freebsd.org/base?view=revision&revision=348991
MFC r347151,347181,347968,348421,348698,348701:
Switch to use shared vnode locks for text files during image activation.

Mine is running FreeBSD 12.0-STABLE FWINA  amd64 as of 19 June 2019 and my unionfs setup is as follows.

/dev/nda0p2 on / (ufs, NFS exported, local, noatime, journaled soft-updates)
devfs on /dev (devfs, local)
<below>:/usr/portsl on /usr/ports (unionfs, local, noatime)

For example, I tried to build perl5 port by executing make build in /usr/ports/lang/perl5.30 and I got something like this.

Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
./Configure: cannot create testcpp.out: Text file busy
./Configure: cannot create testcpp.out: Text file busy
./Configure: cannot create testcpp.out: Text file busy
./Configure: cannot create testcpp.out: Text file busy
./Configure: cannot create testcpp.out: Text file busy
No dice.  I can't find a C preprocessor.  Name one: ^C===>  Script "Configure" failed unexpectedly.
Please report the problem to mat@FreeBSD.org [maintainer] and attach the
"/usr/ports/lang/perl5.30/work/perl-5.30.0/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

The actual errors I got vary time to time but most of them are Text file busy at some point during configure/build phase, and almost all the time the builds fail to finish.

By specifying WRKDIRPREFIX outside the unionfs such as WRKDIRPREFIX=/tmp works around the error, or by backing out the whole r348991 commit also fixes. By reverting only sys/fs/unionfs/union_subr.c to r339434 doesn't work.

Any ideas?