[
https://issues.apache.org/jira/browse/COUCHDB-1135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022752#comment-13022752
]
Filipe Manana commented on COUCHDB-1135:
----------------------------------------
Yeah, stack traces can help diagnose it better.
I think we had 2 or 3 cases before like this, trying to read a term from an
offset that doesn't point to the beginning of a serialized term. Unfortunately
no one was able to reproduce them or find any bug in the code.
The only scenario I can think of leading to this, is to have 2 Couch instances
accessing and writing to the same database file.
Nevertheless, there's a tool at https://github.com/fdmanana/couchfoo which can
help a bit on the analysis.
Try to run it like this:
$ ./couchfoo N 10 /path/to/dbfile/db.couch
and report the output (it's a read only operation, so you don't need to do it
offline, neverhtless it's a good idea to make a backup of your file).
> error on attempting to read from database
> -----------------------------------------
>
> Key: COUCHDB-1135
> URL: https://issues.apache.org/jira/browse/COUCHDB-1135
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 1.0.2
> Environment: OS - Red Hat Enterprise Linux Server release 5.5
> Reporter: Gilbert Agum
> Priority: Critical
>
> Couchdb errors on attempting to read from a database
> i.e. the response to curl requests that attempt to read the namespace is
> {"error":"kill","reason":"{gen_server,call,\n [couch_server,\n
> {open,<<\"test_005\">>,\n [{user_ctx,\n
> {user_ctx,null,\n [<<\"_admin\">>],\n
> <<\"{couch_httpd_auth, default_authentication_handler}\">>}}]},\n
> infinity]}"}
> and in the log file
> [Wed, 20 Apr 2011 12:04:45 GMT] [error] [<0.125.0>] ** Generic server
> <0.125.0> terminating
> ** Last message in was {pread_iolist,6769922532}
> ** When Server state == {file,{file_descriptor,prim_file,{#Port<0.2074>,13}},
> 0,6770856039}
> ** Reason for termination ==
> ** {{badmatch,{ok,<<13,97,115,115,101,116,95,99,97,99,104,101,95,51,104,2,
> 110,4,0,226,121,136,12,104,2,97,2,97,0,104,2,109,0,0,0,
> 13,97,115,115,101,116,95,99,97,99,104,101,95,56,104,2,98,
> ...
> The .couch file is 6Gb on a ext3 filesystem. Attempting to find the steps to
> recreate.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira