Description of problem: https://issues.apache.org/jira/browse/COUCHDB-1169 Version-Release number of selected component (if applicable): 1.0.2-2 How reproducible: always Steps to Reproduce: 1. download view.input 2. couchjs /usr/share/couchdb/server/main.js < view.input 3. Actual results: segfault Expected results: it should work Additional info:
Created attachment 499620 [details] sample input
Rolling back to couchdb-1.0.2-1 and js-1.70-13 makes the example work. I think the update to js 1.85 was too hasty.
(In reply to comment #2) > Rolling back to couchdb-1.0.2-1 and js-1.70-13 makes the example work. > > I think the update to js 1.85 was too hasty. Yes, indeed - that was quite unwise move. Anyway I'm working on fixing this right now. As a temporary solution - you'd better to stay with js-1.70 until I do something with this mess.
>Yes, indeed - that was quite unwise move. Anyway I'm working on fixing this right now. Indeed. My suggestion about provide it as separate version stimulation with 1-70 was ignored.
It would be wise to add some tests to test/etap. The patch we provided for new js 1.8.5 passes all tests there.
(In reply to comment #5) > It would be wise to add some tests to test/etap. The patch we provided for new > js 1.8.5 passes all tests there. Yes, sure. Unfortunately there is also JS test set (called Futon) which could be run only in a web-browser (Firefox). If someone is using a fresh couchdb installation (empty /var/lib/couchdb and untouched /etc/couchdb/* ) then he should type # /etc/init.d/couchdb start and then open in a browser the following link: http://127.0.0.1:5984/_utils/ Martin, could you please help me debugging this? Btw I almost isolated issue in Rawhide (couchdb-1.3.0-0.1). Rawhide's couchdb build fails to pass the only single test case in Futon after a fresh installation as described above - I hope this is exactly the same what causes failures in F-15.
Ahh, okay. We didn't know about the Futon test suite, will check it. The F15 failure is caused by NULL pointer crash in js_XDRFunctionObject() (GET_FUNCTION_PRIVATE(cx, *objp) is NULL there). I guess it's because of some wrong object definition or so, I'm looking at it right now. A debug version of js engine is pretty helpful here.
Looks like a bug in js. An emitted object is marked as a function, but it is a common object. We need to provide a testcase w/o couchdb.
It crashes because sandbox (evalcx() function) uses JSOPTION_COMPILE_N_GO option for script evaluation and the script is not supposed to be shared between contexts/global objects. It's new js 1.8.5 feature, will provide a patch for it.
FWIW, this is breaking upgrades of all other packages: [root@level ~]# yum upgrade Loaded plugins: auto-update-debuginfo, langpacks, presto, refresh-packagekit Setting up Upgrade Process Resolving Dependencies --> Running transaction check ---> Package couchdb.x86_64 0:1.0.2-1.fc15 will be updated ---> Package couchdb.x86_64 0:1.0.2-5.fc15 will be an update --> Processing Dependency: libmozjs185.so.1.0()(64bit) for package: couchdb-1.0.2-5.fc15.x86_64 --> Finished Dependency Resolution Error: Package: couchdb-1.0.2-5.fc15.x86_64 (updates) Requires: libmozjs185.so.1.0()(64bit) You could try using --skip-broken to work around the problem
Peter, can you test this package? http://koji.fedoraproject.org/koji/taskinfo?taskID=3100196 It should fix the crash. Unfortunately I can't test it, my system is completely broken and the package does not even build locally.
Created attachment 501791 [details] latest js 1.8.5 patch
Peter, there's another couchdb bug (packaging one?). If you have installed a system couchdb package and you are building another one locally, tests performed by rpm package are run against the system couchdb, not the recently built one. So the tests can fail when the built version is fixed.
Great! It passed all tests finally: http://koji.fedoraproject.org/koji/taskinfo?taskID=3100311 (In reply to comment #13) > Peter, there's another couchdb bug (packaging one?). If you have installed a > system couchdb package and you are building another one locally, tests > performed by rpm package are run against the system couchdb, not the recently > built one. So the tests can fail when the built version is fixed. Yes, I'm aware of it. I didn't try to fix it yet but I will.
couchdb-1.0.2-6.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/couchdb-1.0.2-6.fc15
Please remove the package from update queue, I added it to the js-1.8.5 update.
(In reply to comment #16) > Please remove the package from update queue, I added it to the js-1.8.5 update. Done.