couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Hommey (JIRA)" <>
Subject [jira] Commented: (COUCHDB-542) Fix for COUCHDB-288 makes JS_MaybeGC not called
Date Sun, 25 Oct 2009 08:42:59 GMT


Mike Hommey commented on COUCHDB-542:

This sounds reasonable, though I'd have a comment to add to what you describe as the current
behaviour for runaway scripts. Disclaimer: I don't know the couchdb code, nor spidermonkey
deep internals. I'm afraid there could be some subtle memory leaks if you forcibly terminate
the javascript engine without going through the operationcallback, which could be used to
gracefully terminate the engine. The latter would be better, I think, except if what you mean
by forcibly terminating by the Erlang VM is that a separate process, handling javascript,
is killed, in which case, there's no cleanup to do.

> Fix for COUCHDB-288 makes JS_MaybeGC not called
> -----------------------------------------------
>                 Key: COUCHDB-542
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: JavaScript View Server
>            Reporter: Mike Hommey
> The fix for COUCHDB-288 only basically replaces JS_SetBranchCallback with JS_SetOperationCallback,
which is not enough for the callback to be triggered. The problem is that basically, the operation
callback API has now nothing to do with the previous branch callback API, and is not called
at each branch call at the JS level. Actually, it is not called at all, except if JS_TriggerOperationCallback
is used. Typically, this needs to be done either from a signal handler or a watchdog thread,
in which case the test inside the callback is pretty pointless.
> See
for reference.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message