couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Kocoloski (JIRA)" <>
Subject [jira] Updated: (COUCHDB-206) exiting update_notification process crashes view_manager
Date Mon, 12 Jan 2009 13:42:00 GMT


Adam Kocoloski updated COUCHDB-206:

    Attachment: update_notification.diff

> exiting update_notification process crashes view_manager
> --------------------------------------------------------
>                 Key: COUCHDB-206
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.9
>         Environment: r733674
>            Reporter: Adam Kocoloski
>         Attachments: update_notification.diff
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
> To reproduce, add an update_notification
> sleep = /bin/sleep 5
> and start CouchDB.  When sleep returns, the os_process gen_server linked to it stops
and that initiates a chain of crashes that brings down the view_manager.
> The problem is that the update_notifier gen_event code doesn't handle {'EXIT', Pid, Reason}
messages where Pid is not the state of that particular event handler.  The db_update event
manager traps exits and forwards the 'EXIT' message to *all* registered event handlers.  As
a result, when any gen_server linked to the event manager terminates it brings down all the
other event handlers with it, including the one added by couch_view.  When that event handler
goes down, the event_sup gen_server linked to it exits, and that brings down couch_view itself.
> The fix is simple: just add one more clause to couch_db_update_notifier:handle_info that
ignores 'EXIT' messages if the Pid does not match the Pid of the related os_process.  I'll
attach a patch to this issue.

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

View raw message