You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/07 15:21:40 UTC

[GitHub] [pulsar] zbentley opened a new issue #14582: C++/Python pulsar client abort()s or segfaults on file descriptor exhaustion ("Too many open files")

zbentley opened a new issue #14582:
URL: https://github.com/apache/pulsar/issues/14582


   **Describe the bug**
   When the C++ pulsar client tries to open a file descriptor, (e.g. creating a client, creating a producer, or creating a consumer), this operation can fail if the environment has too many open files.
   
   When that failure occurs, `abort()` is sometimes called, or SIGSEGV sometimes occurs. *Both* of these behaviors shouldn't happen; an exception should be raised instead. 
   
   **To Reproduce**
   1. Set your `ulimit` very low, e.g. 10.
   2. Create a Python pulsar-client object.
   3. Create consumer objects in a loop.
   
   This sample code can help reproduce the issue.
   
   ```python
   import logging
   import resource
   import pulsar
   
   def main():
       resource.setrlimit(resource.RLIMIT_NOFILE, (5, 5))
       client = pulsar.Client(service_url='pulsar://localhost', logger=logging.getLogger())
       client.subscribe(topic='mytopic', subscription_name=f'mysub')
   
   if __name__ == '__main__':
       main()
   ```
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Example exception**
   
   There are two failure modes:
   
   1. A segfault.
   2. An error stack like this:
   
   ```
    libc++abi: terminating with uncaught exception of type boost::wrapexcept<boost::system::system_error>: pipe_select_interrupter: Too many open files
   Fatal Python error: Aborted
   ```
   
   **Environment:**
    - OS: MacOS monterey.
    - Client version: 2.9.1
    
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui closed issue #14582: C++/Python pulsar client abort()s or segfaults on file descriptor exhaustion ("Too many open files")

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #14582:
URL: https://github.com/apache/pulsar/issues/14582


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org