mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrei Budnik <abud...@mesosphere.com>
Subject Review Request 71136: Fixed use-after-free bug in `PendingFutureTrackerProcess`.
Date Mon, 22 Jul 2019 15:51:59 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/71136/
-----------------------------------------------------------

Review request for mesos, Benjamin Mahler, Gilbert Song, Meng Zhu, and Qian Zhang.


Repository: mesos


Description
-------

Previously, the future tracker subscribed on `onAny`, `onAbandoned`,
`onDiscard` events for the future using callbacks, which accept
the same iterator to the `pending` list. Since above mentioned events
can overlap, the same callback can be called more than once, which
leads to accessing invalidated iterator. This patch fixes the problem
by introducing `erased` flag.


Diffs
-----

  src/common/future_tracker.hpp a3f191a58b7ada58153ca33a8d0409b846faedae 


Diff: https://reviews.apache.org/r/71136/diff/1/


Testing
-------

I was able to reproduce a segfault observed in our CI by launching `ROOT_LaunchGroupFailure`
test in the loop with `stress` running in parallel:
```
sudo src/mesos-tests --verbose --gtest_repeat=100 --break_on_failure --gtest_filter=ROOT_DOCKER_DockerAndMesosContainerizers/DefaultExecutorTest.ROOT_LaunchGroupFailure/0

stress -c 16
```
After applying the patch, the test passed successfully.


Thanks,

Andrei Budnik


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message