Date: Wed, 14 Mar 2007 17:10:41 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: David Cecil <david.cecil@nokia.com> Cc: freebsd-fs@freebsd.org Subject: Re: FFS writes to read-only mount Message-ID: <20070314161041.GI7847@garage.freebsd.pl> In-Reply-To: <45F776AE.8090702@nokia.com> References: <45F776AE.8090702@nokia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, Mar 14, 2007 at 02:14:38PM +1000, David Cecil wrote: > Hi, > > I have seen the following message (or equivalent) occasionally on a FreeBSD 6.1 system: > g_vfs_done():mirror/gm0s1a[WRITE(offset=1349091328, length=16384)]error = 1 > > The partition in question is the root partition, and it is mounted read-only. I have verified that the problem occurs due to the write request returning EPERM due to the > check in g_io_check: > case BIO_WRITE: > case BIO_DELETE: > if (cp->acw == 0) > return (EPERM); > > I have been trying to determine what within FFS would be trying to write to the partition. The "bio_from" in the bio structure indicates (in the geom) that it's > ffs.mirror/gm0s1a that's trying to write. The contents of the buffer looks somewhat like a directory (lots of files listed, but comparison to the actual directory that > contians these files reveals it's somewhat different), followed by a binary (ELF header). However, I'm at a loss to understand who's actually doing the writing. Is it > coming from within FFS or is there an application that's done the write? (I can't understand how an application would be permitted to do it though.) > > I have seen this sort of problem (same error number) reported on the Internet occasionally, but it doesn't seem it's been satisfactorily resolved in all instances. > > Any help you can provide would be much appreciated. Will be good if you could place kdb_enter() into g_vfs_done() error path and once in DDB try which processes wait for I/O and collect their backtraces or just put output of 'alltrace' on some web page. -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFF+B6BForvXbEpPzQRAsmUAJ9q1BSCE2MK3t5A6FbOCbWm6x09+wCg5Lso 7/uhJVDJt/nw9ZFsc9o6FNQ= =3qfq -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070314161041.GI7847>
