Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhaseAggressiveCoalesce SIGSEGV #1529

Closed
devinrsmith opened this issue Nov 4, 2021 · 8 comments · Fixed by #1985
Closed

PhaseAggressiveCoalesce SIGSEGV #1529

devinrsmith opened this issue Nov 4, 2021 · 8 comments · Fixed by #1985
Assignees
Labels
bug Something isn't working java test
Milestone

Comments

@devinrsmith
Copy link
Member

We've run into DB:test triggering SIGSEGV twice now in the same relative spot, on two different JDK 17 JVMs.

2021-10-30T06:24:33.1443208Z > Task :DB:test
2021-10-30T06:35:03.7824211Z #
2021-10-30T06:35:03.7924936Z # A fatal error has been detected by the Java Runtime Environment:
2021-10-30T06:35:03.8004601Z #
2021-10-30T06:35:03.8100735Z #  SIGSEGV (0xb) at pc=0x00007f641e67d27c, pid=9248, tid=9262
2021-10-30T06:35:03.8180524Z #
2021-10-30T06:35:03.8626465Z # JRE version: OpenJDK Runtime Environment Zulu17.28+13-CA (17.0+35) (build 17+35-LTS)
2021-10-30T06:35:03.8649483Z # Java VM: OpenJDK 64-Bit Server VM Zulu17.28+13-CA (17+35-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
2021-10-30T06:35:03.8659672Z # Problematic frame:
2021-10-30T06:35:03.8781830Z # V  [libjvm.so+0x5a327c]  PhaseAggressiveCoalesce::coalesce(Block*)+0x5bc
2021-10-30T06:35:03.8813477Z #
2021-10-30T06:35:03.8929788Z # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/runner/work/deephaven-core/core.9248)
2021-10-30T06:35:03.8949855Z #
2021-10-30T06:35:04.0609087Z # An error report file with more information is saved as:
2021-10-30T06:35:04.0635799Z # /home/runner/work/deephaven-core/hs_err_pid9248.log
2021-10-30T06:35:04.0664505Z #
2021-10-30T06:35:04.0712513Z # Compiler replay data is saved as:
2021-10-30T06:35:04.0759258Z # /home/runner/work/deephaven-core/replay_pid9248.log
2021-10-30T06:35:04.0821478Z #
2021-10-30T06:35:04.0898339Z # If you would like to submit a bug report, please visit:
2021-10-30T06:35:04.1025821Z #   http://www.azul.com/support/
2021-10-30T06:35:04.1072909Z #

and

2021-11-04T06:21:38.1020387Z > Task :DB:test
2021-11-04T06:32:54.1827737Z #
2021-11-04T06:32:54.1843776Z # A fatal error has been detected by the Java Runtime Environment:
2021-11-04T06:32:54.1851434Z #
2021-11-04T06:32:54.1862188Z #  SIGSEGV (0xb) at pc=0x00007f2dd7200dbc, pid=9554, tid=9568
2021-11-04T06:32:54.1869803Z #
2021-11-04T06:32:54.2121001Z # JRE version: OpenJDK Runtime Environment Temurin-17.0.1+12 (17.0.1+12) (build 17.0.1+12)
2021-11-04T06:32:54.2133835Z # Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (17.0.1+12, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
2021-11-04T06:32:54.2142508Z # Problematic frame:
2021-11-04T06:32:54.2178345Z # V  [libjvm.so+0x5a2dbc]  PhaseAggressiveCoalesce::coalesce(Block*)+0x5bc
2021-11-04T06:32:54.2189617Z #
2021-11-04T06:32:54.2200460Z # Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /home/runner/work/deephaven-core/core.9554)
2021-11-04T06:32:54.2208082Z #
2021-11-04T06:32:54.2220071Z # An error report file with more information is saved as:
2021-11-04T06:32:54.2229771Z # /home/runner/work/deephaven-core/hs_err_pid9554.log
2021-11-04T06:32:54.2239442Z #
2021-11-04T06:32:54.2247048Z # Compiler replay data is saved as:
2021-11-04T06:32:54.2258419Z # /home/runner/work/deephaven-core/replay_pid9554.log
2021-11-04T06:32:54.2268199Z #
2021-11-04T06:32:54.2276148Z # If you would like to submit a bug report, please visit:
2021-11-04T06:32:54.2291548Z #   https://github.com/adoptium/adoptium-support/issues
2021-11-04T06:32:54.2299594Z #

Unfortunately, we have been unable to grab the JVM err logs thus far - hopefully once #1528 we'll be able to capture the logs successfully.

@devinrsmith devinrsmith added bug Something isn't working test java labels Nov 4, 2021
@devinrsmith devinrsmith added this to the Backlog milestone Nov 4, 2021
@devinrsmith devinrsmith self-assigned this Nov 4, 2021
@devinrsmith
Copy link
Member Author

