Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 95012 invoked from network); 29 Sep 2010 14:50:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Sep 2010 14:50:37 -0000 Received: (qmail 52520 invoked by uid 500); 29 Sep 2010 14:50:36 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 52354 invoked by uid 500); 29 Sep 2010 14:50:34 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 52346 invoked by uid 99); 29 Sep 2010 14:50:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 14:50:33 +0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cliffywills@aol.com designates 205.188.105.147 as permitted sender) Received: from [205.188.105.147] (HELO imr-da05.mx.aol.com) (205.188.105.147) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Sep 2010 14:50:25 +0000 Received: from mtaout-db02.r1000.mx.aol.com (mtaout-db02.r1000.mx.aol.com [172.29.51.194]) by imr-da05.mx.aol.com (8.14.1/8.14.1) with ESMTP id o8TEnpTk020183 for ; Wed, 29 Sep 2010 10:49:51 -0400 Received: from [10.0.0.10] (unknown [92.1.146.206]) by mtaout-db02.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPA id 581A3E0000B0 for ; Wed, 29 Sep 2010 10:49:50 -0400 (EDT) Message-ID: <4CA3520C.7050606@aol.com> Date: Wed, 29 Sep 2010 15:49:48 +0100 From: Cliff Williams User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.11pre) Gecko/20100922 Shredder/3.1.5pre MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: Couchdb crashes on Windows References: <4C9DDCE2.3050307@aol.com> <4C9DE9D0.5090002@aol.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------010606010603030404010407" x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:459861920:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d33c24ca3520e76f6 X-AOL-IP: 92.1.146.206 --------------010606010603030404010407 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Dave, I hope you are well I too began to look at this a couple of nights ago. The process that I was going to follow; Establish a base case Write some file IO tests Apply these tests to the Couchdb environment and see what differences popped out. At the very least I thought that I could produce some tests to ascertain why 1.01 is misbehaving on windows, if Erlang is problematic and to use as future tests for new releases of Couchdb on windows. I downloaded the latest full Erlang windows binary as my base case (currently R14B) and wrote the following very simple bit of code as my first test -module(filetest). -export([main/0]). main() -> {ok, Binary}=file:read_file("blanks"), {ok, WriteDescr} = file:open(filetest.txt, [raw, append]), loop(1000, WriteDescr,Binary), file:close(WriteDescr). loop(0,_NotNeeded,_NotNeeded) -> ok; loop(N,WriteDescr,Binary) -> file:write(WriteDescr,Binary), loop(N-1,WriteDescr,Binary). Note blanks is a zero filled file of about 2.2MB that i originally used to confirm that i had the same issues as Peter first reported. Run with a loop of 10 and you get a twenty MB file ........... nice Run again with a loop of 10 and you get a Forty MB file ......... nice delete filetest.txt Run again with a loop of 2000 and you get a file in excess of 4GB .......... nice .......... but slow delete filetest.txt Run again with a loop of 4000 and you get a file in excess of 8GB ...........nice............but very slow Now everything seems fine and dandy but ....... Delete filetest.txt Run with a loop of 10 and you get a twenty MB file ........... nice Run again with a loop of 10 and you get a Forty MB file ......... nice Run again with a loop of 2000 and you get a file in excess of 4GB .......... nice .......... but slow Run again with a loop of 2000 and the program begins to "append" from the beginning of the file so the file does not grow but instead gets overwritten. This behaviour seems to occur at the 4GB file size on change of file descriptor ............. not nice ....... not good. I've had a look at the way Erlang is compiled for windows and there are a couple of flags pertaining to large file support. Over the next few days I will attempt my own compilation of Erlang with these flags set and report back. (Need to get hold of VC++ first) regards Cliff On 29/09/10 01:02, Dave Cottlehuber wrote: > On 26 September 2010 10:11, Peter Somers wrote: >> Hi Dave, >> >> No luck. Couchdb crashed again :-( >> >> I really hope someone can help me on this issue... >> >> Best regards, >> >> Peter > Hi Peter > > There may be 2 things going on here. > > - your current crash appears to be due to file corruption; > - {{badmatch,{error,file_corruption}}, > this is after couch reads an md5 hash in read_raw_iolist_int - maybe > due to going over length, I can't tell. > > - your first crash is the one I can replicate - the whole VM dies with > a memory allocation issue. I can replicate this on my win7 enterprise > couch running 1.01, but not 0.11.0. > > I can load the DB up to this size; 0xffd9a0f6d, couchdb dies: > > {{badmatch,{error,enomem}}, [{couch_file,read_raw_iolist_int,3}, > {couch_file,handle_call,3}, > > Restarting windows/couchdb& then curl http://localhost:5984/fatso yields > {"error":"kill","reason":"{gen_server,call, > [couch_server, > {open,<<\"fatso\">>, > [{user_ctx, > {user_ctx,null, > [<<\"_admin\">>], > <<\"{couch_httpd_auth, > default_authentication_handler}\">>}}]}, > infinity]}"} > > Anyway some more work ahead to identify exactly where this comes from > - thanks for raising the jira. > > cheers > Dave > --------------010606010603030404010407--