Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get os_process_error by exec view #2665

Closed
TimLand opened this issue Mar 15, 2020 · 10 comments
Closed

get os_process_error by exec view #2665

TimLand opened this issue Mar 15, 2020 · 10 comments

Comments

@TimLand
Copy link

TimLand commented Mar 15, 2020

Hi
I installed couchdb 1.7.2 , then create new empty doc(named test) and view.
then i get this error :
[error] [<0.319.0>] OS Process Error <0.321.0> :: {os_process_error,
{exit_status,139}}
[error] [<0.319.0>] OS Process Error <0.323.0> :: {os_process_error,
{exit_status,139}}

E.G.
create new empty doc
curl -X GET http:https://127.0.0.1:5984/test
{"db_name":"test","doc_count":1,"doc_del_count":0,"update_seq":1,"purge_seq":0,"compact_running":false,"disk_size":4188,"data_size":292,"instance_start_time":"1584272640397307","disk_format_version":6,"committed_update_seq":1}

Add view
curl -H 'Content-Type: application/json' -X PUT http:https://127.0.0.1:5984/test/_design/test -d ' {
"_id" : "_design/test",
"views" : {
"foo" : {
"map" : "function(doc){ emit(doc._id, doc._rev)}"
}
}
} '

Then exec the view then got blocked, then can get the error(os_process_error,exit_status,139)
http:https://127.0.0.1:5984/test/_design/test/_view/foo

My env
#uname -r
4.4.131-20190505.kylin.server-generic (ARM)

Can anyone confirm ?
Greetings

@wohali
Copy link
Member

wohali commented Mar 15, 2020

@TimLand That error means you do not have the correct SpiderMonkey libraries installed. We don't support CouchDB 1.x anymore, and we never supported it on ARM, but you need one of: 1.7.0, 1.8.0, 1.8.5 with a strong preference for 1.8.5.

@TimLand
Copy link
Author

TimLand commented Mar 16, 2020

I install the SpiderMonkey libraries via "apt-get install libmozjs185-1.0",is that right?

dpkg -l | grep libmozjs185 , display:
libmozjs185-1.0 1.8.5-1.0.0+dfsg-6 arm64 SpiderMonkey JavaScript engine
libmozjs185-dev 1.8.5-1.0.0+dfsg-6 arm64 SpiderMonkey JavaScript library - development headers

@wohali
Copy link
Member

wohali commented Mar 16, 2020

@TimLand Yes, but you'll need to compile CouchDB from source to link against those.

@TimLand
Copy link
Author

TimLand commented Mar 18, 2020

Thx @wohali
I installed the SpiderMonkey libraries via "apt-get install libmozjs185-1.0" and compile CouchDB again

But we go to query the db-view and find that couchjs has crashed yet
We check the coredump file via gdb and find that the stack is in the function js_GetClassPrototype.

(gdb)
#0 0x0000ffff825fdf60 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#1 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#2 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#3 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#4 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#5 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
#6 0x0000ffff825fded4 in js_GetClassPrototype(JSContext*, JSObject*, JSProtoKey, JSObject**, js::Class*) () from /usr/lib/libmozjs185.so.1.0
Greetings

@TimLand
Copy link
Author

TimLand commented Mar 18, 2020

maybe libmozjs185.so is not good work on arm?

@TimLand
Copy link
Author

TimLand commented Mar 18, 2020

couchdb2.3.1 encountered the same problem,
They all depend on the same library libmozjs185.so.1.0

@wohali
Copy link
Member

wohali commented Mar 18, 2020

we build binary packages for CouchDB 2.3.1 on arm64 for debian. You can install from our documentation for that version.

@jiangphcn
Copy link
Contributor

jiangphcn commented Mar 18, 2020

couchdb2.3.1 encountered the same problem

also happened at box with arm architecture? We got some problem as well on arm.

@wohali
Copy link
Member

wohali commented Mar 18, 2020

the long answer is that libmozjs1.8.5 needs a patch for arm64 due to high bit masking. the details are over in apache/couchdb-pkg but i don't have time tonight to link it.

@TimLand
Copy link
Author

TimLand commented Mar 18, 2020

@wohali Thanks a lot in advance.
I found this patch, and it work fine!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants