You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Michael Smith (Jira)" <ji...@apache.org> on 2026/08/13 17:33:00 UTC

[jira] [Commented] (IMPALA-15258) Query can hang in BufferPool::Client::CleanPages

    [ https://issues.apache.org/jira/browse/IMPALA-15258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18104586#comment-18104586 ] 

Michael Smith commented on IMPALA-15258:
----------------------------------------

Full stack trace of stuck thread
{code:java}
TID 900328 (exec-finstance (finst:c440df1ea0439a39:4440053500000016)):
    @     0x70c7bca42520  (unknown)
    @     0x70c7bca910d5  (unknown)
    @     0x70c7bca93a01  pthread_cond_wait
    @          0x2b67339  impala::BufferPool::Client::CleanPages()
    @          0x2b6834b  impala::BufferPool::Client::TransferReservationTo()
    @          0x2b68405  impala::BufferPool::ClientHandle::TransferReservationTo()
    @          0x3c06404  impala::InitialReservations::Return()
    @          0x3c6e62a  impala::ReservationManager::Close()
    @          0x2eb5491  impala::GroupingAggregator::Close()
    @          0x2dc3f50  impala::AggregationNode::Close()
    @          0x2e795b9  impala::ExecNode::Close()
    @          0x3bfc35c  impala::FragmentInstanceState::ExecInternal()
    @          0x3bfe0f3  impala::FragmentInstanceState::Exec()
    @          0x3c528db  impala::QueryState::ExecFInstance()
    @          0x45428a6  impala::Thread::SuperviseThread()
    @          0x46cd727  thread_proxy {code}

> Query can hang in BufferPool::Client::CleanPages
> ------------------------------------------------
>
>                 Key: IMPALA-15258
>                 URL: https://issues.apache.org/jira/browse/IMPALA-15258
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 4.5.0
>            Reporter: Michael Smith
>            Assignee: Michael Smith
>            Priority: Major
>
> With plans produced with CTEs by IMPALA-13533, I've observed the query hanging during BufferPool CleanPages. Stack traces showed a thread waiting on [https://github.com/apache/impala/blob/master/be/src/runtime/bufferpool/buffer-pool.cc#L713.|https://github.com/apache/impala/blob/master/be/src/runtime/bufferpool/buffer-pool.cc#L713]
> Further logging showed a scenario where {{target_dirty_bytes}} is negative:
> {code:java}
> I20260812 22:48:09.199885 141206 buffer-pool.cc:679] 254fc219ed384ebf:227b64f700000010] target_dirty_bytes=-1048576 reservation=17825792 buffers_allocated_bytes_=1048576 pinned_pages_.bytes()=0 len=17825792 {code}
> I noticed that {{buffers_allocated_bytes_}} is usually guarded by {{{}lock_{}}}, but in [DestroyPageInternal|https://github.com/apache/impala/blob/master/be/src/runtime/bufferpool/buffer-pool.cc#L493] it's not. Moving that update into the lock seems to fix the hang.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org