Uploaded image for project: 'Couchbase Mobile'
  1. Couchbase Mobile
  2. CM-473

Failed to grow buffer with NSMallocException',

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Critical
    • 2.8.0
    • 2.8.0
    • None
    • None

    Description

      • CBL version: IOS 2.8.0-110
      • SG Version:2.8.0-203
      • CBS Version: 6.5.1-6299
      • SG Config:

        {
            "SSLCert": "sg_cert.pem",
                "SSLKey": "sg_privkey.pem",
                "adminInterface": "0.0.0.0:4985",
                "compressResponses": false,
                "databases": {
                    "db": {
                        "allow_conflicts": false,
                        "bucket": "travel-sample",
                        "enable_shared_bucket_access": true,
                        "import_docs": true,
                        "num_index_replicas": 0,
                        "password": "password",
                        "server": "http://192.168.33.10:8091",
                        "username": "travel-sample"
                    }
                },
                "interface": ":4984",
                "logging": {
                    "debug": {
                        "enabled": true
                    }
                },
                "maxFileDescriptors": 90000,
                "maxIncomingConnections": 0
            } 
        }

      • Steps to Reproduce:
        1. Create docs in CBL and replicate to SG using push one-shot replication
        2. start push one-shot replication and start replication event listener
        3. Check the error is thrown in replication event changes as CBS can't have doc greater than 20mb
      • Actual Result:
        test app failed with exception:

      [DEBUG] Connection on socket 5 preflighting request "POST /database_saveDocuments" with 76449991 bytes body
      [DEBUG] Connection on socket 5 processing request "POST /database_saveDocuments" with 76449991 bytes body
      2020-07-15 14:55:18.508973-0700 CBLTestServer-iOS[35063:555583] CouchbaseLite Database Verbose:

      {DB#2} begin transaction
      2020-07-15 14:55:19.088200-0700 CBLTestServer-iOS[35063:555583] CouchbaseLite Database Verbose: {DB#2}

      Saved 'cbl_docs_0' rev #1-1e8f07abb818d72e57c7ecc395badc7a1a16629d as seq 1
      2020-07-15 14:55:19.091510-0700 CBLTestServer-iOS[35063:555583] CouchbaseLite Database Verbose:

      {DB#2} KeyStore(info) set SharedKeys
      2020-07-15 14:55:19.091651-0700 CBLTestServer-iOS[35063:555583] CouchbaseLite Database Verbose: {DB#2}

      commit transaction
      2020-07-15 14:55:20.108293-0700 CBLTestServer-iOS[35063:555583] CouchbaseLite Database Info:

      {DB#2}

      Committing transaction took 1.017 sec
      [DEBUG] Connection sent 182 bytes on socket 5
      [DEBUG] Connection sent 3 bytes on socket 5
      [DEBUG] Did close connection on socket 5
      [VERBOSE] [10.0.0.131:8080] 10.0.0.36:49748 200 "POST /database_saveDocuments" (76449991 | 185)
      [DEBUG] Did disconnect
      [DEBUG] Did end background task
      [DEBUG] Did open connection on socket 5
      [DEBUG] Did connect
      [DEBUG] Did start background task
      [DEBUG] Connection received 210 bytes on socket 5
      [DEBUG] Connection on socket 5 preflighting request "POST /database_getDocuments" with 210 bytes body
      [DEBUG] Connection on socket 5 processing request "POST /database_getDocuments" with 210 bytes body
      CBLTestServer-iOS(35063,0x16b50f000) malloc: can't allocate region
      :*** mach_vm_map(size=664829952, flags: 100) failed (error code=3)
      CBLTestServer-iOS(35063,0x16b50f000) malloc: *** set a breakpoint in malloc_error_break to debug
      2020-07-15 14:55:42.660172-0700 CBLTestServer-iOS[35063:555725] *** Terminating app due to uncaught exception 'NSMallocException', reason: 'Failed to grow buffer'

          • First throw call stack:
            (0x188409794 0x18812bbcc 0x188465264 0x18845d96c 0x1883279dc 0x188876034 0x188875264 0x1888764a0 0x195b0a008 0x195901434 0x1888759d0 0x18872b00c 0x18872ac90 0x104a94110 0x104acced4 0x104aced74 0x104a19074 0x104a121bc 0x104a0ee34 0x104a0f4bc 0x104a0ffe4 0x104a10970 0x104a10668 0x108625fc8 0x1085fa338 0x1085fb730 0x10860cec8 0x10860d698 0x188120b38 0x188123740)
            libc++abi.dylib: terminating with uncaught exception of type NSException
            2020-07-15 14:57:53.516276-0700 CBLTestServer-iOS[35063:554993] [BackgroundTask] Background Task 3 ("Called by CBLTestServer-iOS, from -[GCDWebServer _startBackgroundTask]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_ for your task in a timely manner to avoid this.
      • Logs :
        CBL LOGS: attached
      • Pytest Command

      pytest -s -rsx --timeout 1800 --liteserv-version=2.8.0-110 --liteserv-host=localhost --liteserv-port=8080 --xattrs --no-conflicts --enable-file-logging --sync-gateway-version=2.8.0-203 --mode=cc --server-version=6.5.1-6299 --liteserv-platform=android --create-db-per-test=cbl-test testsuites/CBLTester/CBL_Functional_tests/TestSetup_FunctionalTests --skip-provisioning -k 'test_push_replication_for_20mb_doc[load_from_data_dir-attachment_file_list1] '

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manasa.ghanta Manasa Ghanta (Inactive)
            manasa.ghanta Manasa Ghanta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty