Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-2738

Investigate FFI Memory Pressure / Deterministically Release FFI MemoryPointer

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 3.7.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Story Points:
      2
    • Sprint:
      Week 2014-6-4 to 2014-6-11, Week 2014-6-11 to 2014-6-18, Week 2014-6-18 to 2014-6-25

      Description

      As of the merge for PUP-2657, we've noticed some intermittent test failures (in both CI and locally) in semi-random locations. The merge commit is as follows:

      https://github.com/puppetlabs/puppet/commit/d38153bd712167e2777bdd4c63d37e2e8d1cdb39

      The commit itself has been reviewed and it doesn't seem to have issues itself, but it's likely it's triggered FFI memory pressure that might have been building up to this point.

      Locally, failures include

      rspec ./spec/unit/util/storage_spec.rb:178 # Puppet::Util::Storage when storing to the state file should create the state file if it does not exist
      rspec ./spec/unit/util/storage_spec.rb:196 # Puppet::Util::Storage when storing to the state file should load() the same information that it store()s
      rspec ./spec/unit/util/yaml_spec.rb:16 # Puppet::Util::Yaml writes data formatted as YAML to disk
      rspec ./spec/unit/util_spec.rb:438 # Puppet::Util#replace_file should copy 0555 permissions from the target file by default
      rspec ./spec/unit/util_spec.rb:438 # Puppet::Util#replace_file should copy 0660 permissions from the target file by default
      rspec ./spec/unit/util_spec.rb:438 # Puppet::Util#replace_file should copy 0770 permissions from the target file by default
      rspec ./spec/unit/util_spec.rb:465 # Puppet::Util#replace_file should use the default permissions if the source file doesn't exist
      rspec ./spec/unit/util_spec.rb:503 # Puppet::Util#replace_file should support string format permissions
      rspec ./spec/unit/util_spec.rb:503 # Puppet::Util#replace_file should support number format permissions
      rspec ./spec/unit/util_spec.rb:503 # Puppet::Util#replace_file should support symbolic format permissions

      Ideally we should be running windbg and monitoring heap allocations to very bad behavior.

      Another idea is to use the block form of the FFI MemoryPointer initializer, and ensure that memory is deterministically freed, rather than when the Ruby GC decides to free it up.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  ethan Ethan Brown
                  QA Contact:
                  Kurt Wall
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: