Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1083

fork/exec in Facter causes OOM in puppetserver

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: FACT 3.0.1
    • Fix Version/s: FACT 3.0.2
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      Client 2015-07-08, Client 2015-07-22

      Description

      On some systems with barely enough memory to run puppetserver, puppetserver fails to start because the fork causes the kernel to check for overcommit and that check fails because there isn't enough memory for a copy of the puppetserver process (regardless of CoW page sharing with the parent, the kernel needs to ensure the child process has enough memory to exist).

      This results in an unhandled exception:
      Jun 17 10:43:04 my.vm java[2368]: terminate called after throwing an instance of 'facter::execution::execution_exception'
      Jun 17 10:43:04 my.vm java[2368]: what(): failed to fork child process.

      Two things:

      • This error message is insufficent and should include strerror and errno.
      • We should investigate replacing fork with vfork so that the kernel doesn't have to copy the page tables when an immediate execve is going to take place.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                peter.huene Peter Huene
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support