Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F77E760F for ; Sun, 30 Oct 2011 18:58:56 +0000 (UTC) Received: (qmail 56884 invoked by uid 500); 30 Oct 2011 18:58:55 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 56854 invoked by uid 500); 30 Oct 2011 18:58:55 -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 56733 invoked by uid 99); 30 Oct 2011 18:58:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 18:58:55 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Oct 2011 18:58:53 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 5A2FC32854F for ; Sun, 30 Oct 2011 18:58:32 +0000 (UTC) Date: Sun, 30 Oct 2011 18:58:32 +0000 (UTC) From: "Adam Kocoloski (Resolved) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1571481493.38633.1320001112370.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <797573433.19401.1319652212264.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (COUCHDB-1319) Headers larger than 4k cannot be retrieved MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adam Kocoloski resolved COUCHDB-1319. ------------------------------------- Resolution: Fixed Got some positive reviews of the patch in side channels so I've gone ahead and landed it on 1.1.x, 1.2.x and master > Headers larger than 4k cannot be retrieved > ------------------------------------------ > > Key: COUCHDB-1319 > URL: https://issues.apache.org/jira/browse/COUCHDB-1319 > Project: CouchDB > Issue Type: Bug > Affects Versions: 1.1, 1.1.1 > Reporter: Adam Kocoloski > Assignee: Adam Kocoloski > Fix For: 1.2, 1.1.2 > > > Our headers start with a <<1>> and then four bytes indicating the length of the header and its checksum. When the header is larger than 4090 bytes it will be split across multiple blocks in the file and will need to be reassembled on read. The reassembly consists of stripping out <<0>> from the beginning of each subsequent block in the remove_block_prefixes/2 function. The bug here is that we tell remove_block_prefixes that we're starting 1 byte into the current block instead of 5, so it ends up removing one or more good bytes from the header and injecting one or more random <<0>>s. > Headers larger than 4k are very rare and generally require a view group with a huge number of indexes or indexes with fairly large reductions, which explains why this bug has gone undetected until now. > Patch forthcoming. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira