You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Mike Percy (Code Review)" <ge...@cloudera.org> on 2018/10/18 21:24:23 UTC

[kudu-CR] thread: show thread limit info when thread creation fails

Hello Tidy Bot, Kudu Jenkins, Andrew Wong, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/11726

to look at the new patch set (#2).

Change subject: thread: show thread limit info when thread creation fails
......................................................................

thread: show thread limit info when thread creation fails

It seems useful to return the number of outstanding threads and the
ulimit nproc when thread creation fails, to help an administrator
diagnose the cause of the fork()/clone() failure. This patch adds that
info to the error Status returned from Thread::Create().

That necessitated making the ReadThreadsRunning() method of
ThreadManager public.

Tested manually on Linux. Example:

$ ps -efwwwL | grep mpercy | wc -l
2357
$ ulimit -u 2370
$ ./bin/kudu-tserver  --fs-wal-dir $(pwd)/wal --logtostderr
...
F1018 14:16:00.312577 21557 service_pool.cc:93] Check failed: _s.ok() Bad status: Runtime error: Could not create thread (63 Kudu-managed threads running in this process, 2370 max processes allowed for current user): Resource temporarily unavailable (error 11)
*** Check failure stack trace: ***
*** Aborted at 1539897360 (unix time) try "date -d @1539897360" if you are using GNU date ***
PC: @     0x7f503d9d9e97 gsignal
*** SIGABRT (@0x3e800005435) received by PID 21557 (TID 0x7f503cf34900) from PID 21557; stack trace: ***
    @     0x7f5042455890 (unknown)
    @     0x7f503d9d9e97 gsignal
    @     0x7f503d9db801 abort
    @     0x7f504024c309 kudu::AbortFailureFunction()
    @     0x7f503f645d0d google::LogMessage::Fail()
    @     0x7f503f647ce4 google::LogMessage::SendToLog()
    @     0x7f503f64582d google::LogMessage::Flush()
    @     0x7f503f6486b9 google::LogMessageFatal::~LogMessageFatal()
    @     0x7f504172688e kudu::rpc::ServicePool::Init()
    @     0x7f50456b3eed kudu::RpcServer::RegisterService()
    @     0x7f50456bfc59 kudu::server::ServerBase::RegisterService()
    @     0x7f50459004ac kudu::tserver::TabletServer::Start()
    @           0x40683e kudu::tserver::TabletServerMain()
    @           0x4060a2 main
    @     0x7f503d9bcb97 __libc_start_main
    @           0x405fba _start
Aborted (core dumped)

Change-Id: I8e0bd0d0776142e8feff18bffe15e61ca1ba5816
---
M src/kudu/util/thread.cc
1 file changed, 15 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/26/11726/2
-- 
To view, visit http://gerrit.cloudera.org:8080/11726
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8e0bd0d0776142e8feff18bffe15e61ca1ba5816
Gerrit-Change-Number: 11726
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Percy <mp...@apache.org>
Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Tidy Bot (241)