NetBSD Problem Report #44092

From www@NetBSD.org  Mon Nov 15 09:54:57 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 1B39A63BAC9
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 15 Nov 2010 09:54:57 +0000 (UTC)
Message-Id: <20101115095456.EB29163BA50@www.NetBSD.org>
Date: Mon, 15 Nov 2010 09:54:56 +0000 (UTC)
From: alexej.d@email.cz
Reply-To: alexej.d@email.cz
To: gnats-bugs@NetBSD.org
Subject: Cannot copy (/bin/cp)  to smbfs-mounted partition
X-Send-Pr-Version: www-1.0

>Number:         44092
>Category:       kern
>Synopsis:       Cannot copy (/bin/cp)  to smbfs-mounted partition
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 15 09:55:00 +0000 2010
>Closed-Date:    Sun Dec 30 07:38:51 +0000 2012
>Last-Modified:  Sun Dec 30 07:38:51 +0000 2012
>Originator:     Alexej
>Release:        5.1, 6.0_BETA
>Organization:
>Environment:
NetBSD dinah.gts.cz 5.1 NetBSD 5.1 (GENERIC) #0: Sun Nov  7 14:39:56 UTC 2010  builds@b6.netbsd.org:/home/builds/ab/netbsd-5-1-RELEASE/i386/201011061943Z-obj/home/builds/ab/netbsd-5-1-RELEASE/src/sys/arch/i386/compile/GENERIC i386

>Description:
After mount_smbfs remote filesystem it is not possible to copy file to it: I can read the FS, can create zero-length files on it, can edit and save files on it but can not copy file to it. With NetBSD 4.0.1 it worked... 

$ sudo cp mine.xls /mnt/u/S/Upgrade_2006/
cp: /mnt/u/S/Upgrade_2006/mine.xls: No buffer space available
$ 

from /var/log/messages: 

Nov 15 10:49:24 dinah /netbsd: WARNING: mclpool limit reached; increase NMBCLUSTERS

ALso I tried to increase 'NMBCLUSTERS' 10x in kernel, recompile it but it did'n help: I got the old same "mclpool limit reached"

>How-To-Repeat:
Use /sbin/mount_smbfs and /bin/cp some non-zero length file to it. 
>Fix:

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44092: Cannot copy (/bin/cp)  to smbfs-mounted
 partition
Date: Mon, 15 Nov 2010 21:01:32 +0000

 On Mon, Nov 15, 2010 at 09:55:00AM +0000, alexej.d@email.cz wrote:
  > After mount_smbfs remote filesystem it is not possible to copy file
  > to it: I can read the FS, can create zero-length files on it, can
  > edit and save files on it but can not copy file to it. With NetBSD
  > 4.0.1 it worked...
  > 
  > $ sudo cp mine.xls /mnt/u/S/Upgrade_2006/
  > cp: /mnt/u/S/Upgrade_2006/mine.xls: No buffer space available
  > $ 
  > [...]
  > Nov 15 10:49:24 dinah /netbsd: WARNING: mclpool limit reached;
  > increase NMBCLUSTERS 
  > 
  > ALso I tried to increase 'NMBCLUSTERS' 10x in kernel, recompile it
  > but it did'n help: I got the old same "mclpool limit reached"
  > 

 Is mine.xls large? (Does this happen even with small files?) Does "cat
 mine.xls > /mnt/u/S/Upgrade_2006/mine.xls" also fail?

 My understanding is that smbfs is considered experimental in the
 netbsd-5 branch and can't really be expected to work, but I thought it
 worked a little better than this.

 If the answer is that mine.xls is large, small files work ok, and cat
 also works, then this is moderately likely to make the problem go
 away:

    cd /usr/src/bin/cp
    cvs update -j1.34 -j1.36 utils.c
    make obj
    make dependall install

 If this is the case please let us know.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Alexej D." <alexej.d@email.cz>
