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 CF2646A45 for ; Wed, 18 May 2011 15:05:29 +0000 (UTC) Received: (qmail 58087 invoked by uid 500); 18 May 2011 15:05:28 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 58021 invoked by uid 500); 18 May 2011 15:05:28 -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 57942 invoked by uid 99); 18 May 2011 15:05:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 May 2011 15:05:28 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_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; Wed, 18 May 2011 15:05:27 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B95C2CFEA0 for ; Wed, 18 May 2011 15:04:47 +0000 (UTC) Date: Wed, 18 May 2011 15:04:47 +0000 (UTC) From: "Thomas Vander Stichele (JIRA)" To: dev@couchdb.apache.org Message-ID: <1821632439.22540.1305731087755.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <830124045.22465.1305729707385.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (COUCHDB-1169) Bad logging when the javascript view server crashes MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/COUCHDB-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Vander Stichele updated COUCHDB-1169: -------------------------------------------- Attachment: view.input this file lets me reproduce the crasher: [thomas@level 1.0.x]$ /home/thomas/dev/ext/couchdb/branches/1.0.x/bin/couchjs_dev /home/thomas/dev/ext/couchdb/branches/1.0.x/share/server/main.js < view.input Unable to destroy invalid CouchHTTP instance. true true true true true true true true true true true true true true true true true Segmentation fault (core dumped) [thomas@level 1.0.x]$ backtrace is (gdb) bt #0 js_XDRFunctionObject (xdr=, objp=0x1ecfc98) at jsfun.cpp:1858 #1 0x00000034c415ec0c in js_XDRScript (xdr=0x20c1700, scriptp=0x7fff34507a48, hasMagic=0x0) at jsscript.cpp:680 #2 0x00000034c41618ba in js_CloneScript (cx=0x19e8940, script=0x1ecfba0) at jsscript.cpp:1976 #3 0x00000034c40aac95 in js_CloneFunctionObject (cx=0x19e8940, fun=0x7f2c84157100, parent=, proto=) at jsfun.cpp:2806 #4 0x00000034c40ab480 in CloneFunctionObject (parent=0x7f2c84136120, fun=0x7f2c84157100, cx=0x19e8940) at jsfun.h:482 #5 js_AllocFlatClosure (cx=0x19e8940, fun=, scopeChain=0x7f2c84136120) at jsfun.cpp:2837 #6 0x00000034c40af051 in js_NewFlatClosure (cx=0x19e8940, fun=0x7f2c84157100, op=, oplen=) at jsfun.cpp:2871 #7 0x00000034c40c5e9a in js::Interpret (cx=0x19e8940, entryFrame=0x7f2c84249168, inlineCallCount=1, interpMode=JSINTERP_NORMAL) at jsinterp.cpp:5724 #8 0x00000034c40d3b45 in js::RunScript (cx=0x19e8940, script=0x1ac5710, fp=0x7f2c84249168) at jsinterp.cpp:653 #9 0x00000034c40d40fe in js::Invoke (cx=0x19e8940, argsRef=, flags=0) at jsinterp.cpp:740 #10 0x00000034c40a5a7a in js_fun_apply (cx=0x19e8940, argc=, ---Type to continue, or q to quit--- vp=0x7f2c84249130) at jsfun.cpp:2205 #11 0x00000034c40ca94a in CallJSNative (vp=0x7f2c84249130, argc=2, native=, cx=0x19e8940) at jscntxtinlines.h:701 #12 js::Interpret (cx=0x19e8940, entryFrame=0x7f2c84249048, inlineCallCount=1, interpMode=JSINTERP_NORMAL) at jsinterp.cpp:4799 #13 0x00000034c40d3b45 in js::RunScript (cx=0x19e8940, script=0x1ad1570, fp=0x7f2c84249048) at jsinterp.cpp:653 #14 0x00000034c40d57d2 in js::Execute (cx=0x19e8940, chain=0x7f2c84103048, script=0x1ad1570, prev=, flags=0, result=0x7fff345088a8) at jsinterp.cpp:1028 #15 0x00000034c404d10a in JS_ExecuteScript (cx=0x19e8940, obj=, scriptObj=, rval=) at jsapi.cpp:4998 #16 0x0000000000402fb6 in execute_script (cx=0x19e8940, obj=0x7f2c84103048, filename=) at couch_js/main.c:236 #17 0x0000000000401b03 in main (argc=2, argv=0x7fff345089e8) at couch_js/main.c:313 > Bad logging when the javascript view server crashes > --------------------------------------------------- > > Key: COUCHDB-1169 > URL: https://issues.apache.org/jira/browse/COUCHDB-1169 > Project: CouchDB > Issue Type: Bug > Components: JavaScript View Server > Affects Versions: 1.0.2 > Environment: Fedora 15 > Reporter: Thomas Vander Stichele > Attachments: view.input > > > I've been trying to rebuild my 1.0.x branch on Fedora 15. I have applied all patches from the Fedora RPM, which among other things fixes the update to libjs. > Now my view server terminates when I query a view: > [debug] [<0.127.0>] OS Process #Port<0.2618> Input :: ["map_doc",{"_id":"b3d340d7aece621e8bf95f9545033aac","_rev":"1-26ef6f671b08ce78d8b338ef70b6035c","updated":"2011-05-01T20:29:00Z","end":null,"complete":null,"statuses":null,"title":"push new version of flumotion for f14","contexts":null,"due":"2011-05-06T00:00:00Z","recurrence":null,"importance":null,"references":null,"projects":["flumotion"],"time":null,"type":"thing","start":"2011-05-01T20:29:00Z","urgency":null,"description":null}] > [error] [<0.125.0>] OS Process Error <0.127.0> :: {os_process_error,{exit_status,139}} > [error] [emulator] Error in process <0.125.0> with exit value: {{nocatch,{os_process_error,{exit_status,139}}},[{couch_os_process,prompt,2},{couch_query_servers,'-map_docs/2-fun-1-',2},{lists,map,2},{couch_query_servers,map_docs,2},{couch_view_updater,view_compute,2},{couch_view_updater... > This gives no clue whatsoever as to what is failing. After reading the code and some painful debugging, I was able to reproduce at least some kind of problem by hand: > [thomas@level 1.0.x]$ /home/thomas/dev/ext/couchdb/branches/1.0.x/bin/couchjs_dev /home/thomas/dev/ext/couchdb/branches/1.0.x/share/server/main.jsUnable to destroy invalid CouchHTTP instance. > ["map_doc",{"_id":"b3d340d7aece621e8bf95f9545033aac","_rev":"1-26ef6f671b08ce78d8b338ef70b6035c","updated":"2011-05-01T20:29:00Z","end":null,"complete":null,"statuses":null,"title":"push new version of flumotion for f14","contexts":null,"due":"2011-05-06T00:00:00Z","recurrence":null,"importance":null,"references":null,"projects":["flumotion"],"time":null,"type":"thing","start":"2011-05-01T20:29:00Z","urgency":null,"description":null}] > ["error","unnamed_error","(new TypeError(\"State.funs is undefined\", \"/home/thomas/dev/ext/couchdb/branches/1.0.x/share/server/main.js\", 1311))"] > However, it keeps running. IIRC 139 means that the program got SIGSEGV ? > I'll try and replay all the requests to see if I can reproduce. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira