From: Ingo Koehne Subject: Re: unable to umount after chroot to a NFS mounted partition Date: Fri, 10 May 2002 16:16:45 +0200 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <20020510141645.GA1367@noo.localnet> References: <20020505170924.GA837@noo.localnet> <15573.35005.147582.796024@charged.uio.no> <20020505203431.GA893@noo.localnet> <20020506061824.GA18214@noo.localnet> <20020508102808.GA13800@noo.localnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux FSdevel Return-path: To: Trond Myklebust Content-Disposition: inline In-Reply-To: <20020508102808.GA13800@noo.localnet> List-Id: linux-fsdevel.vger.kernel.org ok, i think i have an explanation. and as this topic does not seem too intersting for everybody around, this will probably be EOT. On Wed, May 08, 2002 at 12:28:08PM +0200, Ingo Koehne wrote: > i found out that the f_count of the executable beeing started > via chroot is not 0 after it exits. > this is due to non balanced calls to get_file() and fput() in > nfs_create_request() and nfs_release_request(). > it happens only the first > time it is started after the fs has been mounted and the missing > release happens if you do the chroot with the same executable a second time. The last async read for the executable file never gets sent off over the network. There are no more succeeding reads that would cause an nfs_pagein_inode() in nfs_readpage_async(). It does not get flushed at process exit as open()ed files are. And the page belonging to that read gets unmapped before any nfs_page_sync() is requested. > when having excessive printk in the kernel and the kernel slows down > considerably the problem does not occur. > curionsly it depends on the executable being started and for some > executables even on the command line options. > > i still have no idea how this can have anything to do with chroot All these items occur because this is a race condition between the page_sync and the unmapping of that page (eh, i really do dot exactly know what a race condition is, but the name is appropriate at least :). this is heavily affect by the timing of the events, it might also be possible that the problem only occurs an a slow ethernet (10Mb) like mine. questions remain: i really do not know if unmapping is supposed to sync_page and how the file mapping stuff works is quite opaque to me, so i will probably have got sth wrong. hope i have not been too annoying. kernel debugging is quite fun anyway (it would be easier for newbies with a few more comments in the code, though). bye ingo