To: gnats-bugs@NetBSD.org
Cc: David Holland <dholland-bugs@netbsd.org>, 
 port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org, 
 netbsd-bugs@netbsd.org
Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted partition
Date: Tue, 16 Nov 2010 11:25:30 +0100

 Hello David,

 I played with file size, and found that both commands cp/cat work while 
 size is <= 136 bytes. That's interesting :)

 Yours,
 Alexej.

 ---
 On 11/15/10 22:05, David Holland wrote:
 > The following reply was made to PR port-i386/44092; it has been noted by GNATS.
 >
 > From: David Holland<dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: port-i386/44092: Cannot copy (/bin/cp)  to smbfs-mounted
 >   partition
 > Date: Mon, 15 Nov 2010 21:01:32 +0000
 >
 >   On Mon, Nov 15, 2010 at 09:55:00AM +0000, alexej.d@email.cz wrote:
 >    >  After mount_smbfs remote filesystem it is not possible to copy file
 >    >  to it: I can read the FS, can create zero-length files on it, can
 >    >  edit and save files on it but can not copy file to it. With NetBSD
 >    >  4.0.1 it worked...
 >    >
 >    >  $ sudo cp mine.xls /mnt/u/S/Upgrade_2006/
 >    >  cp: /mnt/u/S/Upgrade_2006/mine.xls: No buffer space available
 >    >  $
 >    >  [...]
 >    >  Nov 15 10:49:24 dinah /netbsd: WARNING: mclpool limit reached;
 >    >  increase NMBCLUSTERS
 >    >
 >    >  ALso I tried to increase 'NMBCLUSTERS' 10x in kernel, recompile it
 >    >  but it did'n help: I got the old same "mclpool limit reached"
 >    >
 >
 >   Is mine.xls large? (Does this happen even with small files?) Does "cat
 >   mine.xls>  /mnt/u/S/Upgrade_2006/mine.xls" also fail?
 >
 >   My understanding is that smbfs is considered experimental in the
 >   netbsd-5 branch and can't really be expected to work, but I thought it
 >   worked a little better than this.
 >
 >   If the answer is that mine.xls is large, small files work ok, and cat
 >   also works, then this is moderately likely to make the problem go
 >   away:
 >
 >      cd /usr/src/bin/cp
 >      cvs update -j1.34 -j1.36 utils.c
 >      make obj
 >      make dependall install
 >
 >   If this is the case please let us know.
 >
 >   --
 >   David A. Holland
 >   dholland@netbsd.org
 >
 >

From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted
 partition
Date: Tue, 16 Nov 2010 21:11:07 +0000

 On Tue, Nov 16, 2010 at 11:40:04AM +0000, Alexej D. wrote:
  >  I played with file size, and found that both commands cp/cat work while 
  >  size is <= 136 bytes. That's interesting :)

 Rather odd... not the case I was thinking of at all, anyhow.

 Maybe someone will speak up but I suspect the only useful advice here
 is to run -current. (You don't have to install a -current userland,
 just run the kernel. Make sure it has COMPAT_50 in it, and since
 you're on i386 use MONOLITHIC or you get into a mess with modules.)

 -- 
 David A. Holland
 dholland@netbsd.org

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted partition
Date: Tue, 16 Nov 2010 23:07:54 -0500

 On Tue, Nov 16, 2010 at 09:15:06PM +0000, David Holland wrote:
 > The following reply was made to PR port-i386/44092; it has been noted by GNATS.
 > 
 > From: David Holland <dholland-bugs@netbsd.org>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted
 >  partition
 > Date: Tue, 16 Nov 2010 21:11:07 +0000
 > 
 >  On Tue, Nov 16, 2010 at 11:40:04AM +0000, Alexej D. wrote:
 >   >  I played with file size, and found that both commands cp/cat work while 
 >   >  size is <= 136 bytes. That's interesting :)
 >  
 >  Rather odd... not the case I was thinking of at all, anyhow.
 >  
 >  Maybe someone will speak up but I suspect the only useful advice here
 >  is to run -current. (You don't have to install a -current userland,
 >  just run the kernel. Make sure it has COMPAT_50 in it, and since
 >  you're on i386 use MONOLITHIC or you get into a mess with modules.)

 I have the same problem, too, ever since I've upgraded to 5.1RC4.
 It was working fine (FSVO "fine"; cf. PR 37025) before. I've also cranked
 up NMBCLUSTERS *= 8 but it didn't help. 

 Btw, I don't really feel comfortable going to -current because of
 this. Production machine etc. pp. Luckily there's pkgsrc's samba.

 This, though, is a clear regression from 5.0!

 Regards,

 -Martin

From: "Martin S. Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted partition
Date: Tue, 16 Nov 2010 23:24:23 -0500

 On Wed, Nov 17, 2010 at 04:10:05AM +0000, Martin S. Weber wrote:
 >  I have the same problem, too, ever since I've upgraded to 5.1RC4.
 >  It was working fine (FSVO "fine"; cf. PR 37025) before. I've also cranked
 >  up NMBCLUSTERS *= 8 but it didn't help. 

 Oh yeah, netstat -m shows after bootup 264 buffers in use, 263 for data
 and 1 for socket something. 0 calls to drain routines.

 Another machine I have (from which I'm writing this atm) has 58 in
 use, after 50+h of uptime, 46 data / 10 headers.

 once I start writing to smbfs, I get (on the failing machine, the 5.1RC4),
 an increase in draining routines (0->5 or so), but still the mbufs
 in use slighly increases.

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, port-i386-maintainer@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, alexej.d@email.cz
Cc: 
Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted partition
Date: Wed, 17 Nov 2010 08:31:31 -0500

 On Nov 17,  4:10am, Ephaeton@gmx.net ("Martin S. Weber") wrote:
 -- Subject: Re: port-i386/44092: Cannot copy (/bin/cp) to smbfs-mounted parti

 |  I have the same problem, too, ever since I've upgraded to 5.1RC4.
 |  It was working fine (FSVO "fine"; cf. PR 37025) before. I've also cranked
 |  up NMBCLUSTERS *= 8 but it didn't help. 
 |  
 |  Btw, I don't really feel comfortable going to -current because of
 |  this. Production machine etc. pp. Luckily there's pkgsrc's samba.
 |  
 |  This, though, is a clear regression from 5.0!
 |  

 Can you undo the diff from 5.0 in netsmb and see if that works?

 christos

From: "Martin Weber" <Ephaeton@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: port-i386/44092
Date: Wed, 17 Nov 2010 18:13:40 +0100

 I rolled back $SRC/sys/netsmb to NETBSD-5-0-RELEASE, rebuilt a kernel and now it's working again (note: with NMBCLUSTERS *= 8). 
 (although the mbuf usage didn't really drop).

 Shall we assume that the ints that were replaced by size_t's should've been replaced by ssize_t's instead?

 Anyways, I've done rebooting for the day; if you want me/us to run more tests, get debug output or whatever, I can do more tomorrow.

 Regards,

 -Martin
 -- 
 Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
 Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

Responsible-Changed-From-To: port-i386-maintainer->kern-bug-people
Responsible-Changed-By: tron@NetBSD.org
Responsible-Changed-When: Tue, 23 Nov 2010 16:32:55 +0000
Responsible-Changed-Why:
This is not a NetBSD/i386 specific bug, move to the correct category.


From: "Martin S. Weber" <Ephaeton@gmx.net>
To: NetBSD Problem Report DB Administrator <gnats@NetBSD.org>
Cc: 
Subject: Re: kern/44092
Date: Thu, 12 Apr 2012 17:49:54 -0400

 For the record: this bug is still present on NetBSD-6.0_BETA (this week's sources).

From: "Takeshi Nakayama" <nakayama@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: src/sys/netsmb
Date: Fri, 11 May 2012 14:51:39 +0000

 Module Name:	src
 Committed By:	nakayama
 Date:		Fri May 11 14:51:39 UTC 2012

 Modified Files:
 	src/sys/netsmb: subr_mchain.c

 Log Message:
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.

 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.21 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: nakayama@NetBSD.org
State-Changed-When: Fri, 11 May 2012 14:59:35 +0000
State-Changed-Why:
Please try the revision 1.21 of src/sys/netsmb/subr_mchain.c.


From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-6] src/sys/netsmb
Date: Sat, 19 May 2012 15:25:53 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 15:25:53 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-6]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #265):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.20 -r1.20.14.1 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-5] src/sys/netsmb
Date: Sat, 19 May 2012 17:03:10 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 17:03:09 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-5]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #1758):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15.6.1 -r1.15.6.2 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-5-0] src/sys/netsmb
Date: Sat, 19 May 2012 17:03:45 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 17:03:45 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-5-0]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #1758):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15.12.1 -r1.15.12.2 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-5-1] src/sys/netsmb
Date: Sat, 19 May 2012 17:04:19 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 17:04:19 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-5-1]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #1758):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.15.6.1 -r1.15.6.1.2.1 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-4] src/sys/netsmb
Date: Sat, 19 May 2012 17:06:49 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 17:06:49 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-4]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #1445):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13.18.1 -r1.13.18.2 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Jeff Rizzo" <riz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/44092 CVS commit: [netbsd-4-0] src/sys/netsmb
Date: Sat, 19 May 2012 17:07:50 +0000

 Module Name:	src
 Committed By:	riz
 Date:		Sat May 19 17:07:50 UTC 2012

 Modified Files:
 	src/sys/netsmb [netbsd-4-0]: subr_mchain.c

 Log Message:
 Pull up following revision(s) (requested by nakayama in ticket #1445):
 	sys/netsmb/subr_mchain.c: revision 1.21
 Since "len" has changed to (unsinged) size_t, the while loop
 condition (len > 0) became less able to detect its underflow.
 So check the subtrahend to avoid the underflow.
 Should fix PR kern/44092.


 To generate a diff of this commit:
 cvs rdiff -u -r1.13.28.1 -r1.13.28.2 src/sys/netsmb/subr_mchain.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Alexej Demjanenko <alexej.demjanenko@newtel.cz>
To: gnats-bugs@gnats.netbsd.org
Cc: 
Subject: Re: kern/44092 - non-critical low priority sw-bug
Date: Thu, 20 Sep 2012 09:34:50 +0200

 Hi Jeff, everybody,=20

 I'm sorry I've moved to linux (Debian) after ~15 years of using
 Free/NetBSD. Hope the bug is fixed successfully.=20

 Alexej.


State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 30 Dec 2012 07:38:51 +0000
State-Changed-Why:
Feedback received in September; submitter cannot test.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.