David Naylor
2008-Feb-16 23:35 UTC
tmpfs: strange behaviour (was: broken buildkernel (scsi_low and -Os) and duplicate manpages)
On 14/02/2008, Oliver Fromme <olli@lurza.secnetix.de> wrote:> David Naylor wrote: > > It is a strange problem, normal installworld works fine, but somehow > > the duplicate manpages result in a failure when installing with > > DESTDIR=, here are some possible reasons: > > > > 1) I use tmpfs when using DESTDIR (could be tmpfs does something strange) > > 2) Base system (compiled and installed) is compiled using -O2??? > > What is the exact CFLAGS setting that you use? > Do you use -O2 (or -Os) without -fno-strict-aliasing?I have managed to isolate the problem and it is definitely tmpfs related. If the directory that I'm installing into is tmpfs then it will fail, if it is ufs then it works. I recompiled tmpfs module (and reloaded) with CFLAGS='' with the same result. As an aside I have found that the default CFLAGS for src are: -O2 -fno-strict-aliasing -pipe. Would -fstrict-aliasing break anything in base/sys? David
Kostik Belousov
2008-Feb-17 02:45 UTC
tmpfs: strange behaviour (was: broken buildkernel (scsi_low and -Os) and duplicate manpages)
On Sun, Feb 17, 2008 at 09:35:28AM +0200, David Naylor wrote:> On 14/02/2008, Oliver Fromme <olli@lurza.secnetix.de> wrote: > > David Naylor wrote: > > > It is a strange problem, normal installworld works fine, but somehow > > > the duplicate manpages result in a failure when installing with > > > DESTDIR=, here are some possible reasons: > > > > > > 1) I use tmpfs when using DESTDIR (could be tmpfs does something strange) > > > 2) Base system (compiled and installed) is compiled using -O2??? > > > > What is the exact CFLAGS setting that you use? > > Do you use -O2 (or -Os) without -fno-strict-aliasing? > I have managed to isolate the problem and it is definitely tmpfs > related. If the directory that I'm installing into is tmpfs then it > will fail, if it is ufs then it works. > > I recompiled tmpfs module (and reloaded) with CFLAGS='' with the same result. > > As an aside I have found that the default CFLAGS for src are: -O2 > -fno-strict-aliasing -pipe. Would -fstrict-aliasing break anything in > base/sys?I suspect this is a known issue. See the following commit: delphij 2007-11-18 04:52:41 UTC FreeBSD src repository Modified files: sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vfsops.c tmpfs_vnops.c Log: MFp4: Several fixes to tmpfs which makes it to survive from pho@'s strees2 suite, to quote his letter, this change: 1. It removes the tn_lookup_dirent stuff. I think this cannot be fixed, because nothing protects vnode/tmpfs node between lookup is done, and actual operation is performed, in the case the vnode lock is dropped. At least, this is the case with the from vnode for rename. For now, we do the linear lookup in the parent node. This has its own drawbacks. Not mentioning speed (that could be fixed by using hash), the real problem is the situation where several hardlinks exist in the dvp. But, I think this is fixable. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Esp. this part. 2. The patch restores the VV_ROOT flag on the root vnode after it became reclaimed and allocated again. This fixes MPASS assertion at the start of the tmpfs_lookup() reported by many. Submitted by: kib Revision Changes Path 1.12 +2 -6 src/sys/fs/tmpfs/tmpfs.h 1.13 +25 -3 src/sys/fs/tmpfs/tmpfs_subr.c 1.14 +0 -1 src/sys/fs/tmpfs/tmpfs_vfsops.c 1.12 +19 -23 src/sys/fs/tmpfs/tmpfs_vnops.c -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20080217/7b6e4e42/attachment.pgp
David Naylor wrote: > Oliver Fromme wrote: > > What is the exact CFLAGS setting that you use? > > Do you use -O2 (or -Os) without -fno-strict-aliasing? > > I have managed to isolate the problem and it is definitely tmpfs > related. If the directory that I'm installing into is tmpfs then it > will fail, if it is ufs then it works. > > I recompiled tmpfs module (and reloaded) with CFLAGS='' with the same result. > > As an aside I have found that the default CFLAGS for src are: -O2 > -fno-strict-aliasing -pipe. For most parts of src, but some override it. > Would -fstrict-aliasing break anything in base/sys? I think src/sys is clean with regards to aliasing, but I'm not 100% sure. Someone please correct me if I'm wrong. I recommend not to put a CFLAGS line in /etc/make.conf at all. So far I haven't seen an example of a really useful CFLAGS line in this thread, but several examples that could possibly cause damage. It's best not to override the default (which is there for a reason). If you want better optimization, a appropriate CPUTYPE=... line is probably a better idea. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Gesch?ftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M?n- chen, HRB 125758, Gesch?ftsf?hrer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "We, the unwilling, led by the unknowing, are doing the impossible for the ungrateful. We have done so much, for so long, with so little, we are now qualified to do anything with nothing." ? ? ? ? -- Mother Teresa