couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Vander Stichele (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COUCHDB-1169) Bad logging when the javascript view server crashes
Date Wed, 18 May 2011 15:04:47 GMT

     [ 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=<optimized out>, 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=<optimized out>, proto=<optimized out>)
    at jsfun.cpp:2806
#4  0x00000034c40ab480 in CloneFunctionObject (parent=0x7f2c84136120, 
    fun=0x7f2c84157100, cx=0x19e8940) at jsfun.h:482
#5  js_AllocFlatClosure (cx=0x19e8940, fun=<optimized out>, 
    scopeChain=0x7f2c84136120) at jsfun.cpp:2837
#6  0x00000034c40af051 in js_NewFlatClosure (cx=0x19e8940, fun=0x7f2c84157100, 
    op=<optimized out>, oplen=<optimized out>) 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=<optimized out>, 
    flags=0) at jsinterp.cpp:740
#10 0x00000034c40a5a7a in js_fun_apply (cx=0x19e8940, argc=<optimized out>, 
---Type <return> to continue, or q <return> to quit---
    vp=0x7f2c84249130) at jsfun.cpp:2205
#11 0x00000034c40ca94a in CallJSNative (vp=0x7f2c84249130, argc=2, 
    native=<optimized out>, 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=<optimized out>, flags=0, result=0x7fff345088a8)
    at jsinterp.cpp:1028
#15 0x00000034c404d10a in JS_ExecuteScript (cx=0x19e8940, obj=<optimized out>, 
    scriptObj=<optimized out>, rval=<optimized out>) at jsapi.cpp:4998
#16 0x0000000000402fb6 in execute_script (cx=0x19e8940, obj=0x7f2c84103048, 
    filename=<optimized out>) 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

Mime
View raw message