From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jack Holloway Newsgroups: gmane.emacs.bugs Subject: bug#6237: 23.2; INSUFFICIENT RESOURCES writing file via CIFS Date: Sat, 22 May 2010 00:49:56 -0700 Message-ID: <4BF78CA4.2090209@sprucehead.com> References: <4BF5F6A1.8020206@sprucehead.com> <4BF73D99.4060007@sprucehead.com> <83fx1kzbuh.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274515063 30679 80.91.229.12 (22 May 2010 07:57:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 May 2010 07:57:43 +0000 (UTC) Cc: 6237@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 22 09:57:41 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFjaX-0003vX-8T for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 May 2010 09:57:41 +0200 Original-Received: from localhost ([127.0.0.1]:59764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFjaW-0006fo-Nq for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 May 2010 03:57:40 -0400 Original-Received: from [140.186.70.92] (port=55409 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFja0-0006bg-VG for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 03:57:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFjZx-00062w-NJ for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 03:57:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58156) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFjZx-00062q-Jp for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 03:57:05 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OFjT9-0000kj-7P; Sat, 22 May 2010 03:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jack Holloway Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2010 07:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6237-submit@debbugs.gnu.org id=B6237.12745146012884 (code B ref 6237); Sat, 22 May 2010 07:50:03 +0000 Original-Received: (at 6237) by debbugs.gnu.org; 22 May 2010 07:50:01 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFjT6-0000kT-QI for submit@debbugs.gnu.org; Sat, 22 May 2010 03:50:01 -0400 Original-Received: from b.mail.sonic.net ([64.142.19.5]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFjT4-0000kN-6G for 6237@debbugs.gnu.org; Sat, 22 May 2010 03:49:59 -0400 Original-Received: from [127.0.0.1] (c-98-234-53-112.hsd1.ca.comcast.net [98.234.53.112]) (authenticated bits=0) by b.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id o4M7nsMc003766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 May 2010 00:49:54 -0700 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: <83fx1kzbuh.fsf@gnu.org> X-Antivirus: avast! (VPS 100522-0, 05/21/2010), Outbound message X-Antivirus-Status: Clean X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 22 May 2010 03:50:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37172 Archived-At: On 5/21/2010 11:31 PM, Eli Zaretskii wrote: >> Date: Fri, 21 May 2010 19:12:41 -0700 >> From: Jack Holloway >> Cc: 6237@debbugs.gnu.org >> >> Saving a 32MB file to a CIFS path fails. Examining Procmon >> events shows a return status "INSUFFICIENT RESOURCES" on a WriteFile >> with length 32MB. >> >> Perhaps write-region should break down the write into a series >> of blksize writes? >> > Can you see which size of a single write succeeds with that volume? > > Also, could you see how many bytes did it succeed to write before the > failure? > I tried successively larger buffers starting at 32KB, viz. Written 32K Written 48K Written 64K Written 96K Written 128K Written 192K Written 256K Written 384K Written 512K Written 768K Written 1024K Written 1536K Written 2048K Written 3072K Written 4096K Written 6144K Written 8192K Written 12288K Written 16384K Written 24576K !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-032768: Invalid argument) !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-049152: Invalid argument) !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-065536: Invalid argument) !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-098304: Invalid argument) !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-131072: Invalid argument) !!! Unable to append - (error IO error writing z:/Temp/test/temp-write-once-196608: Invalid argument) The would-be 32MB file exists, with zero length. >> copy-file doesn't have this problem. >> > The MS-Windows version of copy-file doesn't use WriteFile. It uses > CopyFile. > > Anyway, how did you use copy-file? Was the source file on the same > CIFS volume, or was it on a local disk? > > I've tried all 4 combinations of {internal, CIFS}*{src,dest} with transfer sizes up to 196MB without a problem, I was referring to DEFUN ("copy-file",...) in fileio.c which writes in 16K blocks, ... while ((n = emacs_read (ifd, buf, sizeof buf)) > 0) if (emacs_write (ofd, buf, n) != n) report_file_error ("I/O error", Fcons (newname, Qnil)); ... as opposed to DEFUN ("write-region",...) which, in this case, writes the entire buffer ... else if (XINT (start) != XINT (end)) { failure = 0 > a_write (desc, Qnil, XINT (start), XINT (end) - XINT (start), &annotations, &coding); save_errno = errno; } ... I know nothing about Windows internals, but it would seem that some downstream WinNT I/O routine can't handle 32MB or larger writes, so perhaps write-region could segment the write? The annotations hair makes it hard for me to see if this is easy. Jack