Files
nats-server/server
Derek Collison 04d4f08e8c Under heavy contention skip combined with remove could result in index being stamped with underflow for number of messages.
We had a report of a panic on server restart with 2.8.0-beta.1. The panic was trying to malloc the size of a load block based off of the number of messages we thought the block had from the index.
Before, SkipMsg would decrement and when we added the record via writeMsgRecord we would add it back in. However we did release the lock, meaning other things could run.
If in between the decrement, say to 0 (we did protect against underflow there), then a remove and subsequent writeIndexInfo would stamp and underflow.

Signed-off-by: Derek Collison <derek@nats.io>
2022-03-26 11:05:38 -07:00
..
2021-11-15 17:23:08 -07:00
2021-11-15 17:23:08 -07:00
2022-01-21 11:03:19 -08:00
2022-03-24 16:52:42 -07:00
2021-11-15 17:23:08 -07:00
2021-11-15 17:23:08 -07:00
2021-11-15 17:23:08 -07:00
2020-02-25 19:53:09 -05:00
2021-12-14 10:00:54 -07:00
2022-03-17 17:53:06 -06:00
2021-11-15 17:23:08 -07:00
2022-03-17 17:53:06 -06:00
2022-03-17 17:53:06 -06:00
2022-02-04 13:32:18 -08:00
2021-01-14 01:14:52 -08:00
2019-05-06 15:41:38 -07:00
2022-03-17 17:53:06 -06:00
2022-01-21 11:03:19 -08:00
2020-06-12 10:03:47 -06:00
2021-12-16 16:53:20 -05:00
2018-10-06 14:06:14 -07:00
2022-03-17 17:53:06 -06:00
2022-03-17 17:53:06 -06:00
2022-03-25 12:11:55 -06:00
2021-11-15 17:23:08 -07:00
2019-11-14 20:05:32 -07:00
2021-11-15 17:23:08 -07:00
2021-11-15 17:23:08 -07:00
2021-09-01 14:55:26 -07:00
2021-11-15 17:23:08 -07:00
2019-12-12 11:58:24 -07:00
2021-12-16 16:53:20 -05:00
2021-09-13 15:22:05 +03:00
2022-03-25 12:11:55 -06:00
2022-03-25 12:11:55 -06:00