Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2789

TNonblockingServer leaks socket FD's under load

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.3
    • C++ - Library
    • None
    • Patch Available

    Description

      I checked 0.9.2 and 1.0, but code didn't seem to change in 1.2 either.

      Problem is that network threads and worker threads use non-blocking socket (pipe) to communicate. Under heavy load writes to that pipe might fail with EAGAIN. While 'notifyIOThread' method carefully checks for the error and communicates the result via return value, not all callers check result of 'notify'.

      Generally it's hard to tell what appropriate handling of such a failure would be, but it's clear sockets shouldn't leak. Please use attached patch for the reference, but I do not insist what I did there is the best way to fix the problem.

      Attachments

        Issue Links

          Activity

            People

              jensg Jens Geyer
              drigh Sergey
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: