"vscode:/vscode.git/clone" did not exist on "10f94b0ab12f9315939dcccf39d64b9388c0c7fa"
  1. 03 Sep, 2020 1 commit
    • Oran Agra's avatar
      Run active defrag while blocked / loading (#7726) · 9ef8d2f6
      Oran Agra authored
      During long running scripts or loading RDB/AOF, we may need to do some
      defragging. Since processEventsWhileBlocked is called periodically at
      unknown intervals, and many cron jobs either depend on run_with_period
      (including active defrag), or rely on being called at server.hz rate
      (i.e. active defrag knows ho much time to run by looking at server.hz),
      the whileBlockedCron may have to run a loop triggering the cron jobs in it
      (currently only active defrag) several times.
      
      Other changes:
      - Adding a test for defrag during aof loading.
      - Changing key-load-delay config to take negative values for fractions
        of a microsecond sleep
      9ef8d2f6
  2. 02 Sep, 2020 1 commit
    • Pierre Jambet's avatar
      Fix error message for the DEBUG ZIPLIST command (#7745) · d52ce4ea
      Pierre Jambet authored
      DEBUG ZIPLIST <key> currently returns the following error string if the
      key is not a ziplist: "ERR Not an sds encoded string.". This looks like
      an accidental copy/paste error from the error returned in the else if
      branch above where this string is returned if the key is not an sds
      string. The command was added in
      ac61f906 and looking at the commit,
      nothing indicates that it is not an accidental typo.
      
      The error string now returns a correct error: "Not a ziplist encoded
      object", which accurately describes the error.
      d52ce4ea
  3. 24 Aug, 2020 1 commit
    • Wang Yuan's avatar
      Fix data race in bugReportStart (#7700) · 6b4ae919
      Wang Yuan authored
      The previous fix using _Atomic was insufficient, since we check and set it in
      different places.
      
      The implications of this bug are just that a portion of the bug report will be shown
      twice, in the race case of two concurrent crashes.
      6b4ae919
  4. 06 Aug, 2020 2 commits
    • Oran Agra's avatar
      Fix potential race in bugReportStart · 81f8524a
      Oran Agra authored
      this race would only happen when two threads paniced at the same time,
      and even then the only consequence is some extra log lines.
      
      race reported in #7391
      81f8524a
    • Oran Agra's avatar
      Assertion and panic, print crash log without generating SIGSEGV · 90b717e7
      Oran Agra authored
      This makes it possible to add tests that generate assertions, and run
      them with valgrind, making sure that there are no memory violations
      prior to the assertion.
      
      New config options:
      - crash-log-enabled - can be disabled for cleaner core dumps
      - crash-memcheck-enabled - useful for faster termination after a crash
      - use-exit-on-panic - to be used by the test suite so that valgrind can
        detect leaks and memory corruptions
      
      Other changes:
      - Crash log is printed even on system that dont HAVE_BACKTRACE, i.e. in
        both SIGSEGV and assert / panic
      - Assertion and panic won't print registers and code around EIP (which
        was useless), but will do fast memory test (which may still indicate
        that the assertion was due to memory corrpution)
      
      I had to reshuffle code in order to re-use it, so i extracted come code
      into function without actually doing any changes to the code:
      - logServerInfo
      - logModulesInfo
      - doFastMemoryTest (with the exception of it being conditional)
      - dumpCodeAroundEIP
      
      changes to the crash report on segfault:
      - logRegisters is called right after the stack trace (before info) done
        just in order to have more re-usable code
      - stack trace skips the first two items on the stack (the crash log and
        signal handler functions)
      90b717e7
  5. 28 Jul, 2020 1 commit
    • Wen Hui's avatar
      fix leak in error handling of debug populate command (#7062) · c69a9b2f
      Wen Hui authored
      valsize was not modified during the for loop below instead of getting from c->argv[4], therefore there is no need to put inside the for loop.. Moreover, putting the check outside loop will also avoid memory leaking, decrRefCount(key) should be called in the original code if we put the check in for loop
      c69a9b2f
  6. 15 Jul, 2020 1 commit
    • Developer-Ecosystem-Engineering's avatar
      Add registers dump support for Apple silicon (#7453) · c2b5f1c1
      Developer-Ecosystem-Engineering authored
      Export following environment variables before building on macOS on Apple silicon
      
      export ARCH_FLAGS="-arch arm64"
      export SDK_NAME=macosx
      export SDK_PATH=$(xcrun --show-sdk-path --sdk $SDK_NAME)
      export CFLAGS="$ARCH_FLAGS -isysroot $SDK_PATH -I$SDK_PATH/usr/include"
      export CXXFLAGS=$CFLAGS
      export LDFLAGS="$ARCH_FLAGS"
      export CC="$(xcrun -sdk $SDK_PATH --find clang) $CFLAGS"
      export CXX="$(xcrun -sdk $SDK_PATH --find clang++) $CXXFLAGS"
      export LD="$(xcrun -sdk $SDK_PATH --find ld) $LDFLAGS"
      
      make
      make test
      ..
      All tests passed without errors!
      
      Backtrack logging assumes x86 and required updating
      c2b5f1c1
  7. 10 Jul, 2020 2 commits
    • Oran Agra's avatar
      tests/valgrind: don't use debug restart (#7404) · 69ade873
      Oran Agra authored
      * tests/valgrind: don't use debug restart
      
      DEBUG REATART causes two issues:
      1. it uses execve which replaces the original process and valgrind doesn't
         have a chance to check for errors, so leaks go unreported.
      2. valgrind report invalid calls to close() which we're unable to resolve.
      
      So now the tests use restart_server mechanism in the tests, that terminates
      the old server and starts a new one, new PID, but same stdout, stderr.
      
      since the stderr can contain two or more valgrind report, it is not enough
      to just check for the absence of leaks, we also need to check for some known
      errors, we do both, and fail if we either find an error, or can't find a
      report saying there are no leaks.
      
      other changes:
      - when killing a server that was already terminated we check for leaks too.
      - adding DEBUG LEAK which was used to test it.
      - adding --trace-children to valgrind, although no longer needed.
      - since the stdout contains two or more runs, we need slightly different way
        of checking if the new process is up (explicitly looking for the new PID)
      - move the code that handles --wait-server to happen earlier (before
        watching the startup message in the log), and serve the restarted server too.
      
      * squashme - CR fixes
      69ade873
    • Oran Agra's avatar
      9bbf768d
  8. 20 May, 2020 1 commit
  9. 04 May, 2020 1 commit
    • Oran Agra's avatar
      add daily github actions with libc malloc and valgrind · deee2c1e
      Oran Agra authored
      * fix memlry leaks with diskless replica short read.
      * fix a few timing issues with valgrind runs
      * fix issue with valgrind and watchdog schedule signal
      
      about the valgrind WD issue:
      the stack trace test in logging.tcl, has issues with valgrind:
      ==28808== Can't extend stack to 0x1ffeffdb38 during signal delivery for thread 1:
      ==28808==   too small or bad protection modes
      
      it seems to be some valgrind bug with SA_ONSTACK.
      SA_ONSTACK seems unneeded since WD is not recursive (SA_NODEFER was removed),
      also, not sure if it's even valid without a call to sigaltstack()
      deee2c1e
  10. 21 Apr, 2020 1 commit
  11. 09 Apr, 2020 1 commit
  12. 31 Mar, 2020 1 commit
  13. 07 Mar, 2020 1 commit
  14. 18 Feb, 2020 1 commit
  15. 06 Feb, 2020 1 commit
  16. 30 Jan, 2020 1 commit
  17. 16 Jan, 2020 2 commits
  18. 29 Oct, 2019 1 commit
    • Oran Agra's avatar
      Modules hooks: complete missing hooks for the initial set of hooks · 51c3ff8d
      Oran Agra authored
      * replication hooks: role change, master link status, replica online/offline
      * persistence hooks: saving, loading, loading progress
      * misc hooks: cron loop, shutdown, module loaded/unloaded
      * change the way hooks test work, and add tests for all of the above
      
      startLoading() now gets flag indicating what is loaded.
      stopLoading() now gets an indication of success or failure.
      adding startSaving() and stopSaving() with similar args and role.
      51c3ff8d
  19. 07 Oct, 2019 2 commits
  20. 18 Sep, 2019 1 commit
  21. 31 Aug, 2019 1 commit
  22. 24 Jul, 2019 1 commit
  23. 03 Jul, 2019 1 commit
  24. 02 Jun, 2019 1 commit
    • Oran Agra's avatar
      make redis purge jemalloc after flush, and enable background purging thread · 09f99c2a
      Oran Agra authored
      jemalloc 5 doesn't immediately release memory back to the OS, instead there's a decaying
      mechanism, which doesn't work when there's no traffic (no allocations).
      this is most evident if there's no traffic after flushdb, the RSS will remain high.
      
      1) enable jemalloc background purging
      2) explicitly purge in flushdb
      09f99c2a
  25. 11 Feb, 2019 1 commit
    • Chris Lamb's avatar
      Don't assume the __x86_64__ pointer size to avoid warnings on x32. · d0089cf2
      Chris Lamb authored
      __x86_64__ is defined on the on the x32 architecture and the conditionals in
      debug.c therefore assume the size of (void*) etc:
      
        debug.c: In function 'getMcontextEip':
        debug.c:757:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             return (void*) uc->uc_mcontext.gregs[16]; /* Linux 64 */
                    ^
        debug.c: In function 'logRegisters':
        debug.c:920:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
             logStackContent((void**)uc->uc_mcontext.gregs[15]);
      
      We can remedy this by checking for __ILP32__ first. See:
      
        https://wiki.debian.org/ArchitectureSpecificsMemo
      
      ... for more info.
      d0089cf2
  26. 09 Jan, 2019 7 commits
  27. 11 Dec, 2018 1 commit
  28. 07 Dec, 2018 2 commits
  29. 30 Nov, 2018 1 commit