commit_msg
stringlengths
1
24.2k
commit_hash
stringlengths
2
84
project
stringlengths
2
40
source
stringclasses
4 values
labels
int64
0
1
repo_url
stringlengths
26
70
commit_url
stringlengths
74
118
commit_date
stringlengths
25
25
Merge pull request #4200 from jeesyn/fix_typo fix a typo
565e139a5631a777254e222d1c50ea6d696e1a8e
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/565e139a5631a777254e222d1c50ea6d696e1a8e
2017-11-28 18:44:11+01:00
Merge pull request #6838 from oranagra/rm_scan_dict_rehash RM_Scan disable dict rehashing
86cbddc475048ffa1939a2787a3dd28fe159a1f3
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/86cbddc475048ffa1939a2787a3dd28fe159a1f3
2020-02-28 17:47:52+01:00
ACL LOG: group similar entries in a given time delta.
6671032fafc82be04b4ca564790753b26f96780e
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/6671032fafc82be04b4ca564790753b26f96780e
2020-01-29 18:40:32+01:00
Update redis-benchmark.c Fixing typo in the usage of redis-benchmark
dbb6cb442a4b432bf1db42a60f4871c4854fa11d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/dbb6cb442a4b432bf1db42a60f4871c4854fa11d
2016-11-11 10:33:48+08:00
Add module event for repl-diskless-load swapdb (#8153) When a replica uses the diskless-load swapdb approach, it backs up the old database, then attempts to load a new one, and in case of failure, it restores the backup. this means that modules with global out of keyspace data, must have an option to subscribe to events and backup/restore/discard their global data too.
ab60dcf56488052d5760ec2ed24a29ebb0630d12
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ab60dcf56488052d5760ec2ed24a29ebb0630d12
2020-12-13 14:36:06+02:00
Add manual triggers for Daily CI (#9119) Hopefully now we'll be able to manually trigger extensive tests to PR branches without modifying them.
b466471a52a0659bbabf820aae9089dc12774a2c
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b466471a52a0659bbabf820aae9089dc12774a2c
2021-06-22 17:23:59+03:00
New options for GEORADIUS: STORE and STOREDIST. Related to issue #3019.
bb75ecddfdcab4fb530bb9c78088e53b28687816
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/bb75ecddfdcab4fb530bb9c78088e53b28687816
2016-02-18 10:24:11+01:00
Fix typo in function name "harndfieldReplyWithListpack" to "hrandfieldReplyWithListpack" (#10623)
698e7cbba68aaef86da731ca350279403acdd568
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/698e7cbba68aaef86da731ca350279403acdd568
2022-04-24 15:21:04+08:00
Geo: JSON features removed The command can only return data in the normal Redis protocol. It is up to the caller to translate to JSON if needed.
b18c68aa7fa780ab0d591c91ad758246fa9fdc9e
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b18c68aa7fa780ab0d591c91ad758246fa9fdc9e
2015-06-22 11:53:14+02:00
fix indent space (#10562)
6cb5cbb28fea3f77f07e78effbbd0cf378c5b6bf
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/6cb5cbb28fea3f77f07e78effbbd0cf378c5b6bf
2022-04-10 15:38:57+08:00
Clean unused var compiler warning in module test. (#9289)
8bf433dc86937a72cbcfa02743a093c2e3d91960
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/8bf433dc86937a72cbcfa02743a093c2e3d91960
2021-07-29 19:45:29+03:00
Merge pull request #1 from mymilkbottles/mymilkbottles-log-level-judge Optimize lua log level judgment
7bd5ccaad0bd3af18a220c9cebbfbd5c0f645815
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/7bd5ccaad0bd3af18a220c9cebbfbd5c0f645815
2020-04-06 19:34:07+08:00
Simple change just using slaves instead of server.slaves
ca6fc4f0314d5d899cab8f19f9807d867ac3676d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ca6fc4f0314d5d899cab8f19f9807d867ac3676d
2016-09-24 15:53:57+09:00
Sentinel: initial failure simulator implemented This commit adds the SENTINEL simulate-failure, that sets specific hooks inside the state machine that will crash Sentinel, for testing purposes.
fb3af75f7478c6d0717d076289976f16b2389e28
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/fb3af75f7478c6d0717d076289976f16b2389e28
2015-05-22 11:49:11+02:00
Merge pull request #7244 from devnexen/netbsd_build_fix NetBSD build update.
67a4fb912fe8f815810adc7f5404fc7ab71beb3d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/67a4fb912fe8f815810adc7f5404fc7ab71beb3d
2020-05-14 18:14:06+02:00
Merge pull request #6402 from mieko/unstable Seed SipHash with 128-bit key
f6cf08e5828c5af18352d55925d9b2de16a332a8
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/f6cf08e5828c5af18352d55925d9b2de16a332a8
2019-09-25 18:03:39+02:00
redis.conf typo fixed: ingore -> ignore.
b2fd9f7e7cda64ba9b4863c141913bf31b519522
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b2fd9f7e7cda64ba9b4863c141913bf31b519522
2018-10-15 11:01:37+02:00
RESP3: Use new deferred len API in server.c.
073293693e84b412ad3eaed392f79643a4b2d7a5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/073293693e84b412ad3eaed392f79643a4b2d7a5
2018-11-08 13:05:50+01:00
Add command tips to COMMAND DOCS (#10104) Adding command tips (see https://redis.io/topics/command-tips) to commands. Breaking changes: 1. Removed the "random" and "sort_for_script" flags. They are now command tips. (this isn't affecting redis behavior since #9812, but could affect some client applications that's relying on COMMAND command flags) Summary of changes: 1. add BLOCKING flag (new flag) for all commands that could block. The ACL category with the same name is now implicit. 2. move RANDOM flag to a `nondeterministic_output` tip 3. move SORT_FOR_SCRIPT flag to `nondeterministic_output_order` tip 3. add REQUEST_POLICY and RESPONSE_POLICY where appropriate as documented in the tips 4. deprecate (ignore) the `random` flag for RM_CreateCommand Other notes: 1. Proxies need to send `RANDOMKEY` to all shards and then select one key randomly. The other option is to pick a random shard and transfer `RANDOMKEY `to it, but that scheme fails if this specific shard is empty 2. Remove CMD_RANDOM from `XACK` (i.e. XACK does not have RANDOM_OUTPUT) It was added in 9e4fb96ca12476b1c7468b143efca86b478bfb4a, I guess by mistake. Also from `(P)EXPIRETIME` (new command, was flagged "random" by mistake). 3. Add `nondeterministic_output` to `OBJECT ENCODING` (for the same reason `XTRIM` has it: the reply may differ depending on the internal representation in memory) 4. RANDOM on `HGETALL` was wrong (there due to a limitation of the old script sorting logic), now it's `nondeterministic_output_order` 5. Unrelated: Hide CMD_PROTECTED from COMMAND
10bbeb68377bc2b20442e6578183dbc61fb57ec3
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/10bbeb68377bc2b20442e6578183dbc61fb57ec3
2022-01-20 10:32:11+01:00
Fix redis-cli cluster test timing issue (#11887) This test fails sporadically: ``` *** [err]: Migrate the last slot away from a node using redis-cli in tests/unit/cluster/cli.tcl cluster size did not reach a consistent size 4 ``` I guess the time (5s) of wait_for_cluster_size is not enough, usually, the waiting time for our other tests for cluster consistency is 50s, so also changing it to 50s.
aa2403ca98f6a39b6acd8373f8de1a7ba75162d5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/aa2403ca98f6a39b6acd8373f8de1a7ba75162d5
2023-03-26 13:46:58+08:00
Modules: blocking command example added.
7dde8bf3ab721b87f1e48b277dcdc39aab4c8b4c
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/7dde8bf3ab721b87f1e48b277dcdc39aab4c8b4c
2016-10-07 16:35:06+02:00
Fixing import of sys/errno (#9739)
ddb508c0a21d5859295fdabc6417a4b978e2dea8
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ddb508c0a21d5859295fdabc6417a4b978e2dea8
2021-11-05 13:50:25+08:00
Cluster/Sentinel test: also pause on abort_sentinel_test call.
b3bf7584b0aa5c2dbc1acf4d7f6b2c3d420e8e42
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b3bf7584b0aa5c2dbc1acf4d7f6b2c3d420e8e42
2015-01-21 16:18:34+01:00
Module cluster flags: initial vars / defines added.
744fe7f348c82a6f55aab43f140a540d298747cf
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/744fe7f348c82a6f55aab43f140a540d298747cf
2018-09-19 11:20:52+02:00
Replace regular array to array of structs to get rid of false sharing (#10892) There are a lot of false sharing cache misses in line 4013 inside getIOPendingCount function. The reason is that elements of io_threads_pending array access the same cache line from different threads, so it is better to represent it as an array of structures with fields aligned to cache line size. This change should improve performance (in particular, it affects the latency metric, we saw up to 3% improvement).
e2cf386765ddee7cf732a68b4639fac9c489e488
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e2cf386765ddee7cf732a68b4639fac9c489e488
2022-06-26 08:39:30+03:00
Merge pull request #5348 from gkorland/patch-2 No need to return "OK"
54871412c29b799aa324fed2b0ae091e769737ad
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/54871412c29b799aa324fed2b0ae091e769737ad
2018-09-17 15:42:50+02:00
Code review minor changes (names, comments).
c469f6ad9ee46164eed3b33cf067768132ce5e8f
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c469f6ad9ee46164eed3b33cf067768132ce5e8f
2019-10-15 17:21:33+03:00
Add support for incremental build with header files
e5565a793e139f29970d46e3c681316f87fa16e8
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e5565a793e139f29970d46e3c681316f87fa16e8
2020-01-01 10:33:02-05:00
Threaded IO: allow to disable debug printf.
a2dbd9bd977b814ed69500538c3125c51c4963b5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/a2dbd9bd977b814ed69500538c3125c51c4963b5
2019-03-25 12:16:13+01:00
Fix typo in deps/README.md (#10113)
38a511672833037f83669f8f0dc681a7de30bfcb
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/38a511672833037f83669f8f0dc681a7de30bfcb
2022-01-14 22:54:22+11:00
Use utils/create-cluster from any dir (#9766) Co-authored-by: Vadim Pushtaev <[email protected]>
f069d09ee0e266064ab3b2d63390910accd47fbf
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/f069d09ee0e266064ab3b2d63390910accd47fbf
2021-11-11 09:33:09+03:00
Code cleanup, resolve an issue identified by cppcheck (#4373) [src/bitops.c:512] -> [src/bitops.c:507]: (warning) Either the condition 'if(o&&o->encoding==1)' is redundant or there is possible null pointer dereference: o. This function has checks for `o` to be null or non-null, so it is odd that it accesses it first..
94fded4f4f9c3d52d69969c4a2a9d82786a3ac16
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/94fded4f4f9c3d52d69969c4a2a9d82786a3ac16
2021-10-17 18:48:15+03:00
More generic crash report for unsupported archs (#9385) Following compilation warnings on s390x.
0e8d469f82a1971d99e40cb8352116687d98c843
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/0e8d469f82a1971d99e40cb8352116687d98c843
2021-08-18 15:46:11+03:00
fix #5024 - commandstats for multi-exec were logged as EXEC. this was broken a while back by ba9154d7e7bf959b002533384319a1e90545447b the purpose of which was to fix commandstats for GEOADD
f03aed3ca9b5e45635707b1b28011cedbd8914bc
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/f03aed3ca9b5e45635707b1b28011cedbd8914bc
2018-09-30 11:37:19+03:00
Merge pull request #7618 from ShooterIT/benchmark-zset [Redis-benchmark] Support zset type
28a84651029c56b951e2dcfd149292135fc922a1
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/28a84651029c56b951e2dcfd149292135fc922a1
2020-08-11 14:31:11+03:00
Lua debugger: output improvements, eval command.
cf4700bda4929d8d952df16bdd3ca73019d15249
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/cf4700bda4929d8d952df16bdd3ca73019d15249
2015-11-11 10:15:26+01:00
Align RM_ReplyWithErrorFormat with RM_ReplyWithError (#12321) Introduced by https://github.com/redis/redis/pull/11923 (Redis 7.2 RC2) It's very weird and counterintuitive that `RM_ReplyWithError` requires the error-code **without** a hyphen while `RM_ReplyWithErrorFormat` requires either the error-code **with** a hyphen or no error-code at all ``` RedisModule_ReplyWithError(ctx, "BLA bla bla"); ``` vs. ``` RedisModule_ReplyWithErrorFormat(ctx, "-BLA %s", "bla bla"); ``` This commit aligns RM_ReplyWithErrorFormat to behvae like RM_ReplyWithError. it's a breaking changes but it's done before 7.2 goes GA.
20fa156067203b93b7050cc444430d31a6cb6e1b
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/20fa156067203b93b7050cc444430d31a6cb6e1b
2023-06-20 19:44:43+02:00
Streams: When XREAD blocks without COUNT, set a default one. A client may lose a lot of time between invocations of blocking XREAD, for example because it is processing the messages or for any other cause. When it returns back, it may provide a low enough message ID that the server will block to send an unreasonable number of messages in a single call. For this reason we set a COUNT when the client is blocked with XREAD calls, even if no COUNT is given. This is arbitrarily set to 1000 because it's enough to avoid slowing down the reception of many messages, but low enough to avoid to block.
db89f7474d3f4c784bfd8757b2bd3321e3efd9a1
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/db89f7474d3f4c784bfd8757b2bd3321e3efd9a1
2017-09-11 11:20:36+02:00
Add adaptive quicklist fill factor Fill factor now has two options: - negative (1-5) for size-based ziplist filling - positive for length-based ziplist filling with implicit size cap. Negative offsets define ziplist size limits of: -1: 4k -2: 8k -3: 16k -4: 32k -5: 64k Positive offsets now automatically limit their max size to 8k. Any elements larger than 8k will be in individual nodes. Positive ziplist fill factors will keep adding elements to a ziplist until one of: - ziplist has FILL number of elements - or - - ziplist grows above our ziplist max size (currently 8k) When using positive fill factors, if you insert a large element (over 8k), that element will automatically allocate an individual quicklist node with one element and no other elements will be in the same ziplist inside that quicklist node. When using negative fill factors, elements up to the size limit can be added to one quicklist node. If an element is added larger than the max ziplist size, that element will be allocated an individual ziplist in a new quicklist node. Tests also updated to start testing at fill factor -5.
c6bf20c2a7423f464210dd19dd59073a6bb846a2
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c6bf20c2a7423f464210dd19dd59073a6bb846a2
2014-11-26 13:42:10-05:00
Modules: Mark all APIs non-experimental (#9983) These exist for quite some time, and are no longer experimental
e4b3a257eebd0acf0ba7bc5d0902166d02bacfdb
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/e4b3a257eebd0acf0ba7bc5d0902166d02bacfdb
2021-12-30 11:17:22+01:00
Moved most static strings into the shared structure (#8411) Moved most static strings into the shared structure
899c85ae67631f4f9f866a254ac5e149b86e5529
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/899c85ae67631f4f9f866a254ac5e149b86e5529
2021-02-09 11:52:28-08:00
Cluster Manager: CLUSTER_MANAGER_NODE_CONNECT macro
1ad1f00163ecd4c794ce94479de1dc3084187b6e
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/1ad1f00163ecd4c794ce94479de1dc3084187b6e
2018-02-09 13:02:37+01:00
Auto-generate the command table from JSON files (#9656) Delete the hardcoded command table and replace it with an auto-generated table, based on a JSON file that describes the commands (each command must have a JSON file). These JSON files are the SSOT of everything there is to know about Redis commands, and it is reflected fully in COMMAND INFO. These JSON files are used to generate commands.c (using a python script), which is then committed to the repo and compiled. The purpose is: * Clients and proxies will be able to get much more info from redis, instead of relying on hard coded logic. * drop the dependency between Redis-user and the commands.json in redis-doc. * delete help.h and have redis-cli learn everything it needs to know just by issuing COMMAND (will be done in a separate PR) * redis.io should stop using commands.json and learn everything from Redis (ultimately one of the release artifacts should be a large JSON, containing all the information about all of the commands, which will be generated from COMMAND's reply) * the byproduct of this is: * module commands will be able to provide that info and possibly be more of a first-class citizens * in theory, one may be able to generate a redis client library for a strictly typed language, by using this info. ### Interface changes #### COMMAND INFO's reply change (and arg-less COMMAND) Before this commit the reply at index 7 contained the key-specs list and reply at index 8 contained the sub-commands list (Both unreleased). Now, reply at index 7 is a map of: - summary - short command description - since - debut version - group - command group - complexity - complexity string - doc-flags - flags used for documentation (e.g. "deprecated") - deprecated-since - if deprecated, from which version? - replaced-by - if deprecated, which command replaced it? - history - a list of (version, what-changed) tuples - hints - a list of strings, meant to provide hints for clients/proxies. see https://github.com/redis/redis/issues/9876 - arguments - an array of arguments. each element is a map, with the possibility of nesting (sub-arguments) - key-specs - an array of keys specs (already in unstable, just changed location) - subcommands - a list of sub-commands (already in unstable, just changed location) - reply-schema - will be added in the future (see https://github.com/redis/redis/issues/9845) more details on these can be found in https://github.com/redis/redis-doc/pull/1697 only the first three fields are mandatory #### API changes (unreleased API obviously) now they take RedisModuleCommand opaque pointer instead of looking up the command by name - RM_CreateSubcommand - RM_AddCommandKeySpec - RM_SetCommandKeySpecBeginSearchIndex - RM_SetCommandKeySpecBeginSearchKeyword - RM_SetCommandKeySpecFindKeysRange - RM_SetCommandKeySpecFindKeysKeynum Currently, we did not add module API to provide additional information about their commands because we couldn't agree on how the API should look like, see https://github.com/redis/redis/issues/9944. ### Somehow related changes 1. Literals should be in uppercase while placeholder in lowercase. Now all the GEO* command will be documented with M|KM|FT|MI and can take both lowercase and uppercase ### Unrelated changes 1. Bugfix: no_madaory_keys was absent in COMMAND's reply 2. expose CMD_MODULE as "module" via COMMAND 3. have a dedicated uint64 for ACL categories (instead of having them in the same uint64 as command flags) Co-authored-by: Itamar Haber <[email protected]>
867816003ec214840c18754be9840f1ddf4192d1
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/867816003ec214840c18754be9840f1ddf4192d1
2021-12-15 20:23:15+01:00
ACL: assign ACL command ID to modules commands.
b6372f16c414e5f8a20164e6b1b82fc4c133be68
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b6372f16c414e5f8a20164e6b1b82fc4c133be68
2019-02-01 08:17:24+01:00
Merge pull request #6257 from JohnSully/ModuleSecurity Modules must have execute permissions to load
c227f5e7bdbcb29d6f1212e7b0bd2872ce59cbe8
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c227f5e7bdbcb29d6f1212e7b0bd2872ce59cbe8
2019-12-12 09:27:47+01:00
Fix some typos
22bcee5178c68255d1ba7da908405161c4ffbdf5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/22bcee5178c68255d1ba7da908405161c4ffbdf5
2017-07-26 14:11:05+02:00
Merge pull request #4998 from itamarhaber/module_command_help Module command help
bc6a004588dafc14165bbd8851ed9d10fff3295a
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/bc6a004588dafc14165bbd8851ed9d10fff3295a
2018-07-02 18:46:56+02:00
More edits to README
61717ac0951d825084c9261d509161d947fe4603
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/61717ac0951d825084c9261d509161d947fe4603
2015-11-26 18:36:35+05:30
Streams: fix xdel memory leak
eb0e5fe4e3b31c2b6cfebbe95324ce488211d372
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/eb0e5fe4e3b31c2b6cfebbe95324ce488211d372
2018-07-25 00:06:27+08:00
Improve objectComputeSize() with allocator fragmentaiton. (#9095) This commit improve MEMORY USAGE command to include internal fragmentation overheads of: 1. EMBSTR encoded strings 2. ziplist encoded zsets and hashes 3. List type nodes
ada60d8003765eeb0d171904f17d731de7f94b50
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/ada60d8003765eeb0d171904f17d731de7f94b50
2021-06-17 18:30:37+08:00
Modules Timer API: fix infinite loop and export API.
2f7da0fd1a70f8cc0fe2edb2b1d6f37466615457
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/2f7da0fd1a70f8cc0fe2edb2b1d6f37466615457
2018-03-31 00:44:46+02:00
Fix crash due to delete entry from compress quicklistNode and wrongly split quicklistNode (#11242) This PR mainly deals with 2 crashes introduced in #9357, and fix the QUICKLIST-PACKED-THRESHOLD mess in external test mode. 1. Fix crash due to deleting an entry from a compress quicklistNode When inserting a large element, we need to create a new quicklistNode first, and then delete its previous element, if the node where the deleted element is located is compressed, it will cause a crash. Now add `dont_compress` to quicklistNode, if we want to use a quicklistNode after some operation, we can use this flag like following: ```c node->dont_compress = 1; /* Prevent to be compressed */ some_operation(node); /* This operation might try to compress this node */ some_other_operation(node); /* We can use this node without decompress it */ node->dont_compress = 0; /* Re-able compression */ quicklistCompressNode(node); ``` Perhaps in the future, we could just disable the current entry from being compressed during the iterator loop, but that would require more work. 2. Fix crash due to wrongly split quicklist before #9357, the offset param of _quicklistSplitNode() will not negative. For now, when offset is negative, the split extent will be wrong. following example: ```c int orig_start = after ? offset + 1 : 0; int orig_extent = after ? -1 : offset; int new_start = after ? 0 : offset; int new_extent = after ? offset + 1 : -1; # offset: -2, after: 1, node->count: 2 # current wrong range: [-1,-1] [0,-1] # correct range: [1,-1] [0, 1] ``` Because only `_quicklistInsert()` splits the quicklistNode and only `quicklistInsertAfter()`, `quicklistInsertBefore()` call _quicklistInsert(), so `quicklistReplaceEntry()` and `listTypeInsert()` might occur this crash. But the iterator of `listTypeInsert()` is alway from head to tail(iter->offset is always positive), so it is not affected. The final conclusion is this crash only occur when we insert a large element with negative index into a list, that affects `LSET` command and `RM_ListSet` module api. 3. In external test mode, we need to restore quicklist packed threshold after when the end of test. 4. Show `node->count` in quicklistRepr(). 5. Add new tcl proc `config_get_set` to support restoring config in tests.
13d25dd95eec5e21925ef474b5d43f2acb23e54e
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/13d25dd95eec5e21925ef474b5d43f2acb23e54e
2022-09-19 14:47:52+08:00
Fix potential invalid read past end of array If array has N elements, we can't read +1 if we are already at N. Also, we need to move elements by their storage size in the array, not just by individual bytes.
29049507ec34efd59ce6de7cff524fb44b47f934
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/29049507ec34efd59ce6de7cff524fb44b47f934
2015-01-14 11:10:25-05:00
fix new cluster tests issues (#9657) Following #9483 the daily CI exposed a few problems. * The cluster creation code (uses redis-cli) is complicated to test with TLS enabled. for now i'm just skipping them since the tests we run there don't really need that kind of coverage * cluster port binding failures note that `find_available_port` already looks for a free cluster port but the code in `wait_server_started` couldn't detect the failure of binding (the text it greps for wasn't found in the log)
7d6744c739b25ae27a42f6fcf235e0d6bfbb3e61
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/7d6744c739b25ae27a42f6fcf235e0d6bfbb3e61
2021-10-20 15:40:28+03:00
Add 'Available since' to module API function docs (#10229) The script which generates the markdown docs from module.c is updated to include the version in which each module API function was introduced. The script uses git tags to find this information. If git is not available or if we're not in a git repo, the 'since' is silently skipped. The line `**Available since:** (version)` is added after the function prototype Rename to utils/generate-module-api-doc.rb
f4ecc799c87fa504b375afc17a7f8302789254b5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/f4ecc799c87fa504b375afc17a7f8302789254b5
2022-02-03 09:25:37+01:00
Fix RM_Yield bug (#10548) The bug was when using REDISMODULE_YIELD_FLAG_CLIENTS. in that case we would have only set the CLIENTS type flag in server.busy_module_yield_flags and then clear that flag when exiting RM_Yield, so we would never call unblockPostponedClients when the context is destroyed. This didn't really have any actual implication, which is why the tests couldn't (and still can't) find that since the bug only happens when using CLIENT, but in this case we won't have any clients to un-postpone i.e. clients will get rejected with BUSY error, rather than being postponed. Unrelated: * Adding tests for nested contexts, just in case. * Avoid nested RM_Yield calls
451531f1c89e34cc1aef0eb4bc1cdc78340f0bda
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/451531f1c89e34cc1aef0eb4bc1cdc78340f0bda
2022-04-07 11:52:28+03:00
Fix pointer access and memory leak in redis-cli.
64324901f22946a93226e0af56a6e59b2290be09
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/64324901f22946a93226e0af56a6e59b2290be09
2018-11-16 17:20:53+08:00
add regression test for the race in #7205 with the original version of 6.0.0, this test detects an excessive full sync. with the fix in 1a7cd2c0e, this test detects memory corruption, especially when using libc allocator with or without valgrind.
357aace8953e5c904d9d9d408258cd824df1717c
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/357aace8953e5c904d9d9d408258cd824df1717c
2020-05-17 18:26:02+03:00
RM_ZsetRangeNext()/Prev() typo in define name leading to crash fixed.
5daece2ec6fae603742538284422ed416f021b2f
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/5daece2ec6fae603742538284422ed416f021b2f
2016-05-10 00:38:48+02:00
Fix units in log message of copy-on-write (#8320)
593cde16bcac64fb52a36500377574e981c580f6
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/593cde16bcac64fb52a36500377574e981c580f6
2021-01-13 17:38:02+08:00
Fix potential replication-4 test race condition. (#8583) Co-authored-by: Oran Agra <[email protected]>
5d180d28349b36a177f9d70edb12bb27e88e8c61
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/5d180d28349b36a177f9d70edb12bb27e88e8c61
2021-03-02 18:12:11+02:00
QUIT is a command, HOST: and POST are not (#9798) Some people complain that QUIT is missing from help/command table. Not appearing in COMMAND command, command stats, ACL, etc. and instead, there's a hack in processCommand with a comment that looks outdated. Note that it is [documented](https://redis.io/commands/quit) At the same time, HOST: and POST are there in the command table although these are not real commands. They would appear in the COMMAND command, and even in commandstats. Other changes: 1. Initialize the static logged_time static var in securityWarningCommand 2. add `no-auth` flag to RESET so it can always be executed.
b161cff5f92a01acc23ac4ff533e65bda579e1a6
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b161cff5f92a01acc23ac4ff533e65bda579e1a6
2021-11-23 09:38:25+01:00
Fix OOM error not raised of functions (#10048) OOM Error did not raise on functions due to a bug. Added test to verify the fix.
78a62c012438a8ae23161f6cfef8159e3a254524
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/78a62c012438a8ae23161f6cfef8159e3a254524
2022-01-03 19:04:29+02:00
Fix replication inconsistency on modules that uses key space notifications (#10969) Fix replication inconsistency on modules that uses key space notifications. ### The Problem In general, key space notifications are invoked after the command logic was executed (this is not always the case, we will discuss later about specific command that do not follow this rules). For example, the `set x 1` will trigger a `set` notification that will be invoked after the `set` logic was performed, so if the notification logic will try to fetch `x`, it will see the new data that was written. Consider the scenario on which the notification logic performs some write commands. for example, the notification logic increase some counter, `incr x{counter}`, indicating how many times `x` was changed. The logical order by which the logic was executed is has follow: ``` set x 1 incr x{counter} ``` The issue is that the `set x 1` command is added to the replication buffer at the end of the command invocation (specifically after the key space notification logic was invoked and performed the `incr` command). The replication/aof sees the commands in the wrong order: ``` incr x{counter} set x 1 ``` In this specific example the order is less important. But if, for example, the notification would have deleted `x` then we would end up with primary-replica inconsistency. ### The Solution Put the command that cause the notification in its rightful place. In the above example, the `set x 1` command logic was executed before the notification logic, so it should be added to the replication buffer before the commands that is invoked by the notification logic. To achieve this, without a major code refactoring, we save a placeholder in the replication buffer, when finishing invoking the command logic we check if the command need to be replicated, and if it does, we use the placeholder to add it to the replication buffer instead of appending it to the end. To be efficient and not allocating memory on each command to save the placeholder, the replication buffer array was modified to reuse memory (instead of allocating it each time we want to replicate commands). Also, to avoid saving a placeholder when not needed, we do it only for WRITE or MAY_REPLICATE commands. #### Additional Fixes * Expire and Eviction notifications: * Expire/Eviction logical order was to first perform the Expire/Eviction and then the notification logic. The replication buffer got this in the other way around (first notification effect and then the `del` command). The PR fixes this issue. * The notification effect and the `del` command was not wrap with `multi-exec` (if needed). The PR also fix this issue. * SPOP command: * On spop, the `spop` notification was fired before the command logic was executed. The change in this PR would have cause the replication order to be change (first `spop` command and then notification `logic`) although the logical order is first the notification logic and then the `spop` logic. The right fix would have been to move the notification to be fired after the command was executed (like all the other commands), but this can be considered a breaking change. To overcome this, the PR keeps the current behavior and changes the `spop` code to keep the right logical order when pushing commands to the replication buffer. Another PR will follow to fix the SPOP properly and match it to the other command (we split it to 2 separate PR's so it will be easy to cherry-pick this PR to 7.0 if we chose to). #### Unhanded Known Limitations * key miss event: * On key miss event, if a module performed some write command on the event (using `RM_Call`), the `dirty` counter would increase and the read command that cause the key miss event would be replicated to the replication and aof. This problem can also happened on a write command that open some keys but eventually decides not to perform any action. We decided not to handle this problem on this PR because the solution is complex and will cause additional risks in case we will want to cherry-pick this PR. We should decide if we want to handle it in future PR's. For now, modules writers is advice not to perform any write commands on key miss event. #### Testing * We already have tests to cover cases where a notification is invoking write commands that are also added to the replication buffer, the tests was modified to verify that the replica gets the command in the correct logical order. * Test was added to verify that `spop` behavior was kept unchanged. * Test was added to verify key miss event behave as expected. * Test was added to verify the changes do not break lazy expiration. #### Additional Changes * `propagateNow` function can accept a special dbid, -1, indicating not to replicate `select`. We use this to replicate `multi/exec` on `propagatePendingCommands` function. The side effect of this change is that now the `select` command will appear inside the `multi/exec` block on the replication stream (instead of outside of the `multi/exec` block). Tests was modified to match this new behavior.
508a138885b33666923ab92720c8c3263dc5bd56
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/508a138885b33666923ab92720c8c3263dc5bd56
2022-08-18 10:16:32+03:00
Regression test for PSYNC2 issue #3899 added. Experimentally verified that it can trigger the issue reverting the fix. At least on my system... Being the bug time/backlog dependant, it is very hard to tell if this test will be able to trigger the problem consistently, however even if it triggers the problem once in a while, we'll see it in the CI environment at http://ci.redis.io.
c180bc7d98061fd59be54ca83b67abfd6ce65414
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/c180bc7d98061fd59be54ca83b67abfd6ce65414
2017-04-28 10:37:07+02:00
ld2string should fail if string contains \0 in the middle This bug affected RM_StringToLongDouble and HINCRBYFLOAT. I added tests for both cases. Main changes: 1. Fixed string2ld to fail if string contains \0 in the middle 2. Use string2ld in getLongDoubleFromObject - No point of having duplicated code here The two changes above broke RM_SaveLongDouble/RM_LoadLongDouble because the long double string was saved with length+1 (An innocent mistake, but it's actually a bug - The length passed to RM_SaveLongDouble should not include the last \0).
2deb55512ffd86e494d376586cc0d402db21ca89
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/2deb55512ffd86e494d376586cc0d402db21ca89
2020-01-30 18:14:45+05:30
Fix harmless bug in rioConnRead (#7557) this code is in use only if the master is disk-based, and the replica is diskless. In this case we use a buffered reader, but we must avoid reading past the rdb file, into the command stream. which Luckly rdb.c doesn't really attempt to do (it knows how much it should read). When rioConnRead detects that the extra buffering attempt reaches beyond the read limit it should read less, but if the caller actually requested more, then it should return with an error rather than a short read. the bug would have resulted in short read. in order to fix it, the code must consider the real requested size, and not the extra buffering size.
40d7fca3685d8439bae8480ddbd59775a2390411
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/40d7fca3685d8439bae8480ddbd59775a2390411
2020-07-23 12:37:43+03:00
Fix if consumer is created as a side effect without notify and dirty++ (#9263) Fixes: - When a consumer is created as a side effect, redis didn't issue a keyspace notification, nor incremented the server.dirty (affects periodic snapshots). this was a bug in XREADGROUP, XCLAIM, and XAUTOCLAIM. - When attempting to delete a non-existent consumer, don't issue a keyspace notification and don't increment server.dirty this was a bug in XGROUP DELCONSUMER Other changes: - Changed streamLookupConsumer() to always only do lookup consumer (never do implicit creation), Its last seen time is updated unless the SLC_NO_REFRESH flag is specified. - Added streamCreateConsumer() to create a new consumer. When the creation is successful, it will notify and dirty++ unless the SCC_NO_NOTIFY or SCC_NO_DIRTIFY flags is specified. - Changed streamDelConsumer() to always only do delete consumer. - Added keyspace notifications tests about stream events.
82c3158ad5fe5aab002a6d0565832d5bd15082f5
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/82c3158ad5fe5aab002a6d0565832d5bd15082f5
2021-08-02 13:31:33+08:00
Integer Overflow in RAND commands can lead to assertion (CVE-2023-25155) (#11857) Issue happens when passing a negative long value that greater than the max positive value that the long can store.
b1939b052adc058bd814045a745ec02d3f791d7b
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/b1939b052adc058bd814045a745ec02d3f791d7b
2023-02-28 15:15:46+02:00
Avoid an out-of-bounds read in the redis-sentinel (#7443) The Redis sentinel would crash with a segfault after a few minutes because it tried to read from a page without read permissions. Check up front whether the sds is long enough to contain redis:slave or redis:master before memcmp() as is done everywhere else in sentinelRefreshInstanceInfo(). Bug report and commit message from Theo Buehler. Fix from Nam Nguyen. Co-authored-by: Nam Nguyen <[email protected]>
63dae5232415d216dfc1acce8b5335e20aa3b178
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/63dae5232415d216dfc1acce8b5335e20aa3b178
2020-07-28 22:25:56-07:00
Fix integer overflow in intset (CVE-2021-29478) An integer overflow bug in Redis 6.2 could be exploited to corrupt the heap and potentially result with remote code execution. The vulnerability involves changing the default set-max-intset-entries configuration value, creating a large set key that consists of integer values and using the COPY command to duplicate it. The integer overflow bug exists in all versions of Redis starting with 2.6, where it could result with a corrupted RDB or DUMP payload, but not exploited through COPY (which did not exist before 6.2).
29900d4e6bccdf3691bedf0ea9a5d84863fa3592
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/29900d4e6bccdf3691bedf0ea9a5d84863fa3592
2021-05-03 08:27:22+03:00
Fix test "server is up" detection after logging changes.
8444b46d20ef9c8de3f7e255e4f3bfa44f509c77
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/8444b46d20ef9c8de3f7e255e4f3bfa44f509c77
2016-12-19 16:49:58+01:00
Fix SLOWLOG for blocked commands (#8632) * SLOWLOG didn't record anything for blocked commands because the client was reset and argv was already empty. there was a fix for this issue specifically for modules, now it works for all blocked clients. * The original command argv (before being re-written) was also reset before adding the slowlog on behalf of the blocked command. * Latency monitor is now updated regardless of the slowlog flags of the command or its execution (their purpose is to hide sensitive info from the slowlog, not hide the fact the latency happened). * Latency monitor now uses real_cmd rather than c->cmd (which may be different if the command got re-written, e.g. GEOADD) Changes: * Unify shared code between slowlog insertion in call() and updateStatsOnUnblock(), hopefully prevent future bugs from happening due to the later being overlooked. * Reset CLIENT_PREVENT_LOGGING in resetClient rather than after command processing. * Add a test for SLOWLOG and BLPOP Notes: - real_cmd == c->lastcmd, except inside MULTI and Lua. - blocked commands never happen in these cases (MULTI / Lua) - real_cmd == c->cmd, except for when the command is rewritten (e.g. GEOADD) - blocked commands (currently) are never rewritten - other than the command's CLIENT_PREVENT_LOGGING, and the execution flag CLIENT_PREVENT_LOGGING, other cases that we want to avoid slowlog are on AOF loading (specifically CMD_CALL_SLOWLOG will be off when executed from execCommand that runs from an AOF)
497351ad07365109a57c831c5e99b15dfbefdeb3
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/497351ad07365109a57c831c5e99b15dfbefdeb3
2021-03-25 10:20:27+02:00
Fix crash log output on ARM. (#8020)
7e4325cbc9af96d55f0b61c7648233a4473e8c93
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/7e4325cbc9af96d55f0b61c7648233a4473e8c93
2020-11-05 15:43:53+02:00
Sanitize dump payload: fix double free after insert dup nodekey to stream rax and returns 0 (#9399)
492d8d09613cff88f15dcef98732392b8d509eb1
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/492d8d09613cff88f15dcef98732392b8d509eb1
2021-08-20 15:37:45+08:00
Add warning for suspected slow system clocksource setting (#10636) This PR does 2 main things: 1) Add warning for suspected slow system clocksource setting. This is Linux specific. 2) Add a `--check-system` argument to redis which runs all system checks and prints a report. ## System checks Add a command line option `--check-system` which runs all known system checks and provides a report to stdout of which systems checks have failed with details on how to reconfigure the system for optimized redis performance. The `--system-check` mode exists with an appropriate error code after running all the checks. ## Slow clocksource details We check the system's clocksource performance by running `clock_gettime()` in a loop and then checking how much time was spent in a system call (via `getrusage()`). If we spend more than 10% of the time in the kernel then we print a warning. I verified that using the slow clock sources: `acpi_pm` (~90% in the kernel on my laptop) and `xen` (~30% in the kernel on an ec2 `m4.large`) we get this warning. The check runs 5 system ticks so we can detect time spent in kernel at 20% jumps (0%,20%,40%...). Anything more accurate will require the test to run longer. Typically 5 ticks are 50ms. This means running the test on startup will delay startup by 50ms. To avoid this we make sure the test is only executed in the `--check-system` mode. For a quick startup check, we specifically warn if the we see the system is using the `xen` clocksource which we know has bad performance and isn't recommended (at least on ec2). In such a case the user should manually rung redis with `--check-system` to force the slower clocksource test described above. ## Other changes in the PR * All the system checks are now implemented as functions in _syscheck.c_. They are implemented using a standard interface (see details in _syscheck.c_). To do this I moved the checking functions `linuxOvercommitMemoryValue()`, `THPIsEnabled()`, `linuxMadvFreeForkBugCheck()` out of _server.c_ and _latency.c_ and into the new _syscheck.c_. When moving these functions I made sure they don't depend on other functionality provided in _server.c_ and made them use a standard "check functions" interface. Specifically: * I removed all logging out of `linuxMadvFreeForkBugCheck()`. In case there's some unexpected error during the check aborts as before, but without any logging. It returns an error code 0 meaning the check didn't not complete. * All these functions now return 1 on success, -1 on failure, 0 in case the check itself cannot be completed. * The `linuxMadvFreeForkBugCheck()` function now internally calls `exit()` and not `exitFromChild()` because the latter is only available in _server.c_ and I wanted to remove that dependency. This isn't an because we don't need to worry about the child process created by the test doing anything related to the rdb/aof files which is why `exitFromChild()` was created. * This also fixes parsing of other /proc/\<pid\>/stat fields to correctly handle spaces in the process name and be more robust in general. Not that before this fix the rss info in `INFO memory` was corrupt in case of spaces in the process name. To recreate just rename `redis-server` to `redis server`, start it, and run `INFO memory`.
843a4cdc075a5b251e1b154f8013a9e0abe1038b
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/843a4cdc075a5b251e1b154f8013a9e0abe1038b
2022-05-22 17:10:31+03:00
Fix failing tests due to issues with wait_for_log_message (#7572) - the test now waits for specific set of log messages rather than wait for timeout looking for just one message. - we don't wanna sample the current length of the log after an action, due to a race, we need to start the search from the line number of the last message we where waiting for. - when attempting to trigger a full sync, use multi-exec to avoid a race where the replica manages to re-connect before we completed the set of actions that should force a full sync. - fix verify_log_message which was broken and unused
109b5ccdcd6e6b8cecdaeb13a246bc49ce7a61f4
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/109b5ccdcd6e6b8cecdaeb13a246bc49ce7a61f4
2020-07-28 11:15:29+03:00
Fix leak and double free issues in datatype2 module test (#9102) * Add missing call for RedisModule_DictDel in datatype2 test * Fix memory leak in datatype2 test
eae0983d2d5f13e0897494f2604a0df691c1678d
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/eae0983d2d5f13e0897494f2604a0df691c1678d
2021-06-18 02:45:21+08:00
Fix a race that may lead to the active (slave) client to be freed. In issue #2948 a crash was reported in processCommand(). Later Oran Agra (@oranagra) traced the bug (in private chat) in the following sequence of events: 1. Some maxmemory is set. 2. The slave is the currently active client and is executing PING or REPLCONF or whatever a slave can send to its master. 3. freeMemoryIfNeeded() is called since maxmemory is set. 4. flushSlavesOutputBuffers() is called by freeMemoryIfNeeded(). 5. During slaves buffers flush, a write error could be encoutered in writeToClient() or sendReplyToClient() depending on the version of Redis. This will trigger freeClient() against the currently active client, so a segmentation fault will likely happen in processCommand() immediately after the call to freeMemoryIfNeeded(). There are different possible fixes: 1. Add flags to writeToClient() (recent versions code base) so that we can ignore the write errors, and use this flag in flushSlavesOutputBuffers(). However this is not simple to do in older versions of Redis. 2. Use freeClientAsync() during write errors. This works but changes the current behavior of releasing clients ASAP when possible. Normally we write to clients during the normal event loop processing, in the writable client, where there is no active client, so no care must be taken. 3. The fix of this commit: to detect that the current client is no longer valid. This fix is a bit "ad-hoc", but works across all the versions and has the advantage of not changing the remaining behavior. Only alters what happens during this race condition, hopefully.
bb215375967cea35a1562feedbce97cf0222f811
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/bb215375967cea35a1562feedbce97cf0222f811
2015-12-17 09:39:43+01:00
fix unstable replication test this test which has coverage for varoius flows of diskless master was failing randomly from time to time. the failure was: [err]: diskless all replicas drop during rdb pipe in tests/integration/replication.tcl log message of '*Diskless rdb transfer, last replica dropped, killing fork child*' not found what seemed to have happened is that the master didn't detect that all replicas dropped by the time the replication ended, it thought that one replica is still connected. now the test takes a few seconds longer but it seems stable.
b4416280cf9488f9e836d5fca1708849757c5f5c
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b4416280cf9488f9e836d5fca1708849757c5f5c
2020-05-12 08:59:09+03:00
Fix unstable test: replication with parallel clients writing in different DBs (#11782) Failure happens in FreeBSD daily: ``` *** [err]: Test replication with parallel clients writing in different DBs in tests/integration/replication-4.tcl Expected [::redis::redisHandle2 dbsize] > 0 (context: type eval line 19 cmd {assert {[$master dbsize] > 0}} proc ::test) ``` The test is failing because db 9 has no data (default db), and according to the log, we can see that db 9 does not have a key: ``` ### Starting test Test replication with parallel clients writing in different DBs in tests/integration/replication-4.tcl 3338:S 03 Feb 2023 00:15:18.723 - DB 11: 1 keys (0 volatile) in 4 slots HT. 3338:S 03 Feb 2023 00:15:18.723 - DB 12: 141 keys (0 volatile) in 256 slots HT. ``` We use `wait_for_condition` to ensure that parallel clients have written data before calling stop_bg_complex_data. At the same time, `wait_for_condition` is also used to remove the above `after 1000`, which can save time in most cases.
03347d04487daa5ee173f4d902351ee6a13618be
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/03347d04487daa5ee173f4d902351ee6a13618be
2023-02-03 17:18:04+08:00
Fix regression causing EXEC to appear in the slow log. This was recently introduced with PR #6266.
583933e2d6b4c2721554ab77c33a9c0bc7672fa6
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/583933e2d6b4c2721554ab77c33a9c0bc7672fa6
2019-07-31 19:04:29+02:00
fixed bad transfer of ownership in HashSet causing a potential crash
cfaef8d5d494dc199117cb7a6841dfbdc43dd22e
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/cfaef8d5d494dc199117cb7a6841dfbdc43dd22e
2016-05-17 16:47:36+03:00
Fix race condition in cluster test 22-replica-in-sync (#9721) there was a chance that by the time the assertion is executed, the replica already manages to reconnect. now we make sure the replica is unable to re-connect to the master. additionally, we wait for some gossip from the disconnected replica, to see that it doesn't mess things up. unrelated: fix a typo when trying to exhaust the backlog, one that didn't have any harmful implications Co-authored-by: Madelyn Olson <[email protected]>
d04f306931f337e70a9cb270f0bbd1a202eedeb0
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/d04f306931f337e70a9cb270f0bbd1a202eedeb0
2021-11-04 08:44:18+02:00
fix redis-benchmark to ignore unsupported configs (#8916) Redis Enterprise supports the CONFIG GET command, but it replies with am empty array since the save and appendonly configs are not supported. before this fix redis-benchmark would segfault for trying to access the error string on an array type reply. see #8869
4d1094e8be3150b92b3e96d3a743c66b1a95988a
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/4d1094e8be3150b92b3e96d3a743c66b1a95988a
2021-05-06 17:45:49+03:00
fix clusterManagerGetAntiAffinityScore double free otypes
c90cf3d82f3288762441f2c287a21301c8be0ae7
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/c90cf3d82f3288762441f2c287a21301c8be0ae7
2019-01-19 11:38:36+08:00
Fix typo in redis.conf doc (#8362) Fix incorrect documentation about default save time
4f9de66f0eb50469767ed05a38c2eb091c9663e5
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/4f9de66f0eb50469767ed05a38c2eb091c9663e5
2021-01-20 20:36:59-05:00
fix valgrind issues with long double module test (#9709) The module test in reply.tcl was introduced by #8521 but didn't run until recently (see #9639) and then it started failing with valgrind. This is because valgrind uses 64 bit long double (unlike most other platforms that have at least 80 bits) But besides valgrind, the tests where also incompatible with ARM32, which also uses 64 bit long doubles. We now use appropriate value to avoid issues with either valgrind or ARM32 In all the double tests, i use 3.141, which is safe since since addReplyDouble uses `%.17Lg` which is able to represent this value without adding any digits due to precision loss. In the long double, since we use `%.17Lf` in ld2string, it preserves 17 significant digits, rather than 17 digit after the decimal point (like in `%.17Lg`). So to make these similar, i use value lower than 1 (no digits left of the period) Lastly, we have the same issue with TCL (no long doubles) so we read raw protocol in that test. Note that the only error before this fix (in both valgrind and ARM32 is this: ``` *** [err]: RM_ReplyWithLongDouble: a float reply in tests/unit/moduleapi/reply.tcl Expected '3.141' to be equal to '3.14100000000000001' (context: type eval line 2 cmd {assert_equal 3.141 [r rw.longdouble 3.141]} proc ::test) ``` so the changes to debug.c and scripting.tcl aren't really needed, but i consider them a cleanup (i.e. scripting.c validated a different constant than the one that's sent to it from debug.c). Another unrelated change is to add the RESP version to the repeated tests in reply.tcl
f1f3cceb50ac97187f9dca37b041583a5f6ee6aa
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/f1f3cceb50ac97187f9dca37b041583a5f6ee6aa
2021-11-01 13:41:35+02:00
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
ce17f76bbd95f68ab6716adcbf12d49e3822b87c
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/ce17f76bbd95f68ab6716adcbf12d49e3822b87c
2018-06-11 12:08:42+02:00
Merge pull request #3648 from dvirsky/fix_reply_crash fix memory corruption on RM_FreeCallReply
3c4fe59e095d1ff06cf5f99706c357a0c6f7b5b1
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/3c4fe59e095d1ff06cf5f99706c357a0c6f7b5b1
2016-11-30 11:21:10+01:00
Fix #11030, use lua_rawget to avoid triggering metatables and crash. (#11032) Fix #11030, use lua_rawget to avoid triggering metatables. #11030 shows how return `_G` from the Lua script (either function or eval), cause the Lua interpreter to Panic and the Redis processes to exit with error code 1. Though return `_G` only panic on Redis 7 and 6.2.7, the underline issue exists on older versions as well (6.0 and 6.2). The underline issue is returning a table with a metatable such that the metatable raises an error. The following example demonstrate the issue: ``` 127.0.0.1:6379> eval "local a = {}; setmetatable(a,{__index=function() foo() end}) return a" 0 Error: Server closed the connection ``` ``` PANIC: unprotected error in call to Lua API (user_script:1: Script attempted to access nonexistent global variable 'foo') ``` The Lua panic happened because when returning the result to the client, Redis needs to introspect the returning table and transform the table into a resp. In order to scan the table, Redis uses `lua_gettable` api which might trigger the metatable (if exists) and might raise an error. This code is not running inside `pcall` (Lua protected call), so raising an error causes the Lua to panic and exit. Notice that this is not a crash, its a Lua panic that exit with error code 1. Returning `_G` panics on Redis 7 and 6.2.7 because on those versions `_G` has a metatable that raises error when trying to fetch a none existing key. ### Solution Instead of using `lua_gettable` that might raise error and cause the issue, use `lua_rawget` that simply return the value from the table without triggering any metatable logic. This is promised not to raise and error. The downside of this solution is that it might be considered as breaking change, if someone rely on metatable in the returned value. An alternative solution is to wrap this entire logic with `pcall` (Lua protected call), this alternative require a much bigger refactoring. ### Back Porting The same fix will work on older versions as well (6.2, 6.0). Notice that on those version, the issue can cause Redis to crash if inside the metatable logic there is an attempt to accesses Redis (`redis.call`). On 7.0, there is not crash and the `redis.call` is executed as if it was done from inside the script itself. ### Tests Tests was added the verify the fix
020e046b4210f64a614d7ec51b4ee09f746e5350
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/020e046b4210f64a614d7ec51b4ee09f746e5350
2022-07-26 10:33:50+03:00
Merge pull request #7375 from hwware/lcs_crash_fix Fix Server Crash in LCS Command
a66298e6f1360cbfd52bded0b14af0f1855a5f8a
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a66298e6f1360cbfd52bded0b14af0f1855a5f8a
2020-06-12 12:31:15+02:00
lua_struct.c/getnum: throw error if overflow happen Fix issue #2855
3a47c8cfb85af1b69cccf30eaaa690e4a23ab20a
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/3a47c8cfb85af1b69cccf30eaaa690e4a23ab20a
2015-12-13 13:47:22+08:00
Avoid using unsafe C functions (#10932) replace use of: sprintf --> snprintf strcpy/strncpy --> redis_strlcpy strcat/strncat --> redis_strlcat **why are we making this change?** Much of the code uses some unsafe variants or deprecated buffer handling functions. While most cases are probably not presenting any issue on the known path programming errors and unterminated strings might lead to potential buffer overflows which are not covered by tests. **As part of this PR we change** 1. added implementation for redis_strlcpy and redis_strlcat based on the strl implementation: https://linux.die.net/man/3/strl 2. change all occurrences of use of sprintf with use of snprintf 3. change occurrences of use of strcpy/strncpy with redis_strlcpy 4. change occurrences of use of strcat/strncat with redis_strlcat 5. change the behavior of ll2string/ull2string/ld2string so that it will always place null termination ('\0') on the output buffer in the first index. this was done in order to make the use of these functions more safe in cases were the user will not check the output returned by them (for example in rdbRemoveTempFile) 6. we added a compiler directive to issue a deprecation error in case a use of sprintf/strcpy/strcat is found during compilation which will result in error during compile time. However keep in mind that since the deprecation attribute is not supported on all compilers, this is expected to fail during push workflows. **NOTE:** while this is only an initial milestone. We might also consider using the *_s implementation provided by the C11 Extensions (however not yet widly supported). I would also suggest to start looking at static code analyzers to track unsafe use cases. For example LLVM clang checker supports security.insecureAPI.DeprecatedOrUnsafeBufferHandling which can help locate unsafe function usage. https://clang.llvm.org/docs/analyzer/checkers.html#security-insecureapi-deprecatedorunsafebufferhandling-c The main reason not to onboard it at this stage is that the alternative excepted by clang is to use the C11 extensions which are not always supported by stdlib.
eacca729a55501508c434bab30c2432e58728aee
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/eacca729a55501508c434bab30c2432e58728aee
2022-07-18 10:56:26+03:00
ACL: fix field name typo causing segfault.
09391369b871eb9def03a61bafa40c7cfedda6a7
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/09391369b871eb9def03a61bafa40c7cfedda6a7
2019-01-14 16:09:29+01:00
Fix Uninitialised value error in createSparklineSequence (LATENCY GRAPH) (#11892) This was exposed by a new LATENCY GRAPH valgrind test. There are no security implications, fix by initializing these members.
c46d68d6d273e7c86fd1f1d10caca4e47a3294f8
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/c46d68d6d273e7c86fd1f1d10caca4e47a3294f8
2023-03-09 18:05:50+08:00
Remove update-jemalloc.sh, it's not needed anymore (#9690) We now use git subtree for deps/jemalloc, updating jemalloc is detailed in deps/README.md
b7afac6bc24548799b945d2d8e3d8b72904272d8
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/b7afac6bc24548799b945d2d8e3d8b72904272d8
2021-10-27 14:48:08+03:00
Fix test false positive due to a race condition. (#8616)
817894c012ee67cdf8e33e0a098025f65521ba42
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/817894c012ee67cdf8e33e0a098025f65521ba42
2021-03-08 21:22:08+02:00
Streams: fix xreadGetKeys() buffer overflow. The loop allocated a buffer for the right number of keys positions, then overflowed it going past the limit. Related to #4857 and cause of the memory violation seen in #5028.
a0b27dae85ae071b60d4c5196e7d18d72fbbba2b
redis
neuralsentry
1
https://github.com/redis/redis
https://github.com/redis/redis/commit/a0b27dae85ae071b60d4c5196e7d18d72fbbba2b
2018-06-18 13:51:19+02:00
fix spelling mistake in bitops.c
51b9de037dc64911430a333c277ac90064c9b834
redis
neuralsentry
0
https://github.com/redis/redis
https://github.com/redis/redis/commit/51b9de037dc64911430a333c277ac90064c9b834
2020-04-08 18:20:32+08:00