You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Csaba Ringhofer (JIRA)" <ji...@apache.org> on 2017/11/21 19:03:00 UTC

[jira] [Resolved] (IMPALA-5624) ProcessStateInfo::ReadProcFileDescriptorInfo() should not fork a process

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

Csaba Ringhofer resolved IMPALA-5624.
-------------------------------------
       Resolution: Done
    Fix Version/s: Impala 2.11.0

IMPALA-5624: Replace "ls -l" with opendir() in ProcessStateInfo

Running shell commands from impalad can be problematic, because using popen() leads
to forking which causes a spike in virtual memory. To avoid this, "ls" is replaced
with POSIX API calls.

FileDescriptorMap fd_desc_ was only used to get the number of file descriptors, so
it was unneccesery work to initialize it. It is removed, and only the number of file
descriptors is computed.

The automatic test for this function is only a sanity check,  because there is no
way to know the "expected value" in advance, and the number of file desciptors can
change anytime.

Change-Id: Ibffae8069a62e100abbfa7d558b49040b095ddc0
Reviewed-on: http://gerrit.cloudera.org:8080/8546
Reviewed-by: Lars Volker <lv...@cloudera.com>
Tested-by: Impala Public Jenkins

> ProcessStateInfo::ReadProcFileDescriptorInfo() should not fork a process
> ------------------------------------------------------------------------
>
>                 Key: IMPALA-5624
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5624
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>    Affects Versions: Impala 2.10.0
>            Reporter: Tim Armstrong
>            Assignee: Csaba Ringhofer
>             Fix For: Impala 2.11.0
>
>
> Forking processes from the Impala daemon after startup is problematic because of the spike in virtual memory it causes (see IMPALA-2294). We should avoid doing this in ProcessStateInfo::ReadProcFileDescriptorInfo(), which is invoked from the web server debug pages.



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