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

Uncaught alloc Exception in Snappy on Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0-rc9
    • Fix Version/s: None
    • Component/s: Storage, WiredTiger
    • Labels:
    • Environment:
      Windows Server 2012 R2
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      Windows
    • Steps To Reproduce:
      Hide

      manually throw a std::bad_alloc() in place of

          if (scratch_output == NULL) {
            scratch_output = new char[max_output];
          }

      around line 945 in snappy.cc.

      We may need to keep a counter to only throw after 50 or so calls, otherwise WT won't start.

      Show
      manually throw a std::bad_alloc() in place of if (scratch_output == NULL) { scratch_output = new char[max_output]; } around line 945 in snappy.cc. We may need to keep a counter to only throw after 50 or so calls, otherwise WT won't start.

      Description

      snappy.cc could throw an exception if an allocation for a char array fails in the function "Compress". This exception is not caught.

      There's a code review for a different change that affects this line of code but does not address this issue.
      link to CR here: http://codereview.10gen.com/6078463630901248/patch/5629499534213120/5066549580791808
      link to SERVER ticket here: SERVER-17299

      This only affects Windows since other OSes don't use this function.

      mongod log is attached in the comments

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: