From owner-freebsd-stable@FreeBSD.ORG Mon Nov 21 07:16:42 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E5A1065673 for ; Mon, 21 Nov 2011 07:16:42 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA11.westchester.pa.mail.comcast.net (qmta11.westchester.pa.mail.comcast.net [76.96.59.211]) by mx1.freebsd.org (Postfix) with ESMTP id EAE688FC14 for ; Mon, 21 Nov 2011 07:16:41 +0000 (UTC) Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by QMTA11.westchester.pa.mail.comcast.net with comcast id zjDD1h0040ldTLk5BjGhbb; Mon, 21 Nov 2011 07:16:41 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta04.westchester.pa.mail.comcast.net with comcast id zjGg1h00W1t3BNj3QjGh8v; Mon, 21 Nov 2011 07:16:41 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id A24EE102C19; Sun, 20 Nov 2011 23:16:39 -0800 (PST) Date: Sun, 20 Nov 2011 23:16:39 -0800 From: Jeremy Chadwick To: Roy Stuivenberg Message-ID: <20111121071639.GA43757@icarus.home.lan> References: <1321856678.48792.9.camel@shadenet.roycs.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1321856678.48792.9.camel@shadenet.roycs.nl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: kernel: deget(): pcbmap returned 6 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2011 07:16:42 -0000 On Mon, Nov 21, 2011 at 07:24:38AM +0100, Roy Stuivenberg wrote: > Hello, > > I'm running FreeBSD 8.2 stable amd64 > > uname -a : > FreeBSD shadenet.roycs.nl 8.2-STABLE FreeBSD 8.2-STABLE #0: Thu Nov 17 > 16:54:43 CET 2011 > dhondub@shadenet.roycs.nl:/usr/obj/usr/src/sys/GENERIC-ROYCS amd64 > > I found this error msg in tail -f /var/log/messages > > kernel: deget(): pcbmap returned 6 This is an error that comes from the MSDOS filesystem driver. $ grep -rn "pcbmap returned" /usr/src/sys /usr/src/sys/fs/msdosfs/msdosfs_denode.c:278: printf("deget(): pcbmap returned %d\n", error); Relevant code bits: 272 if (ldep->de_StartCluster != MSDOSFSROOT) { 273 error = pcbmap(ldep, 0xffff, 0, &size, 0); 274 if (error == E2BIG) { 275 ldep->de_FileSize = de_cn2off(pmp, size); 276 error = 0; 277 } else 278 printf("deget(): pcbmap returned %d\n", error); 279 } Maybe someone forgot to add #ifdef MSDOSFS_DEBUG/#endif around the else bits. A comparison (same source file, just further down): 377 } else { 378 error = pcbmap(dep, de_clcount(pmp, length) - 1, 0, 379 &eofentry, 0); 380 if (error) { 381 #ifdef MSDOSFS_DEBUG 382 printf("detrunc(): pcbmap fails %d\n", error); 383 #endif 384 return (error); 385 } 386 } Annotation for RELENG_8: http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/fs/msdosfs/msdosfs_denode.c?annotate=1.102.2.6.2.1 The relevant error handler bit was committed 17 years ago, while jkh@ last touched the surrounding bits 13 years ago. pcbmap() is a function in src/sys/fs/msdosfs/msdosfs_fat.c. There are "specific" error values which can get returned within it (such as E2BIG and EIO), otherwise it appears to rely upon bread() function bits. If the error number actually correlates with errno.h, then error 6 is ENXIO, or "Device not configured". Your dmesg, which I have snipped for brevity, contains a *lot* of messing about with different removable media, etc.. You conveniently removed the timestamps from your tail -f on /var/log/messages, so if I had to take a guess, it was that you stuck a device that had a FAT or FAT32 filesystem on it which tickled said message. You would be able to determine when it started/stopped based on timestamps in /var/log/messages vs. what you were doing at the time. If it happened when you weren't at the computer, possibly a cron job or periodic job iterated over the filesystem and tickled the error message in question. I do not know who is responsible for msdosfs at this time. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB |