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

The readonly test case is crashing with a stack overflow

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT2.9.0
    • Labels:
      None
    • # Replies:
      11
    • Last comment by Customer:
      true

      Description

      Which was uncovered by the Jenkins valgrind test (http://build.wiredtiger.com:8080/job/wiredtiger-valgrind/2014/)

      The stack trace is:

      Breakpoint 2, __wt_fsync (session=0x4873620, fh=0x4881f48, block=true) at ../src/include/misc.i:276
      276		WT_ASSERT(session, !F_ISSET(S2C(session), WT_CONN_READONLY));
      (gdb) where
      #0  __wt_fsync (session=0x4873620, fh=0x4881f48, block=true) at ../src/include/misc.i:276
      #1  0x00000000004757a1 in __handle_error_default (handler=0x77b3c0 <__event_handler_default>,
          wt_session=0x4873620, error=0,
          errmsg=0x7fffffffb420 "[1459733033:230750][20488:0x7ffff7fd8740], wiredtiger_open: ../src/include/misc.i, 276: !F_ISSET(S2C(session), WT_CONN_READONLY)") at ../src/support/err.c:27
      #2  0x0000000000476039 in __wt_eventv (session=0x4873620, msg_event=false, error=0,
          file_name=0x53f5d4 "../src/include/misc.i", line_number=276, fmt=0x53f5d1 "%s", ap=0x7fffffffbd48)
          at ../src/support/err.c:297
      #3  0x00000000004766e0 in __wt_assert (session=0x4873620, error=0,
          file_name=0x53f5d4 "../src/include/misc.i", line_number=276, fmt=0x53f5d1 "%s")
          at ../src/support/err.c:476
      #4  0x00000000004756d2 in __wt_fsync (session=0x4873620, fh=0x4881f48, block=true)
          at ../src/include/misc.i:276
      #5  0x00000000004757a1 in __handle_error_default (handler=0x77b3c0 <__event_handler_default>,
          wt_session=0x4873620, error=13,
          errmsg=0x7fffffffbed0 "[1459733007:576348][20488:0x7ffff7fd8740], wiredtiger_open: WT_RD.RD/WiredTiger.lock: handle-open: open: Permission denied") at ../src/support/err.c:27
      #6  0x0000000000476039 in __wt_eventv (session=0x4873620, msg_event=false, error=13, file_name=0x0,
          line_number=0, fmt=0x538eb2 "%s: handle-open: open", ap=0x7fffffffc7f8) at ../src/support/err.c:297
      #7  0x0000000000476138 in __wt_err (session=0x4873620, error=13, fmt=0x538eb2 "%s: handle-open: open")
          at ../src/support/err.c:320
      #8  0x0000000000440534 in __posix_handle_open (session=0x4873620, fh=0x7d7c40,
          name=0x7ec5a0 "WT_RD.RD/WiredTiger.lock", file_type=16, flags=1) at ../src/os_posix/os_fs.c:625
      #9  0x000000000043d912 in __wt_open (session=0x4873620, name=0x5329ba "WiredTiger.lock", file_type=16,
          flags=1, fhp=0x4873d58) at ../src/os_common/os_fhandle.c:203
      #10 0x0000000000409194 in __conn_single (session=0x4873620, cfg=0x7fffffffcb50)
          at ../src/conn/conn_api.c:1493
      #11 0x000000000040a111 in wiredtiger_open (home=0x77b860 <home_rd> "WT_RD.RD", event_handler=0x0,
          config=0x53235d "readonly=true", wt_connp=0x7fffffffdf58) at ../src/conn/conn_api.c:2010
      #12 0x000000000040341b in main (argc=0, argv=0x7fffffffe100) at ../../../test/readonly/readonly.c:323
      

      The problem is that doing an assertion is calling fsync on stderr, which is asserting that it's not doing an fsync when running read only.

      The check for fsync in a readonly connection should not be applied to standard I/O calls.

        Issue Links

          Activity

          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

          Message: Import wiredtiger-wiredtiger-2.8.0-134-g5047aab.tar.gz from wiredtiger branch mongodb-3.4

          ref: 9cf8eb2..5047aab

          SERVER-23504 Coverity analysis defect 98177: Resource leak
          WT-2330 in-memory configurations should not create on-disk collection files
          WT-2513 conversion from 'int64_t' to 'uint32_t'
          WT-2522 Incorrect format code in message
          WT-2525 in-memory configurations: miscellaneous cleanups
          WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define
          WT-2528 style error in WiredTiger build
          WT-2529 The readonly test case is crashing with a stack overflow
          WT-2531 in-memory tables are allocating unnecessary memory
          WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap
          WT-2533 Ensure that in-memory tables don't report a zero size
          SERVER-23517 WiredTiger changes for MongoDB 3.3.5
          Branch: master
          https://github.com/mongodb/mongo/commit/de6f136d83b20f8a58ba6fe4ba02be229b6c9159

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: Import wiredtiger-wiredtiger-2.8.0-134-g5047aab.tar.gz from wiredtiger branch mongodb-3.4 ref: 9cf8eb2..5047aab SERVER-23504 Coverity analysis defect 98177: Resource leak WT-2330 in-memory configurations should not create on-disk collection files WT-2513 conversion from 'int64_t' to 'uint32_t' WT-2522 Incorrect format code in message WT-2525 in-memory configurations: miscellaneous cleanups WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define WT-2528 style error in WiredTiger build WT-2529 The readonly test case is crashing with a stack overflow WT-2531 in-memory tables are allocating unnecessary memory WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap WT-2533 Ensure that in-memory tables don't report a zero size SERVER-23517 WiredTiger changes for MongoDB 3.3.5 Branch: master https://github.com/mongodb/mongo/commit/de6f136d83b20f8a58ba6fe4ba02be229b6c9159
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

          Message: WT-2529 Move an assertion related to fsync and readonly connections.

          It is still reasonable to fsync the standard I/O channels in a read
          only connection.
          Branch: mongodb-3.2
          https://github.com/wiredtiger/wiredtiger/commit/db105a8b177ffc027624629eeae05007c8ae2967

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: WT-2529 Move an assertion related to fsync and readonly connections. It is still reasonable to fsync the standard I/O channels in a read only connection. Branch: mongodb-3.2 https://github.com/wiredtiger/wiredtiger/commit/db105a8b177ffc027624629eeae05007c8ae2967
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'}

          Message: WT-2529 Fixup readonly test to not mask exit error codes.

          The file system permissions cleanup was masking real failures.
          Branch: mongodb-3.2
          https://github.com/wiredtiger/wiredtiger/commit/a7c59bddf2de5e58ad6f53a07fe6cec14a448d41

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'agorrod', u'name': u'Alex Gorrod', u'email': u'alexg@wiredtiger.com'} Message: WT-2529 Fixup readonly test to not mask exit error codes. The file system permissions cleanup was masking real failures. Branch: mongodb-3.2 https://github.com/wiredtiger/wiredtiger/commit/a7c59bddf2de5e58ad6f53a07fe6cec14a448d41
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'}

          Message: Merge pull request #2628 from wiredtiger/wt-2529-fsync_readonly

          WT-2529 Be less aggressive asserting in readonly connections
          Branch: mongodb-3.2
          https://github.com/wiredtiger/wiredtiger/commit/1d340e2ce9d3f06adb64fe82cf610cc09e610c5f

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'username': u'michaelcahill', u'name': u'Michael Cahill', u'email': u'michael.cahill@mongodb.com'} Message: Merge pull request #2628 from wiredtiger/wt-2529-fsync_readonly WT-2529 Be less aggressive asserting in readonly connections Branch: mongodb-3.2 https://github.com/wiredtiger/wiredtiger/commit/1d340e2ce9d3f06adb64fe82cf610cc09e610c5f
          Hide
          xgen-internal-githook Githook User added a comment -

          Author:

          {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'}

          Message: Import wiredtiger-wiredtiger-2.8.0-201-g7ea2631.tar.gz from wiredtiger branch mongodb-3.2

          ref: 43e885a..7ea2631

          SERVER-23504 Coverity analysis defect 98177: Resource leak
          SERVER-23526 Replication relies on storage engines reporting a non-zero size for correctness
          SERVER-23588 mongod with WiredTiger won't start on Windows when built with --dbg=on --opt=off
          SERVER-23682 WiredTiger changes for MongoDB 3.2.6
          WT-2330 in-memory configurations should not create on-disk collection files
          WT-2507 Add upgrading documentation in preparation for 2.8 release.
          WT-2512 wtperf: MSVC complains about float conversion in throttle code
          WT-2513 conversion from 'int64_t' to 'uint32_t'
          WT-2517 wtperf uses setvbuf in a way that isn't supported on Windows
          WT-2522 Incorrect format code in message
          WT-2525 in-memory configurations: miscellaneous cleanups
          WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define
          WT-2528 style error in WiredTiger build
          WT-2529 The readonly test case is crashing with a stack overflow
          WT-2531 in-memory tables are allocating unnecessary memory
          WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap
          WT-2533 Ensure that in-memory tables don't report a zero size
          WT-2534 Invalid transaction snapshots on PowerPC
          Branch: v3.2
          https://github.com/mongodb/mongo/commit/7ee4e4e493c3785fea489ee3508ca18526709c16

          Show
          xgen-internal-githook Githook User added a comment - Author: {u'name': u'Ramon Fernandez', u'email': u'ramon@mongodb.com'} Message: Import wiredtiger-wiredtiger-2.8.0-201-g7ea2631.tar.gz from wiredtiger branch mongodb-3.2 ref: 43e885a..7ea2631 SERVER-23504 Coverity analysis defect 98177: Resource leak SERVER-23526 Replication relies on storage engines reporting a non-zero size for correctness SERVER-23588 mongod with WiredTiger won't start on Windows when built with --dbg=on --opt=off SERVER-23682 WiredTiger changes for MongoDB 3.2.6 WT-2330 in-memory configurations should not create on-disk collection files WT-2507 Add upgrading documentation in preparation for 2.8 release. WT-2512 wtperf: MSVC complains about float conversion in throttle code WT-2513 conversion from 'int64_t' to 'uint32_t' WT-2517 wtperf uses setvbuf in a way that isn't supported on Windows WT-2522 Incorrect format code in message WT-2525 in-memory configurations: miscellaneous cleanups WT-2527 OS X compile error, missing POSIX_FADV_WILLNEED #define WT-2528 style error in WiredTiger build WT-2529 The readonly test case is crashing with a stack overflow WT-2531 in-memory tables are allocating unnecessary memory WT-2532 WT_STREAM_APPEND and WT_STREAM_LINE_BUFFER flag overlap WT-2533 Ensure that in-memory tables don't report a zero size WT-2534 Invalid transaction snapshots on PowerPC Branch: v3.2 https://github.com/mongodb/mongo/commit/7ee4e4e493c3785fea489ee3508ca18526709c16

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                1 year, 6 weeks, 1 day ago
                Date of 1st Reply: