Depends on D3532
In CreateNewBackupReactor when an error occurs before the putReactor is created, there is a crash, because we try to use the putReactor in doneCallback but it's nullptr.
Paths
| Differential D3533 Authored by • karol on Mar 29 2022, 4:39 AM.
Details Summary Depends on D3532 In CreateNewBackupReactor when an error occurs before the putReactor is created, there is a crash, because we try to use the putReactor in doneCallback but it's nullptr. Test Plan cd services yarn run-backup-service
Diff Detail
Event TimelineHerald added subscribers: • abosh, • benschac, atul and 3 others. · View Herald TranscriptMar 29 2022, 4:39 AM2022-03-29 04:39:34 (UTC-7) • karol edited the summary of this revision. (Show Details)Mar 29 2022, 4:51 AM2022-03-29 04:51:18 (UTC-7) Harbormaster completed remote builds in B7670: Diff 10766.Mar 29 2022, 4:55 AM2022-03-29 04:55:26 (UTC-7) This revision now requires changes to proceed.Apr 1 2022, 4:22 AM2022-04-01 04:22:47 (UTC-7) Harbormaster failed remote builds in B7817: Diff 10984!Apr 4 2022, 3:25 AM2022-04-04 03:25:14 (UTC-7) Comment Actions
What do you mean? Comment Actions
In the summary you mentioned that
Which means that the code crashes because we call doneCallback in CreateNewBackupReactor after an error. I was asking if it makes sense to completely avoid calling doneCallback in that case instead of adding early return to it. Do you think it makes sense? Which solution do you prefer? This revision now requires changes to proceed.Apr 5 2022, 9:26 AM2022-04-05 09:26:52 (UTC-7) Comment Actions This is against the whole idea behind the doneCallback - it should be called regardless of whether an error has been thrown or not. In this callback, we can access this->status and see if there was an error or not. Comment Actions
Ok, that makes sense! Thanks for explaining it
This revision is now accepted and ready to land.Apr 6 2022, 6:46 AM2022-04-06 06:46:29 (UTC-7)
Harbormaster completed remote builds in B7948: Diff 11137.Apr 7 2022, 1:26 AM2022-04-07 01:26:37 (UTC-7) Harbormaster completed remote builds in B7950: Diff 11139.Apr 7 2022, 1:41 AM2022-04-07 01:41:20 (UTC-7) Closed by commit rCOMM0cc54d3232c5: [services] Backup - Fix premature errors crash (authored by • karol). · Explain WhyApr 7 2022, 2:43 AM2022-04-07 02:43:30 (UTC-7) This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 10984 services/backup/docker-server/contents/server/src/Reactors/server/CreateNewBackupReactor.h
|