Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-474

"Failure to buffer 4 bytes" error on OS X with 300 client threads

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.1.0
    • Affects Version/s: 1.0.0
    • Component/s: None
    • None
    • Environment:
      Mac OS X 10.10.1

      When running mongo-sim with 300 client threads on OS X, I'm getting the following error from each thread:

      Failure to buffer 4 bytes: Failed to buffer 4 bytes within 300000 milliseconds.
      

      Note that each thread reports this almost immediately; it's not timing out after 300 seconds or anything. You can reproduce by checking out 10gen/mongo-sim.git, building, and running the following from the build directory:

      ./src/simulation/mongo-sim -w workloads/simple_read -t 300 -e 10000
      

      This spawns 300 client threads, one mongoc client per thread and executes a query 10,000 times total. Each thread executes a query operation 33 or 34 times, then iterates over every document in a tight loop (using mongoc_cursor_error(), mongoc_cursor_more() and mongoc_cursor_next() as outlined in cursor.hpp's Cursor::itcount() method.

      Note that the same error occurs when running an insert-only workload (change -w to insert_only). I have not been able to reproduce this issue on Linux.

      Sorry I haven't been able to narrow this down to a minimal reproducible case yet. I don't have many free cycles, but I'm happy to help anywhere I can.

            Assignee:
            Unassigned Unassigned
            Reporter:
            benjamin.becker Ben Becker
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: