Program received signal SIGPIPE, Broken pipe.
[Switching to Thread 182897363104 (LWP 30503)]
0x0000003c051b9f12 in __write_nocancel () from /lib64/tls/libc.so.6
(gdb) where
#0  0x0000003c051b9f12 in __write_nocancel () from /lib64/tls/libc.so.6
#1 0x0000003c05165678 in _IO_new_file_write () from /lib64/tls/ libc.so.6
#2  0x0000003c051646b4 in _IO_new_do_write () from /lib64/tls/libc.so.6
#3  0x0000003c05164ffe in _IO_new_file_sync () from /lib64/tls/libc.so.6
#4  0x0000003c0515a930 in fflush () from /lib64/tls/libc.so.6
#5 0x0000000000402042 in Print (context=0x50b0b0, obj=Variable "obj" is not available.
) at couch_js.c:275
#6  0x0000002a95709bc9 in js_Invoke () from /usr/local/lib/libjs.so
#7  0x0000002a95713271 in js_Interpret () from /usr/local/lib/libjs.so
#8  0x0000002a9570a2c4 in js_Execute () from /usr/local/lib/libjs.so
#9 0x0000002a956e3498 in JS_ExecuteScript () from /usr/local/lib/ libjs.so
#10 0x0000000000403979 in main (argc=Variable "argc" is not available.
) at couch_js.c:391
(gdb)

Spider monkey was installed from 1.7.0 source.

On Mar 31, 2009, at 11:40 AM, Paul Davis wrote:

On Tue, Mar 31, 2009 at 2:26 PM, Peter Hsu <[email protected]> wrote:
Don't think so:

[r...@rhel4-dell apache-couchdb-0.9.0]# ldd /usr/local/bin/couchjs
       not a dynamic executable

Is there any way to get more visibility into the problem? Debug logging?


Hmm, debug logging probably won't get you much beyond the erlang
traceback. IIRC, there's no debug option for couchjs.

AFAICT without adding debug statements to your setup is that the error
is happening when couch_query_server sends ["reset"] to the couchjs
process. From my initial poking through the various bits it looks like
couchjs is crashing as opposed to exiting cleanly. A quick way to
diagnose this is to start up couchdb, get a couchjs process started,
attach to it using gdb, and then trigger the error to see if you can
get a traceback. That sounds not quick now that I typed it out.
Anyway, hopefully its straight forward. Also, if it is exiting
cleanly, you could set a break on the return line and try and get a
traceback of what lead to the exit.

Also, how did you install spidermonkey exactly, was it a manual build
or from yum or an rpm?

Paul

On Mar 31, 2009, at 7:46 AM, Jan Lehnardt wrote:

Hi,

On 31 Mar 2009, at 06:39, Peter Hsu wrote:

Ran your suggestion..

[r...@rhel4-dell 0.9.0]# su - couchdb
[couc...@rhel4-dell ~]$ curl http://127.0.0.1:5984/_config/query_servers
{"javascript":"/usr/local/bin/couchjs /usr/local/share/couchdb/
server/main.js"}
[couc...@rhel4-dell ~]$ /usr/local/bin/couchjs /usr/local/share/
couchdb/server/main.js
["reset"]
true

The test suite still returns the same errors.

Maybe your LD_LIBRARY PATH is hosed for the CouchDB user and the
couchjs process
can't find the libs (libjs.so, libcurl.so) it links?

Cheers
Jan
--




On Mar 30, 2009, at 8:49 PM, Chris Anderson wrote:

On Mon, Mar 30, 2009 at 7:33 PM, Vinubalaji Gopal <[email protected]

wrote:
Hi all,
I have been trying to run couch 0.9 on RHEL 4 and I am getting
errors when trying to run the test suite. I installed spider monkey
1.7.0 and also a newer version of curl since couchdb configure
script
complained that I needed curl >= 7.15.5.  I tried almost
everything I
could think of - but I can't get rid of these errors!


I don't have the ability to reproduce this setup currently, but the error message you see looks like the couchjs process isn't launching

Try running this command:

curl http://127.0.0.1:5984/_config/query_servers

And then run the command quoted in the output. When it's working
properly, you should be able to type:

["reset"]

and get the response:

true

Here is the output when I run the basic test in the test suite:
Exception raised:
{"error":"{bad_return_value,{os_process_error,{exit_status,
127}}}","reason":"{gen_server,call,[couch_query_servers,
{get_proc,<<\"javascript\">>}]}"}

Reduce fails with the following exception:
Exception raised:
{"error":"badmatch","reason":"{{bad_return_value, {os_process_error,
{exit_status,127}}},\n
{gen_server,call,[couch_query_servers,{get_proc,<<\"javascript
\">>}]}}"}

and a lot of tests are failing.

Here are the last few lines from the couch.log file.


[Tue, 31 Mar 2009 02:26:44 GMT] [error] [<0.1706.0>] ** Generic
server
<0.1706.0> terminating
** Last message in was {'EXIT',<0.1704.0>,killed}
** When Server state == {file_descriptor,prim_file, {#Port<0.1112>,
19}}
** Reason for termination ==
** killed


[Tue, 31 Mar 2009 02:26:44 GMT] [error] [<0.36.0>]
{error_report,<0.22.0>,
 {<0.36.0>,supervisor_report,
 [{supervisor,{local,couch_server_sup}},
  {errorContext,child_terminated},
  {reason,shutdown},
  {offender,
      [{pid,<0.44.0>},
       {name,couch_secondary_services},
       {mfa,{couch_server_sup,start_secondary_services,[]}},
       {restart_type,permanent},
       {shutdown,infinity},
       {child_type,supervisor}]}]}}


[Tue, 31 Mar 2009 02:26:44 GMT] [error] [<0.1706.0>]
{error_report,<0.22.0>,
          {<0.1706.0>,crash_report,
           [[{pid,<0.1706.0>},
             {registered_name,[]},
             {error_info,{exit,killed,
                               [{gen_server,terminate,6},
                                {proc_lib,init_p_do_apply,3}]}},
             {initial_call,{couch_file,init,['Argument__1']}},
             {ancestors,
[<0.1704.0>,couch_view,couch_secondary_services,
                         couch_server_sup,<0.1.0>]},
             {messages,[]},
             {links,[#Port<0.1112>]},
             {dictionary,[]},
             {trap_exit,true},
             {status,running},
             {heap_size,987},
             {stack_size,23},
             {reductions,1472}],
            []]}}

Please point me to the right direction and let me know if you need
any
other information.


Thank you.

--
Vinu

In a world without fences who needs Gates?




--
Chris Anderson
http://jchrisa.net
http://couch.io


Reply via email to