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

Add index cause segmentation fault: too many open files

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Blocker - P1 Blocker - P1
    • None
    • Affects Version/s: 1.8.3
    • Component/s: Index Maintenance
    • Environment:
       debian squeeze and mongodb from apt:
    • Linux

      I want to make an index for +480 million of rows but everytime I
      try it give me some error.
      row: {
      "_id": 106530507294121984,
      "userid": 290864368,
      "inreply": 0,
      "ts": 1314233826,
      "lang": "es",
      "fonum": 80,
      "frnum": 68,
      "crts": 1314234007,
      "geolng": 0,
      "geolat": 0,
      "text": "RT @realmadrid: Hoy se celebra el sorteo de la fase de
      grupos de la Champions League http:\/\/t.co\/gyqd2Il #realmadrid",
      "_keywords":

      { "1": "@realmadrid", "4": "celebra", "6": "sorteo", "9": "fase", "11": "grupos", "14": "champions", "15": "league", "16": "t.co\/gyqd2il", "17": "#realmadrid" }


      }

      index:
      db.tweets.ensureIndex({_keywords:1,ts:1});
      I use debian squeeze and mongodb from apt:
      root@xxxx:~# apt-cache show mongodb-10gen
      Package: mongodb-10gen
      Version: 1.8.3
      Architecture: amd64
      root@ks27931:~# uname -a
      Linux xxxx 2.6.38.2-grsec-xxxx-grs-ipv6-64 #1 SMP Fri Apr 15 17:44:15
      UTC 2011 x86_64 GNU/Linux
      root@ks27931:~# free -m
      total used free shared buffers
      cached
      Mem: 24146 23201 945 0 16
      22165
      -/+ buffers/cache: 1018 23127
      Swap: 7998 0 7998
      mongo-db.log:
      Mon Aug 29 19:35:00 [conn1] finishing map
      483235400/483550704 99%
      Mon Aug 29 19:35:10 [conn1] finishing map
      Mon Aug 29 19:35:14 [conn1] external sort used : 911 files in
      4840 secs
      Mon Aug 29 19:35:14 [conn1] couldn't open /var/lib/mongodb/_tmp/esort.
      1314634473.1391960871//file.899 errno:24 Too many open files
      Mon Aug 29 19:35:14 [conn1] Assertion: 10308:mmap failed
      0x55f39a 0x7a7927 0x7ab31e 0x778fbc 0x779eca 0x77b90b 0x7826df
      0x75bccf 0x75d8fc 0x8ae1de 0x7f456834d8ba 0x7f456790902d
      /usr/bin/mongod(_ZN5mongo11msgassertedEiPKc+0x12a) [0x55f39a]
      /usr/bin/mongod(_ZN5mongo21BSONObjExternalSorter12FileIteratorC1ESs
      +0xe7) [0x7a7927]
      /usr/bin/mongod(ZN5mongo21BSONObjExternalSorter8IteratorC1EPS0
      +0x13e) [0x7ab31e]
      /usr/bin/
      mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetai lsEi
      +0xddc) [0x778fbc]
      /usr/bin/mongod() [0x779eca]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibRKNS_11BSONElementEb
      +0xf4b) [0x77b90b]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb
      +0x5f) [0x7826df]
      /usr/bin/mongod(_ZN5mongo14receivedInsertERNS_7MessageERNS_5CurOpE
      +0x35f) [0x75bccf]
      /usr/bin/
      mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8Sock AddrE
      +0x195c) [0x75d8fc]
      /usr/bin/mongod(_ZN5mongo10connThreadEPNS_13MessagingPortE+0x21e)
      [0x8ae1de]
      /lib/libpthread.so.0(+0x68ba) [0x7f456834d8ba]
      /lib/libc.so.6(clone+0x6d) [0x7f456790902d]
      Mon Aug 29 19:35:14 terminate() called, printing stack:
      0x8ac5ad 0x7f45680fe166 0x7f45680fd059 0x7f45680fdb01 0x7f4567bab7f3
      0x7f4567bab8b8 0x7a83d8 0x779710 0x779eca 0x77b90b 0x7826df 0x75bccf
      0x75d8fc 0x8ae1de 0x7f456834d8ba 0x7f456790902d
      /usr/bin/mongod(_ZN5mongo11myterminateEv+0x4d) [0x8ac5ad]
      /usr/lib/libstdc++.so.6(+0xcb166) [0x7f45680fe166]
      /usr/lib/libstdc++.so.6(+0xca059) [0x7f45680fd059]
      /usr/lib/libstdc++.so.6(__gxx_personality_v0+0x261) [0x7f45680fdb01]
      /lib/libgcc_s.so.1(+0x107f3) [0x7f4567bab7f3]
      /lib/libgcc_s.so.1(_Unwind_Resume+0x68) [0x7f4567bab8b8]
      /usr/bin/mongod(_ZN5mongo21BSONObjExternalSorterD1Ev+0x1a8)
      [0x7a83d8]
      /usr/bin/
      mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetai lsEi
      +0x1530) [0x779710]
      /usr/bin/mongod() [0x779eca]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibRKNS_11BSONElementEb
      +0xf4b) [0x77b90b]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb
      +0x5f) [0x7826df]
      /usr/bin/mongod(_ZN5mongo14receivedInsertERNS_7MessageERNS_5CurOpE
      +0x35f) [0x75bccf]
      /usr/bin/
      mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8Sock AddrE
      +0x195c) [0x75d8fc]
      /usr/bin/mongod(_ZN5mongo10connThreadEPNS_13MessagingPortE+0x21e)
      [0x8ae1de]
      /lib/libpthread.so.0(+0x68ba) [0x7f456834d8ba]
      /lib/libc.so.6(clone+0x6d) [0x7f456790902d]
      Mon Aug 29 19:35:14 Got signal: 6 (Aborted).
      Mon Aug 29 19:35:14 Backtrace:
      0x8ad399 0x7f456786c1e0 0x7f456786c165 0x7f456786ef70 0x8ac67b
      0x7f45680fe166 0x7f45680fd059 0x7f45680fdb01 0x7f4567bab7f3
      0x7f4567bab8b8 0x7a83d8 0x779710 0x779eca 0x77b90b 0x7826df 0x75bccf
      0x75d8fc 0x8ae1de 0x7f456834d8ba 0x7f456790902d
      /usr/bin/mongod(_ZN5mongo10abruptQuitEi+0x399) [0x8ad399]
      /lib/libc.so.6(+0x321e0) [0x7f456786c1e0]
      /lib/libc.so.6(gsignal+0x35) [0x7f456786c165]
      /lib/libc.so.6(abort+0x180) [0x7f456786ef70]
      /usr/bin/mongod(_ZN5mongo11myterminateEv+0x11b) [0x8ac67b]
      /usr/lib/libstdc++.so.6(+0xcb166) [0x7f45680fe166]
      /usr/lib/libstdc++.so.6(+0xca059) [0x7f45680fd059]
      /usr/lib/libstdc++.so.6(__gxx_personality_v0+0x261) [0x7f45680fdb01]
      /lib/libgcc_s.so.1(+0x107f3) [0x7f4567bab7f3]
      /lib/libgcc_s.so.1(_Unwind_Resume+0x68) [0x7f4567bab8b8]
      /usr/bin/mongod(_ZN5mongo21BSONObjExternalSorterD1Ev+0x1a8)
      [0x7a83d8]
      /usr/bin/
      mongod(_ZN5mongo14fastBuildIndexEPKcPNS_16NamespaceDetailsERNS_12IndexDetai lsEi
      +0x1530) [0x779710]
      /usr/bin/mongod() [0x779eca]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr6insertEPKcPKvibRKNS_11BSONElementEb
      +0xf4b) [0x77b90b]
      /usr/bin/
      mongod(_ZN5mongo11DataFileMgr16insertWithObjModEPKcRNS_7BSONObjEb
      +0x5f) [0x7826df]
      /usr/bin/mongod(_ZN5mongo14receivedInsertERNS_7MessageERNS_5CurOpE
      +0x35f) [0x75bccf]
      /usr/bin/
      mongod(_ZN5mongo16assembleResponseERNS_7MessageERNS_10DbResponseERKNS_8Sock AddrE
      +0x195c) [0x75d8fc]
      /usr/bin/mongod(_ZN5mongo10connThreadEPNS_13MessagingPortE+0x21e)
      [0x8ae1de]
      /lib/libpthread.so.0(+0x68ba) [0x7f456834d8ba]
      /lib/libc.so.6(clone+0x6d) [0x7f456790902d]
      Mon Aug 29 19:35:14 dbexit:
      Mon Aug 29 19:35:14 [conn1] shutdown: going to close listening
      sockets...
      Mon Aug 29 19:35:14 [conn1] closing listening socket: 5

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmchia JMChia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: