-
- Downloads
obj: fix crash after large undo log recovery
The 'operation_context' structure was being created twice, once as part of lane initialization, and once as part of the recovery operation. The first context is used for all operations, whereas the second context lives only for the duration of the undo log recovery. The problem was that the recovery process can change the persistent state in such a way that the context runtime information becomes stale. This is perfectly fine, and it's handled for the operation that does the recovery - but at the same time, this makes the data of the lane context invalid. This bug was triggering ASSERTs in debug builds and might have led to NULL dereference on release builds. Fortunately the crash happens after recovery has been finished and simply restarting the application gets rid of the problem. The fix is quite simple: instead of duplicating the runtime state for the purpose of recovery, simply use the one that already exists in the lane.
Showing
- src/libpmemobj/lane.c 2 additions, 16 deletionssrc/libpmemobj/lane.c
- src/test/obj_recovery/Makefile 2 additions, 1 deletionsrc/test/obj_recovery/Makefile
- src/test/obj_recovery/TEST9 56 additions, 0 deletionssrc/test/obj_recovery/TEST9
- src/test/obj_recovery/obj_recovery.c 30 additions, 3 deletionssrc/test/obj_recovery/obj_recovery.c
src/test/obj_recovery/TEST9
0 → 100755
Please register or sign in to comment