@devinrsmith
Copy link
Member Author

Current CompileTask:
C2:  56727 16343       4       io.deephaven.db.v2.by.ssmpercentile.DoublePercentileTypeMedianHelper::setResult (228 bytes)

@devinrsmith
Copy link
Member Author

hs_err_pid9228.log
replay_pid9228.log

Current CompileTask:
C2:  70711 17552 %     4       io.deephaven.db.v2.by.ssmpercentile.SsmChunkedPercentileOperator::addChunk @ 150 (328 bytes)

@devinrsmith
Copy link
Member Author

Disabled JaCoCo to remove -javaagent; still happening:

hs_err_pid9512.log
replay_pid9512.log

hs_err_pid2501.log
replay_pid2501.log

@devinrsmith
Copy link
Member Author

Another instance:

Current CompileTask:
C2: 379894 23743       4       io.deephaven.engine.table.impl.ssa.NullAwareCharSsaSsaStamp::processEntry (458 bytes)

Stack: [0x00007f41400a4000,0x00007f41401a5000],  sp=0x00007f41401a03f0,  free space=1008k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x6248bc]  PhaseAggressiveCoalesce::coalesce(Block*)+0x50c
V  [libjvm.so+0x624912]  PhaseCoalesce::coalesce_driver()+0x42
V  [libjvm.so+0x5ac6f0]  PhaseChaitin::Register_Allocate()+0x230
V  [libjvm.so+0x66b75a]  Compile::Code_Gen()+0x28a
V  [libjvm.so+0x66eefb]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xd4b
V  [libjvm.so+0x587184]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0xd4
V  [libjvm.so+0x679364]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x474
V  [libjvm.so+0x67ac68]  CompileBroker::compiler_thread_loop()+0x5a8
V  [libjvm.so+0xed38fa]  JavaThread::thread_main_inner()+0x1ba
V  [libjvm.so+0xed051f]  Thread::call_run()+0x14f
V  [libjvm.so+0xc7043e]  thread_native_entry(Thread*)+0xee

@devinrsmith
Copy link
Member Author

Note: we've also seen this on the latest JDK 11 (qualitatively, less frequently, but hard to tell).

@niloc132
Copy link
Member

niloc132 commented Feb 8, 2022

Known failing methods:

io.deephaven.db.v2.by.ssmpercentile.DoublePercentileTypeMedianHelper::setResult
io.deephaven.db.v2.by.ssmpercentile.SsmChunkedPercentileOperator::addChunk
io.deephaven.db.v2.by.IncrementalChunkedByAggregationStateManager::buildTable
io.deephaven.db.v2.by.IncrementalChunkedOperatorAggregationStateManager::buildTable
io.deephaven.db.v2.RightIncrementalChunkedCrossJoinStateManager::addToIndex
io.deephaven.db.v2.IncrementalChunkedNaturalJoinStateManager::buildTable
io.deephaven.db.v2.IncrementalChunkedNaturalJoinStateManager::decorationProbe
io.deephaven.db.v2.IncrementalChunkedOperatorAggregationStateManager::buildTable

@rcaudy's research indicates that only C2 (aka tier 4) fails on these methods as far as we can tell. It is easier to reproduce this issue locally by passing -XX:Tier4CompileThreshold=1000 to the JVM. This jit compilation can be disabled by creating a compiler directives file like

[
    {
        match: ["io.deephaven.engine.table.impl.by.ssmpercentile.DoublePercentileTypeMedianHelper::setResult"],
        c2: {
            Exclude:true,
        },
    },
]

and passing it to java with a jvm arg like -XX:CompilerDirectivesFile=/path/to/c2-excludes.txt.

@rcaudy
Copy link
Member

rcaudy commented Feb 8, 2022

Note that the above packages are no longer correct.

@niloc132 niloc132 assigned niloc132 and unassigned devinrsmith Feb 15, 2022
@niloc132 niloc132 modified the milestones: Jan 2022, Feb 2022 Feb 15, 2022
niloc132 added a commit that referenced this issue Feb 18, 2022
This commit excludes 60+ methods from hotspot's Tier 4 (aka C2) JIT
compilation. Each of these has been found crash the certain JVM
implementations (across vendors, across OSes, and across hardware
archetectures) when it compiles this code, but not consistently. By
excluding only C2 in this way, we allow C1 (aka Tier 1-3) to still run,
and get better performance than interpreted bytecode.

All existing ways to run code should be affected by this - running
main()s or tests through either gradle or IntelliJ, and running our
shell scripts to launch the server will all end up with a compiler
directives file to disable c2 for these methods. Using the engine as a
library is not fixed in this way, but this is a problem that can only be
solved through documentation, to inform users that they should make sure
to start the JVM with a specific set of flags.

An extra array of "devJvmArgs" is left in the io.deephaven.java-conventions
plugin to make it easier to add more flags later for this kind of
problem - it will automatically be included for all of the above categories.

