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

Stack locator can return invalid stack size when stack size ulimit is unlimited

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.15, 3.5.3
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v3.4
    • Sprint:
      Platforms 2017-01-23, Platforms 2017-02-13
    • Case:

      Description

      The stack locator calls pthread_getattr_np and then pthread_attr_getstack to determine how big the stack is. With glibc, that means that if the stack ulimit is set to "unlimited" it will try to determine the size of the stack as though it were UINT64_MAX which can cause the stack size to be reported as a negative number. This can cause the javascript engine to set its internal stack limit to a negative number which will prevent the creation of any new javascript scopes - although this only applies to main(), all our other threads either have an implicit stack size of 2MB or an explicit stack size of 1MB depending on how they were created.

        Attachments

          Activity

            People

            Assignee:
            jonathan.reams Jonathan Reams
            Reporter:
            jonathan.reams Jonathan Reams
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: