You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Adam Kocoloski (JIRA)" <ji...@apache.org> on 2009/01/12 14:35:59 UTC
[jira] Created: (COUCHDB-206) exiting update_notification process
crashes view_manager
exiting update_notification process crashes view_manager
--------------------------------------------------------
Key: COUCHDB-206
URL: https://issues.apache.org/jira/browse/COUCHDB-206
Project: CouchDB
Issue Type: Bug
Components: Database Core
Affects Versions: 0.9
Environment: r733674
Reporter: Adam Kocoloski
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.
[jira] Closed: (COUCHDB-206) exiting update_notification process
crashes view_manager
Posted by "Jan Lehnardt (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Lehnardt closed COUCHDB-206.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.9
Committed as of r737334. Thanks Adam.
> exiting update_notification process crashes view_manager
> --------------------------------------------------------
>
> Key: COUCHDB-206
> URL: https://issues.apache.org/jira/browse/COUCHDB-206
> Project: CouchDB
> Issue Type: Bug
> Components: Database Core
> Affects Versions: 0.9
> Environment: r733674
> Reporter: Adam Kocoloski
> Fix For: 0.9
>
> 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.
[jira] Updated: (COUCHDB-206) exiting update_notification process
crashes view_manager
Posted by "Adam Kocoloski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-206?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Adam Kocoloski updated COUCHDB-206:
-----------------------------------
Attachment: update_notification.diff
> exiting update_notification process crashes view_manager
> --------------------------------------------------------
>
> Key: COUCHDB-206
> URL: https://issues.apache.org/jira/browse/COUCHDB-206
> 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.