Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 78466 invoked from network); 29 May 2009 03:09:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 May 2009 03:09:19 -0000 Received: (qmail 72845 invoked by uid 500); 29 May 2009 03:09:12 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 72802 invoked by uid 500); 29 May 2009 03:09:12 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 72792 invoked by uid 99); 29 May 2009 03:09:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 03:09:12 +0000 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=FS_REPLICA,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of antony.blakey@gmail.com designates 209.85.220.163 as permitted sender) Received: from [209.85.220.163] (HELO mail-fx0-f163.google.com) (209.85.220.163) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 May 2009 03:09:03 +0000 Received: by fxm7 with SMTP id 7so7113645fxm.11 for ; Thu, 28 May 2009 20:08:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=M4CuNdXz6DdX3iYMqMRRUUlqnlQAGfF1cSHbv/WZQlg=; b=QFEWN04nxDf2vzwcxdB4dUuDZcvGgBQw2pKgfE6rOYpnHoZxjw2haK6GoykD3d5zY5 14hrwtlaBvliiOaSndRwkwkSctfMK4i4u47ibj+yrmAbOTs/p0hEG8yNZEBN4uwoDclT /HZgzVsz8yNCeUU3jjD7aS5w9TC1rC88T2OmE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=ti1KQLwUJpHU24VkYRHQ1lHRibbwnEpGRL0n4gbRux15hbwjZJRFzot7oKvMbDKYe8 h/OOwlxGy8qa9PMA1ocFohFeg7QkLKiyDN8I3/CWre53bC/HkZTBtUJ7DtK76x01jc0j /QkDs6DceL99fW/v41ABJad157RkFAiB6gvpU= Received: by 10.204.51.65 with SMTP id c1mr1895049bkg.59.1243566522417; Thu, 28 May 2009 20:08:42 -0700 (PDT) Received: from ?192.168.0.18? (ppp121-45-76-13.lns10.adl6.internode.on.net [121.45.76.13]) by mx.google.com with ESMTPS id k29sm1437209fkk.47.2009.05.28.20.08.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 28 May 2009 20:08:39 -0700 (PDT) Message-Id: <48E6A852-8FF2-4EDB-B776-94D350928E18@gmail.com> From: Antony Blakey To: dev@couchdb.apache.org In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.4) Subject: Re: Attachment Replication Problem - Bug Found Date: Fri, 29 May 2009 12:38:32 +0930 References: <12669510-BD0F-45F3-8AC6-19872DF9071D@gmail.com> <25F55CAE-C44E-4416-AF39-C9037BA099FE@gmail.com> <9F12A09E-64D7-4703-A295-81B205655300@gmail.com> X-Mailer: Apple Mail (2.930.4) X-Virus-Checked: Checked by ClamAV on apache.org Further to this issue, using trunk my repeatable error hangs replication. I get a result like this: ------------------------------------------------------------------------------------------ [debug] [<0.125.0>] Attachment URL http://localhost:5985/acumen-curricula/3861b6572b83310c8d1bd4af19c24960/generated_learning_guide.pdf?rev=12-3009421878 [debug] [<0.125.0>] streaming attachment Status "200" Headers [{"Transfer-Encoding","chunked"}, {"Server", "CouchDB/0.10.0a (Erlang OTP/R13B)"}, {"ETag","\"12-3009421878\""}, {"Date", "Fri, 29 May 2009 02:29:05 GMT"}, {"Content- Type","application/pdf"}, {"Cache-Control", "must-revalidate"}] [debug] [<0.125.0>] REPLICATOR: about to update_docs [debug] [<0.125.0>] REPLICATOR: in update_docs [debug] [<0.125.0>] REPLICATOR: about to write_and_commit [debug] [<0.125.0>] REPLICATOR: about to doc_flush_binaries [debug] [<0.125.0>] REPLICATOR: about to flush_binary for Learning Guide.odt [debug] [<0.125.0>] REPLICATOR: about to flush_binary for Pre-Service Lesson Planning Guide.doc [debug] [<0.125.0>] REPLICATOR: about to flush_binary for Trainers Guide.odt [debug] [<0.125.0>] REPLICATOR: about to flush_binary for New Mindmap.png [debug] [<0.125.0>] REPLICATOR: about to flush_binary for Presentation Guide.odp [debug] [<0.125.0>] REPLICATOR: about to flush_binary for mpabroa.mm [debug] [<0.125.0>] REPLICATOR: about to flush_binary for New Mindmap.mm [debug] [<0.125.0>] REPLICATOR: about to flush_binary for generated_learning_guide.pdf [debug] [<0.125.0>] write_streamed_attachment has written too much expected: 81912 got: 81913 tail: <<"\r">> ------------------------------------------------------------------------------------------ And it's all over for that couchdb. Restart is required to continue. I've set the ibrowse # of sessions and pipeline to 1 to try and remove the pipelining and concurrent connections from the mix, but still it happens - then again it seems I'm not being entirely successful in that regard because ... When I turn ibrowse tracing on (in make_attachment_receiver) like this: ... {ok, Conn} = ibrowse:spawn_link_worker_process(Host, Port), Conn ! {trace, true}, ... then I see this result: ------------------------------------------------------------------------------------------ 2009-5-28_23:18:25:922 -- (localhost:5985) - Recvd more data: size: 69. NeedBytes: 62 2009-5-28_23:18:25:922 -- (localhost:5985) - Recvd another chunk... 2009-5-28_23:18:25:922 -- (localhost:5985) - RemData -> "\r\n0\r\n\r\n" 2009-5-28_23:18:25:925 -- (localhost:5985) - Determined chunk size: 0. Already recvd: 2 2009-5-28_23:18:25:925 -- (localhost:5985) - Detected end of chunked transfer... [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Presentation Guide.odp [debug] [<0.120.0>] REPLICATOR: about to flush_binary for New Mindmap.mm [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Mathematics 2 Application of Subtraction.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for generated_learning_guide.pdf [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Learning Guide.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Pre-Service Lesson Planning Guide.doc [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Trainers Guide.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Presentation Guide.odp [debug] [<0.120.0>] REPLICATOR: about to flush_binary for New Mindmap.mm [debug] [<0.120.0>] REPLICATOR: about to flush_binary for generated_learning_guide.pdf [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Learning Guide.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Trainers Guide.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Pre-Service Lesson Planning Guide.doc [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Gases.png [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Behaviour of Gases1.odt [debug] [<0.120.0>] REPLICATOR: about to flush_binary for Science 9 - Behaviour of Gases.pdf [debug] [<0.120.0>] write_streamed_attachment has written too much expected: 383360 got: 383361 tail: <<"\r">> 2009-5-28_23:18:51:418 -- (localhost:5985) - TCP connection closed by peer! 2009-5-28_23:18:51:637 -- (localhost:5985) - TCP connection closed by peer! 2009-5-28_23:18:51:678 -- (localhost:5985) - TCP connection closed by peer! 2009-5-28_23:18:51:932 -- (localhost:5985) - TCP connection closed by peer! 2009-5-28_23:18:52:75 -- (localhost:5985) - TCP connection closed by peer! ------------------------------------------------------------------------------------------ And once again, all over. I initially suspected that the ibrowse error was terminating the stream readers without sending the failure response, but I'm not really sure. I suspect from the ibrowse tracing showing interleaved data response (and those 5 connection close messages) that I haven't succeeded in make ibrowse linear-one-request, which I need to do to find this problem in ibrowse. Any hints on how to truly make ibrowse single-connection without pipelining? Antony Blakey ------------- CTO, Linkuistics Pty Ltd Ph: 0438 840 787 Some defeats are instalments to victory. -- Jacob Riis