Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-1750

Thread stack memory leak in ThreadPool

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.5, 1.1.6
    • Fix Version/s: 1.2.0, 1.1.7
    • Component/s: ExeMgr
    • Labels:
      None
    • Sprint:
      2018-18, 2018-19, 2018-20, 2018-21

      Description

      When ThreadPool self-prunes after a thread is idle for 10 minutes that thread is ended but not joined. This leaves a large amount of stack behind (8MB per thread in my machine). This turns into a large memory leak very quickly, especially hitting the limits of VIRT allocation.

      How to reproduce:

      1. Run the attach script (requires tpch1 lineitem table)
      2. Get the pid of ExeMgr (25001 in this example)
      3. Get the output of ulimit -s (8192 in this example)
      4. Run the following replacing the values above where appropriate:

      pmap 25001 | grep 8192 | wc -l
      

      5. Run the following replacing the values above where appropriate:

      ls /proc/25001/task | wc -l
      

      6. You should note the two numbers are very similar. Only 1 or two apart
      7. Wait > 10 minutes
      8. Do steps 4 and 5 again. You should notice the two numbers are now very different. This indicates a thread stack memory leak.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dleeyh Daniel Lee
              Reporter:
              LinuxJedi Andrew Hutchings (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration