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 "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/04/30 16:38:00 UTC

[jira] [Commented] (IMPALA-6882) Inline assembly instructions hoisted out of if(CpuInfo::IsSupported()) checks

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

Tim Armstrong commented on IMPALA-6882:
---------------------------------------

Switching to using volatile on the inline assembly as below seems to inhibit reordering. 
{code}
   __asm__ __volatile__("popcntq %1, %0" : "=r"(result) : "mr"(a) : "cc");
{code}

GCC docs are a bit vague about what __volatile__ guarantees, since it allows some code reordering, but I'm pretty sure that it must guarantee that code reordering does not change the number of times that the ASM executes (since it treats the asm block as if it has side-effects).

> Inline assembly instructions hoisted out of if(CpuInfo::IsSupported()) checks
> -----------------------------------------------------------------------------
>
>                 Key: IMPALA-6882
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6882
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Backend
>         Environment: Impala 2.11 (CDH 5.14.2 variant)
> Centos 6.9 kernel:
> 2.6.32-696.23.1.el6.x86_64
> 2.6.32-696.16.1.el6.x86_64
> 2.6.32-696.13.2.el6.x86_64
> 2.6.32-642.15.1.el6.x86_64
> 2.6.32-642.11.1.el6.x86_64
> JDK:
> jdk.1.8.0_144
> jdk.1.8.0_121
>            Reporter: Tim Armstrong
>            Assignee: Tim Armstrong
>            Priority: Blocker
>              Labels: crash
>         Attachments: Tim Armstrong.url, hs_err_pid13065.log
>
>
> See http://community.cloudera.com/t5/Interactive-Short-cycle-SQL/After-upgrading-to-cdh-5-14-2-Impala-daemon-stopped-suddenly/m-p/66501#M4368?eid=1&aid=1
> {noformat}
> #
> # A fatal error has been detected by the Java Runtime Environment:
> #
> #  SIGILL (0x4) at pc=0x0000000000d863e5, pid=13065, tid=0x00007efc499cf700
> #
> # JRE version: Java(TM) SE Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01)
> # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.144-b01 mixed mode linux-amd64 compressed oops)
> # Problematic frame:
> # C  [impalad+0x9863e5]  impala::HdfsScanNodeBase::StopAndFinalizeCounters()+0x965
> #
> # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
> #
> # An error report file with more information is saved as:
> # /var/run/cloudera-scm-agent/process/13339-impala-IMPALAD/hs_err_pid13065.log
> #
> # If you would like to submit a bug report, please visit:
> #   http://bugreport.java.com/bugreport/crash.jsp
> # The crash happened outside the Java Virtual Machine in native code.
> # See problematic frame for where to report the bug.
> #
> {noformat}
> CPU Info:
> {noformat}
> 0417 20:54:12.845438 13375 init.cc:230] Cpu Info:
>   Model: Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
>   Cores: 8
>   Max Possible Cores: 8
>   L1 Cache: 32.00 KB (Line: 64.00 B)
>   L2 Cache: 6.00 MB (Line: 64.00 B)
>   L3 Cache: 0 (Line: 0)
>   Hardware Supports:
>     ssse3
>     sse4_1
>   Numa Nodes: 1
>   Numa Nodes of Cores: 0->0 | 1->0 | 2->0 | 3->0 | 4->0 | 5->0 | 6->0 | 7->0 |
> {noformat}
> User reports that it worked on 2.9+patches but crashes on 2.11+patches
> One angle I looked into was whether the wrong Popcount() code path was somehow taken. It doesn't look like any of that code has changed in a while.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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