209 Commits

Author SHA1 Message Date
Oran Agra
4f8e19f877 improve DEBUG MALLCTL to be able to write to write only fields.
also support:
  debug mallctl-str thread.tcache.flush VOID
2020-05-22 12:37:49 +02:00
Oran Agra
eb9d28903d add daily github actions with libc malloc and valgrind
* 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()
2020-05-08 10:37:35 +02:00
antirez
f066273907 Tracking: NOLOOP internals implementation. 2020-04-24 10:14:48 +02:00
antirez
d16b8275ff More powerful DEBUG RELOAD.
Related to #3243.
2020-04-15 16:03:16 +02:00
Guy Benoish
71134e357f DEBUG OBJECT should pass keyname to module when loading 2020-04-07 16:52:04 +02:00
David Carlier
e763a8debf debug, dump registers on arm too. 2020-04-07 16:52:04 +02:00
Guy Benoish
07acd86c7e RENAME can unblock XREADGROUP
Other changes:
Support stream in serverLogObjectDebugInfo
2020-03-31 16:57:20 +02:00
hwware
7e6b81527c format fix 2020-02-27 18:02:30 +01:00
hwware
afe5179dd4 fix potentical memory leaks 2020-02-27 18:02:30 +01:00
hwware
b995612a78 add missing subcommand description for debug oom 2020-02-27 18:00:47 +01:00
Oran Agra
3988bfff50 DEBUG HELP - add PROTOCOL 2020-02-12 14:15:56 +01:00
Oran Agra
68c6aacf3b Modules hooks: complete missing hooks for the initial set of hooks
* 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.
2019-10-29 17:59:09 +02:00
Yossi Gottlieb
85d7f38136 Merge remote-tracking branch 'upstream/unstable' into tls 2019-10-16 17:08:07 +03:00
Oran Agra
8704be6947 TLS: Implement support for write barrier. 2019-10-07 21:06:30 +03:00
Yossi Gottlieb
10ffeb03e4 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
Oran Agra
7737e5814a Merge remote-tracking branch 'antirez/unstable' into jemalloc_purge_bg 2019-10-04 13:53:40 +03:00
Oran Agra
bd49c4679b Merge remote-tracking branch 'antirez/unstable' into modules_info 2019-09-30 20:47:35 +03:00
Salvatore Sanfilippo
ab781fbe0a Merge pull request #6354 from jaredzhu/aarch64-devel
Add aarch64 uc_mcontext debug dump info
2019-09-25 18:14:24 +02:00
antirez
90f06b04b0 RESP3: Use verbatim in DEBUG HTSTATS / HTSTATS-KEY. 2019-09-18 18:46:11 +02:00
zhudacai 00228490
e6c2020a55 src/debug.c do not support aarch64 dump utcontext, so add the context
of aarch64.
The content comes from the definition of the sigcontext and tested on
my aarch64 server.

sigcontext defined at the linux kernel code:
arch/arm64/include/uapi/asm/sigcontext.h
2019-08-31 07:47:11 +00:00
Oran Agra
b2fce80695 Extend modules API to allow modules report to redis INFO
this implements #6012
2019-07-24 12:58:15 +03:00
antirez
4b5027845e Client side caching: implement trackingInvalidateKey(). 2019-07-03 19:16:20 +02:00
Oran Agra
f7833d560d make redis purge jemalloc after flush, and enable background purging thread
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
2019-06-02 15:33:14 +03:00
Chris Lamb
d2c38031dc Don't assume the __x86_64__ pointer size to avoid warnings on x32.
__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.
2019-02-11 17:12:27 +01:00
antirez
89b7b6a917 RESP3: addReplyString() -> addReplyProto().
The function naming was totally nuts. Let's fix it as we break PRs
anyway with RESP3 refactoring and changes.
2019-01-09 17:00:30 +01:00
antirez
78a3a19b2c RESP3: verbatim reply API + DEBUG PROTOCOL support. 2019-01-09 17:00:30 +01:00
antirez
ffebc90842 RESP3: DEBUG PROTOCOL: boolean types. 2019-01-09 17:00:30 +01:00
antirez
6525bd9f68 RESP3: Fix addReplyBool() RESP2/3 output. 2019-01-09 17:00:30 +01:00
antirez
f68d9ad2a6 RESP3: DEBUG PROTOCOL: fix strcasecmp() check. 2019-01-09 17:00:30 +01:00
antirez
34b5b84d74 RESP3: DEBUG PROTOCOL command. Only types already supported by API. 2019-01-09 17:00:30 +01:00
antirez
705ac43381 RESP3: fix DEBUG DIGEST-VALUE with new API. 2019-01-09 17:00:30 +01:00
antirez
44d75945aa stringmatchlen() fuzz test added.
Verified to be able to trigger at least #5632. Does not report other
issues.
2018-12-11 13:29:30 +01:00
Salvatore Sanfilippo
94da11be70 Merge pull request #5626 from soloestoy/remove-useless-code
remove useless tryObjectEncoding in debug assert
2018-12-07 17:09:56 +01:00
antirez
839fad129e DEBUG DIGEST-VALUE implemented. 2018-12-07 16:41:54 +01:00
antirez
cf9be5c4d1 DEBUG DIGEST refactoring: extract function to digest a value. 2018-12-07 16:30:33 +01:00
zhaozhao.zz
ee10f92058 remove useless tryObjectEncoding in debug assert 2018-11-30 12:05:46 +08:00
David Carlier
a4b8ccb339 OpenBSD support.
Special treatment here as backtrace support is optional,
cannot be found via pkg-config and similar neither.
2018-11-25 08:10:26 +00:00
David Carlier
ccf76940ee Backtrace/register dump on BSD.
FreeBSD/DragonFlyBSD does have backtrace only it does not
belong to libc.
2018-11-25 07:21:56 +00:00
David Carlier
996eb3b0af only FreeBSD change/little warning addressing 2018-11-08 10:13:52 +00:00
antirez
8401773272 Actually use the protectClient() API where needed.
Related to #4804.
2018-10-09 13:18:52 +02:00
Salvatore Sanfilippo
1b7bab98b8 Merge pull request #4804 from soloestoy/fix-debug-load
debug: avoid free client unexpectedly when reload & loadaof
2018-10-09 12:56:08 +02:00
Oran Agra
eade07dae7 add DEBUG LOG, to to assist test suite debugging 2018-07-30 12:23:51 +03:00
antirez
938d879c2a addReplySubSyntaxError() renamed to addReplySubcommandSyntaxError(). 2018-07-02 18:49:34 +02:00
Salvatore Sanfilippo
c44be0ab9b Merge pull request #4998 from itamarhaber/module_command_help
Module command help
2018-07-02 18:46:56 +02:00
zhaozhao.zz
c9c7dab4f3 clients: add type option for client list 2018-06-28 17:43:05 +08:00
antirez
a6133d02d6 Revert fix #4976 just leaving the flush() part. 2018-06-18 17:09:00 +02:00
Salvatore Sanfilippo
cc534773cd Merge pull request #4976 from trevor211/fixDebugLoadaof
Critical: Fix server crash and data inconsistency in some cases.
2018-06-16 11:05:04 +02:00
Itamar Haber
eeb3211b4a Merge branch 'unstable' into module_command_help 2018-06-09 21:10:53 +03:00
Itamar Haber
852a6b305e Capitalizes subcommands & orders lexicographically 2018-06-09 21:03:52 +03:00
antirez
97b7f0acda Implement DEBUG htstats-key. 2018-06-08 11:17:20 +02:00