Fixes #1529
mofojed pushed a commit that referenced this issue Nov 21, 2023
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.55.0

# [0.55.0](deephaven/web-client-ui@v0.54.0...v0.55.0) (2023-11-20)


### Bug Fixes

* Changes for Deephaven UI embedding widget plugins ([#1644](deephaven/web-client-ui#1644)) ([b6eeb30](deephaven/web-client-ui@b6eeb30))
* Fixed chart e2e test changing daily ([#1652](deephaven/web-client-ui#1652)) ([f9f62db](deephaven/web-client-ui@f9f62db)), closes [#1634](deephaven/web-client-ui#1634)
* Isolate Styleguide snapshots ([#1649](deephaven/web-client-ui#1649)) ([a2ef056](deephaven/web-client-ui@a2ef056))


### Features

* forward and back buttons for organize column search ([#1620](deephaven/web-client-ui#1620)) ([75cf184](deephaven/web-client-ui@75cf184)), closes [#1529](deephaven/web-client-ui#1529)
* Styleguide regression tests ([#1639](deephaven/web-client-ui#1639)) ([561ff22](deephaven/web-client-ui@561ff22)), closes [#1634](deephaven/web-client-ui#1634)


### Reverts

* feat: forward and back buttons for organize column search ([#1640](deephaven/web-client-ui#1640)) ([737d1aa](deephaven/web-client-ui@737d1aa))

Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com>
mofojed pushed a commit that referenced this issue Dec 11, 2023
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.56.0

# [0.56.0](deephaven/web-client-ui@v0.55.0...v0.56.0) (2023-12-11)


### Bug Fixes

* add right margin to <Button kind='inline'/> using icons ([#1664](deephaven/web-client-ui#1664)) ([fd8a6c6](deephaven/web-client-ui@fd8a6c6))
* adjust filter bar colour ([#1666](deephaven/web-client-ui#1666)) ([4c0200e](deephaven/web-client-ui@4c0200e))
* convert organize columns component to purecomponent ([#1653](deephaven/web-client-ui#1653)) ([8ddc114](deephaven/web-client-ui@8ddc114)), closes [#1650](deephaven/web-client-ui#1650)
* Default to `Skip` operation instead of `Sum` operation ([#1648](deephaven/web-client-ui#1648)) ([6083173](deephaven/web-client-ui@6083173)), closes [#1355](deephaven/web-client-ui#1355) [#1355](deephaven/web-client-ui#1355)
* Fix button snapshots ([#1655](deephaven/web-client-ui#1655)) ([c0cc966](deephaven/web-client-ui@c0cc966))
* popper blur in styleguide ([#1672](deephaven/web-client-ui#1672)) ([6fa2204](deephaven/web-client-ui@6fa2204))
* Unable to delete selected rows in some input tables ([#1678](deephaven/web-client-ui#1678)) ([1e71550](deephaven/web-client-ui@1e71550)), closes [#1677](deephaven/web-client-ui#1677)


### Features

* Add embed-widget ([#1668](deephaven/web-client-ui#1668)) ([1b06675](deephaven/web-client-ui@1b06675)), closes [#1629](deephaven/web-client-ui#1629)
* forward and back button for organize column search ([#1641](deephaven/web-client-ui#1641)) ([89f2be5](deephaven/web-client-ui@89f2be5)), closes [#1529](deephaven/web-client-ui#1529)
* Tables that have names starting with underscore do not auto-launch from console ([#1656](deephaven/web-client-ui#1656)) ([21131fe](deephaven/web-client-ui@21131fe)), closes [#1549](deephaven/web-client-ui#1549) [#1410](deephaven/web-client-ui#1410)
* theme fontawesome icon size wrapped in spectrum icons ([#1658](deephaven/web-client-ui#1658)) ([2aa8cef](deephaven/web-client-ui@2aa8cef))
* Theme Selector ([#1661](deephaven/web-client-ui#1661)) ([5e2be64](deephaven/web-client-ui@5e2be64)), closes [#1660](deephaven/web-client-ui#1660)
* Theming - Bootstrap ([#1603](deephaven/web-client-ui#1603)) ([88bcae0](deephaven/web-client-ui@88bcae0))
* Theming - Inline svgs ([#1651](deephaven/web-client-ui#1651)) ([1e40d3e](deephaven/web-client-ui@1e40d3e))
* View cell contents in context menu ([#1657](deephaven/web-client-ui#1657)) ([90b7517](deephaven/web-client-ui@90b7517)), closes [#1605](deephaven/web-client-ui#1605)


### BREAKING CHANGES

* Bootstrap color variables are now predominantly hsl based. SCSS will need to be updated accordingly. Theme providers are needed to load themes.
* Tables assigned to variable beginning with "_" will not open automatically even if "Auto Launch Panels" is checked.

Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working java test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants