Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-277

call to __wt_conn_btree_close() asserts

    • Type: Icon: Task Task
    • Resolution: Done
    • WT1.3
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Michael, I was debugging something and found a code path I think is wrong: *wt_conn_btree_close() asserts WT_SESSION_SCHEMA_LOCKED, but the error path in *wt_conn_btree_open calls it and __wt_conn_btree_open doesn't necessarily hold that lock. Here's a stack:

      WT-6  0x0000000801eae9bc in __wt_conn_btree_close (session=0x80313a1e8, locked=1)
          at ../src/conn/conn_btree.c:339
      WT-7  0x0000000801eae617 in __wt_conn_btree_open (session=0x80313a1e8, 
          config=0x803165600 "allocation_size=512B,block_compressor=,checkpoint=,checksum=true,collator=,columns=(),huffman_key=,huffman_value=,internal_item_max=0,internal_key_truncate=true,internal_page_max=2KB,key_format=S,key_"..., 
          cfg=0x7fffffffc2b0, flags=4) at ../src/conn/conn_btree.c:227
      WT-8  0x0000000801eae777 in __wt_conn_btree_get (session=0x80313a1e8, 
          name=0x801edc790 "file:WiredTiger.wt", ckpt=0x0, cfg=0x7fffffffc2b0, 
          flags=4) at ../src/conn/conn_btree.c:271
      WT-9  0x0000000801ec3345 in __create_file (session=0x80313a1e8, 
          uri=0x801edc790 "file:WiredTiger.wt", exclusive=0, config=0x0)
          at ../src/schema/schema_create.c:77
      WT-10 0x0000000801ec4575 in __wt_schema_create (session=0x80313a1e8, 
          name=0x801edc790 "file:WiredTiger.wt", config=0x0)
          at ../src/schema/schema_create.c:403
      WT-11 0x0000000801eade55 in wiredtiger_open (home=0x800ecf504 ".", 
          event_handler=0x0, 
          config=0x8030f957c "create,error_prefix=\"test_checkpoint01.test_checkpoint.test_checkpoint(file): \"", wt_connp=0x7fffffffc520)
          at ../src/conn/conn_api.c:918
      WT-12 0x0000000801d5dcbf in _wrap_wiredtiger_open (self=Variable "self" is not available.
      )
      

      There may be a related problem where *wt_conn_btree_open also calls *wt_conn_btree_sync_and_close, that has a similar assertion, but maybe that path does have the right locks, I didn't see that one fire.

            Assignee:
            michael.cahill@mongodb.com Michael Cahill (Inactive)
            Reporter:
            keith.bostic@mongodb.com Keith Bostic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: