You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Yurii Rashkovskii (JIRA)" <ji...@apache.org> on 2011/09/22 13:01:27 UTC

[jira] [Created] (COUCHDB-1295) couch_util:collate/3 leaks ports

couch_util:collate/3 leaks ports
--------------------------------

                 Key: COUCHDB-1295
                 URL: https://issues.apache.org/jira/browse/COUCHDB-1295
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
            Reporter: Yurii Rashkovskii


couch_util:collate/3 opens a port but never closes nor links to it. Unless I am missing something, it leaks ports. The most trivial solution that comes to mind is to link to the said port but I had problems with it as those processes didn't seem to die therefore port leakage continued.

Explicitly closing port after every operation seems to do the trick so far, but I admit it is an ugly solution.

Any ideas?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (COUCHDB-1295) couch_util:collate/3 leaks ports

Posted by "Yurii Rashkovskii (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112722#comment-13112722 ] 

Yurii Rashkovskii commented on COUCHDB-1295:
--------------------------------------------

Robert, you're right — it was middle of the night when I was reporting this. I think the issue that I'm catching relates to the fact that some processes are leaked when you massively create and delete databases thus they never release ports. Let me check more about this situation.

> couch_util:collate/3 leaks ports
> --------------------------------
>
>                 Key: COUCHDB-1295
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1295
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Yurii Rashkovskii
>
> couch_util:collate/3 opens a port but never closes nor links to it. Unless I am missing something, it leaks ports. The most trivial solution that comes to mind is to link to the said port but I had problems with it as those processes didn't seem to die therefore port leakage continued.
> Explicitly closing port after every operation seems to do the trick so far, but I admit it is an ugly solution.
> Any ideas?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (COUCHDB-1295) couch_util:collate/3 leaks ports

Posted by "Robert Newson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112495#comment-13112495 ] 

Robert Newson commented on COUCHDB-1295:
----------------------------------------

drv_port() stores the port in the process dictionary and reuses it so unless ports aren't freed when processes die, there's no leak. I'm pretty confident erlang cleans up open ports and file descriptors associated with processes, but I can't verify right now.

> couch_util:collate/3 leaks ports
> --------------------------------
>
>                 Key: COUCHDB-1295
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1295
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Yurii Rashkovskii
>
> couch_util:collate/3 opens a port but never closes nor links to it. Unless I am missing something, it leaks ports. The most trivial solution that comes to mind is to link to the said port but I had problems with it as those processes didn't seem to die therefore port leakage continued.
> Explicitly closing port after every operation seems to do the trick so far, but I admit it is an ugly solution.
> Any ideas?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (COUCHDB-1295) couch_util:collate/3 leaks ports

Posted by "Jan Lehnardt (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Lehnardt closed COUCHDB-1295.
---------------------------------

    Resolution: Not A Problem
    
> couch_util:collate/3 leaks ports
> --------------------------------
>
>                 Key: COUCHDB-1295
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1295
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>            Reporter: Yurii Rashkovskii
>
> couch_util:collate/3 opens a port but never closes nor links to it. Unless I am missing something, it leaks ports. The most trivial solution that comes to mind is to link to the said port but I had problems with it as those processes didn't seem to die therefore port leakage continued.
> Explicitly closing port after every operation seems to do the trick so far, but I admit it is an ugly solution.
> Any ideas?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira