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

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.4.15, 3.5.3
    • None
    • None
    • Fully Compatible
    • v3.4
    • Platforms 2017-01-23, Platforms 2017-02-13

    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

            jonathan.reams@mongodb.com Jonathan Reams
            jonathan.reams@mongodb.com Jonathan Reams
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: