You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2017/08/08 23:54:00 UTC

[jira] [Resolved] (IMPALA-5575) BufferPoolTest ConcurrentRegistration is racy

     [ https://issues.apache.org/jira/browse/IMPALA-5575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Armstrong resolved IMPALA-5575.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: Impala 2.10.0


Change subject: IMPALA-5031: unsafe random number generation in buffer-pool-test
......................................................................

IMPALA-5031: unsafe random number generation in buffer-pool-test

The bug is that ConcurrentRegistration shares one random number
generator between all the threads. This isn't safe and UBSAN was
unhappy with it.

The fix is to create one RNG per thread. We already do that in a
different test so the code is factored out into a utility function.

Change-Id: I0eb3bec152a58d9ec39413780cb2c431dd8d4fa8
---
M be/src/runtime/bufferpool/buffer-pool-test.cc
M be/src/testutil/rand-util.h
2 files changed, 21 insertions(+), 10 deletions(-)

> BufferPoolTest ConcurrentRegistration is racy
> ---------------------------------------------
>
>                 Key: IMPALA-5575
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5575
>             Project: IMPALA
>          Issue Type: Sub-task
>          Components: Backend
>    Affects Versions: Impala 2.9.0
>            Reporter: Jim Apple
>            Assignee: Tim Armstrong
>             Fix For: Impala 2.10.0
>
>
> {{BufferPoolTest}}'s {{ConcurrentRegistration}} makes a {{thread_group}} and registers threads calling {{RegisterQueriesAndClients}}, which uses {{this->rng_()}}, which is not thread safe. The result can include out-of-bound memory access internal to the generator.
> Found with UBSan.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)