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

The usePowerOf2Sizes option corrupts the db permanently and unrecoverably

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Running mongodb 2.2 on Linux version 2.6.32-5-amd64 (Debian 2.6.32-41), with a pymongo driver vintage early 2012.
    • ALL
    • 0

      From MongoDB User Google Group:

      To improve padding behavior I have added the usePowerOf2Sizes option for a couple of collections:
      self.mydb.db.command(

      {"collMod" : 'mycoll', 'usePowerOf2Sizes': "true" }

      )
      A subsequent "update $pushAll" appears to corrupt the database predictably and beyond recovery. The initial error message from the log is appended. With userPowerOf2Sizes commented out, things clunk along happily. Any wisdom on my usage, the nature of the bug, fix availability, etc?

      Thu Oct 18 15:12:55 [conn8] update mydb.mycoll query: { pc: 2012696439 } update: { $pushAll: { file_extents: [ [ ObjectId('508050b3fd14054976000024'), [ [ 395, 395 ], [ 403, 403 ], [ 86, 86 ] ] ] ] } } nscanned:657 nupdated:1 fastmodinsert:1 keyUpdates:0 numYields: 5 locks(micros) w:1158 373ms
      Thu Oct 18 15:12:59 [conn8] Assertion: 10334:Invalid BSONObj size: 0 (0x00000000) first element: EOO
      0xade6e1 0x8036eb 0x80386c 0x571bc7 0xa0e3b5 0xa0ed48 0x5e6081 0xc0862b 0xc0cddd 0xb546af 0xb5dd61 0x56fa52 0x5dbf11 0x7f7720aae8ca 0x7f771fe6192d 
       /usr/bin/mongod(_ZN5mongo15printStackTraceERSo+0x21) [0xade6e1]
       /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x9b) [0x8036eb]
       /usr/bin/mongod() [0x80386c]
       /usr/bin/mongod(_ZNK5mongo7BSONObj14_assertInvalidEv+0x497) [0x571bc7]
       /usr/bin/mongod(_ZNK5mongo19CoveredIndexMatcher7matchesERKNS_7BSONObjERKNS_7DiskLocEPNS_12MatchDetailsEb+0x1f5) [0xa0e3b5]
       /usr/bin/mongod(_ZNK5mongo19CoveredIndexMatcher14matchesCurrentEPNS_6CursorEPNS_12MatchDetailsE+0xa8) [0xa0ed48]
       /usr/bin/mongod(_ZN5mongo6Cursor14currentMatchesEPNS_12MatchDetailsE+0x41) [0x5e6081]
       /usr/bin/mongod(_ZN5mongo14_updateObjectsEbPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEPNS_11RemoveSaverEbRKNS_24QueryPlanSelectionPolicyE+0xfeb) [0xc0862b]
       /usr/bin/mongod(_ZN5mongo13updateObjectsEPKcRKNS_7BSONObjES4_bbbRNS_7OpDebugEbRKNS_24QueryPlanSelectionPolicyE+0x12d) [0xc0cddd]
       /usr/bin/mongod(_ZN5mongo14receivedUpdateERNS_7MessageERNS_5CurOpE+0x4cf) [0xb546af]
       /usr/bin/mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_11HostAndPortE+0x10b1) [0xb5dd61]
       /usr/bin/mongod(_ZN5mongo16MyMessageHandler7processERNS_7MessageEPNS_21AbstractMessagingPortEPNS_9LastErrorE+0x82) [0x56fa52]
       /usr/bin/mongod(_ZN5mongo3pms9threadRunEPNS_13MessagingPortE+0x411) [0x5dbf11]
       /lib/libpthread.so.0(+0x68ca) [0x7f7720aae8ca]
       /lib/libc.so.6(clone+0x6d) [0x7f771fe6192d]
      Thu Oct 18 15:12:59 [conn8] update mydb.mycoll query: { pc: 4257797 } update: { $pushAll: { file_extents: [ [ ObjectId('508050b3fd14054976000024'), [ [ 609, 612 ] ] ] ] } } nscanned:766 keyUpdates:0 exception: Invalid BSONObj size: 0 (0x00000000) first element: EOO code:10334 numYields: 5 locks(micros) w:3851 61ms
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            mark Mark porter
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: