Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-1417

hostbyname() uses gethostbyname() function, which is not thread-safe on Linux

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • 1.4.4
    • None
    • None
    • Linux
    • Linux

    Description

      hostbyname() in src/util.cpp uses gethostbyname() function, which is not thread-safe on Linux. Should be gethostbyname_r(); This could return the invalid results, and sometimes causes SEGV in ScopedDbConnection.

      This is only for the current stable version. Not for the git HEAD, because it already changed to use getaddrinfo().

      Please close the issue if this is not important because this was fixed in HEAD.

      Attachments

        Activity

          People

            mathias@mongodb.com Mathias Stearn
            kzk_mover Kazuki Ohta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: