Commit fdf5a70
Address heap use after free issue in Dcp BackfillManager
21:23:11 WARNING: ThreadSanitizer: heap-use-after-free (pid=8561)
21:23:11 Read of size 8 at 0x7d240000d6a8 by thread T15:
21:23:11 #0 BackfillManager::backfill() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/backfill-manager.cc:250 (ep.so+0x00000004f35a)
21:23:11 couchbase#1 BackfillManagerTask::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/backfill-manager.cc:43 (ep.so+0x00000004ee6f)
21:23:11 couchbase#2 ExecutorThread::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:115 (ep.so+0x0000000f1736)
21:23:11 couchbase#3 launch_executor_thread(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:33 (ep.so+0x0000000f12e5)
21:23:11 couchbase#4 platform_thread_wrap(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/platform/src/cb_pthreads.cc:54 (libplatform.so.0.1.0+0x00000000551b)
21:23:11
21:23:11 Previous write of size 8 at 0x7d240000d6a8 by thread T15:
21:23:11 #0 operator delete(void*) <null> (engine_testapp+0x00000046485b)
21:23:11 couchbase#1 DcpProducer::~DcpProducer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/producer.cc:167 (ep.so+0x00000006377b)
21:23:11 couchbase#2 DcpProducer::~DcpProducer() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/producer.cc:165 (ep.so+0x000000063a45)
21:23:11 couchbase#3 ActiveStream::~ActiveStream() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:272 (ep.so+0x00000006ed6d)
21:23:11 couchbase#4 ActiveStream::~ActiveStream() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/stream.cc:200 (ep.so+0x00000006f8b5)
21:23:11 couchbase#5 BackfillManager::backfill() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/atomic.h:272 (ep.so+0x00000004f345)
21:23:11 #6 BackfillManagerTask::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/dcp/backfill-manager.cc:43 (ep.so+0x00000004ee6f)
21:23:11 #7 ExecutorThread::run() /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:115 (ep.so+0x0000000f1736)
21:23:11 #8 launch_executor_thread(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/ep-engine/src/executorthread.cc:33 (ep.so+0x0000000f12e5)
21:23:11 #9 platform_thread_wrap(void*) /home/couchbase/jenkins/workspace/ep-engine-threadsanitizer-master/platform/src/cb_pthreads.cc:54 (libplatform.so.0.1.0+0x00000000551b)
Change-Id: I3c63215791c23de49b5304654115fd4c558a3328
Reviewed-on: http://review.couchbase.org/58619
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>1 parent 1d92be0 commit fdf5a70
7 files changed
Lines changed: 49 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1214 | 1214 | | |
1215 | 1215 | | |
1216 | 1216 | | |
1217 | | - | |
| 1217 | + | |
1218 | 1218 | | |
1219 | 1219 | | |
1220 | 1220 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | | - | |
32 | | - | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | 91 | | |
96 | 92 | | |
97 | 93 | | |
| |||
116 | 112 | | |
117 | 113 | | |
118 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
119 | 124 | | |
120 | 125 | | |
121 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | | - | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
655 | 672 | | |
656 | 673 | | |
657 | 674 | | |
| |||
671 | 688 | | |
672 | 689 | | |
673 | 690 | | |
674 | | - | |
675 | | - | |
676 | | - | |
| 691 | + | |
677 | 692 | | |
678 | 693 | | |
679 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
233 | | - | |
| 234 | + | |
234 | 235 | | |
235 | 236 | | |
236 | 237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
743 | | - | |
| 743 | + | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
804 | | - | |
805 | | - | |
| 804 | + | |
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
| |||
0 commit comments