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

Foreground compaction segfaults with a NULL URI

    • Storage Engines
    • 2
    • 2024-05-28 - FOLLOW ON SPRINT
    • v8.0, v7.3, v7.0, v6.0, v5.0

      Compact generates a segfault when no URI is specified.

      Reproducer:

      diff --git a/test/suite/test_compact01.py b/test/suite/test_compact01.py
      index 1a973bf48..cbdfdee19 100644
      --- a/test/suite/test_compact01.py
      +++ b/test/suite/test_compact01.py
      @@ -100,7 +100,7 @@ class test_compact(compact_util, suite_subprocess):
                       self.session.checkpoint(None)
                       self.reopen_conn()
       
      -            self.session.compact(uri, compact_cfg)
      +            self.session.compact(None, compact_cfg)
       
               # Verify compact progress stats. We can't do this with utility method as reopening the
               # connection would reset the stats.
      

      Simply execute test_compact01.py to get the following stack trace:

      #0  0x0000ffff96b3ff4c in strchr () from /lib/aarch64-linux-gnu/libc.so.6
      #1  0x0000ffff961ea524 in __wt_str_name_check (session=session@entry=0xe6a6180, str=str@entry=0x0) at /home/ubuntu/wiredtiger/src/schema/schema_util.c:151
      #2  0x0000ffff96209d1c in __wti_session_compact (wt_session=0xe6a6180, uri=0x0, config=0xe365840 "free_space_target=1MB") at /home/ubuntu/wiredtiger/src/session/session_compact.c:503
      #3  0x0000ffff963361c8 in _wrap_Session_compact (self=<optimized out>, args=<optimized out>)
          at /home/ubuntu/wiredtiger/build/lang/python/CMakeFiles/wiredtiger_python.dir/wiredtigerPYTHON_wrap.c:6290
      

            Assignee:
            etienne.petrel@mongodb.com Etienne Petrel
            Reporter:
            etienne.petrel@mongodb.com Etienne Petrel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: