stonar96 / RayTraceAntiXray

Paper plugin for server-side async multithreaded ray tracing to hide ores that are exposed to air using Paper Anti-Xray engine-mode 1.
MIT License
128 stars 26 forks source link

Random Crashes #13

Closed Codzsters closed 10 months ago

Codzsters commented 1 year ago

Hi there!

I seem to be getting spontaneous crashes when RayTraceAntiXray is installed..

I've removed the plugin from the server, and the issue went away. However, not that I've added it back, the server spontaneously crashes every so often, with console having no errors leading up to the crash.

These crashes generally happen with 25+ players online, but sometimes it'll happen with as little as 10 players.

Here is my config settings (I've recently changed from 4 threads to 2 to see if this will help)

# This is an example configuration. Lines starting with # are comments and are ignored.
# 
# settings:
#   anti-xray:
#     update-ticks: 1                           # Time period in Minecraft ticks for sending block updates.
#     ms-per-ray-trace-tick: 50                 # Target time per ray trace tick in milliseconds.
#     ray-trace-threads: 2                      # Number of threads that are used for ray tracing.
# world-settings:
#   default:                                    # All worlds inherit settings from the default section.
#     anti-xray:
#       ray-trace: true                         # Whether or not to enable ray tracing. Note that Paper Anti-Xray must also be enabled using engine-mode: 1.
#       ray-trace-third-person: true            # Whether or not to ray trace third person back and front view. Note that this is even more resource intensive.
#       ray-trace-distance: 64.0                # Maximum distance between player (eye location) and block (center) for ray tracing.
#       max-ray-trace-block-count-per-chunk: 30 # Maximum number of ray traced blocks per chunk. Counting starts at the bottom of the world and increases upwards.
#       rehide-blocks: true                     # Whether or not to rehide blocks when they were visible to a player but are no longer visible. If false, blocks are only rehidden when the chunk is resent.
#       ray-trace-blocks:                       # Blocks that are hidden and ray traced. The hidden-blocks specified in the Paper config file are only hidden if they aren't exposed to transparent blocks. If this list is empty, the hidden-blocks specified in the Paper config file are used.
#       - diamond_ore
#       - deepslate_diamond_ore
#       - emerald_ore
#       - deepslate_emerald_ore
#   lobby:                                      # Example section for the world lobby. Missing settings are inherited from the default section.
#     anti-xray:
#       ray-trace: false                        # Disable ray tracing in the world lobby.

settings:
  anti-xray:
    update-ticks: 1
    ms-per-ray-trace-tick: 50
    # Adjust to available (ideally unused) CPU threads.
    ray-trace-threads: 2
world-settings:
  default:
    anti-xray:
      ray-trace: true
      # Be aware that this is about three times as resource intensive.
      ray-trace-third-person: true
      ray-trace-distance: 80.0
      max-ray-trace-block-count-per-chunk: 60
      rehide-blocks: true
      ray-trace-blocks:
      # You can add further blocks here,
      # but the max-ray-trace-block-count-per-chunk setting may need to be adjusted.
      - chest
      - diamond_ore
      - deepslate_diamond_ore
      - emerald_ore
      - deepslate_emerald_ore
      - gold_ore
      - deepslate_gold_ore
      - lapis_ore
      - deepslate_lapis_ore
      - mossy_cobblestone
      - spawner
  # Adjust world name.
  world_nether:
    anti-xray:
      # Note that ancient_debris never generates naturally exposed to air.
      # Normal engine-mode: 1 is sufficient, disable ray tracing in the nether.
      ray-trace: false
  # Adjust world name.
  world_the_end:
    anti-xray:
      ray-trace: false

This is the only message I get:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f3a18a6a962, pid=529502, tid=529578
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.7+7 (17.0.7+7) (build 17.0.7+7)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.7+7 (17.0.7+7, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0xe06962]  Symbol::as_klass_external_name() const+0x12
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/amp/.ampdata/instances/MinevaneSurvival01/Minecraft/core.529502)
#
# An error report file with more information is saved as:
# /home/amp/.ampdata/instances/MinevaneSurvival01/Minecraft/hs_err_pid529502.log
#
# If you would like to submit a bug report, please visit:
#   https://github.com/adoptium/adoptium-support/issues

hs_err_pid529502.log

Here's the heap dump if this is of any use.

Thanks in advance!

stonar96 commented 1 year ago

Hi, this looks like a JVM bug. I've currently no idea what could cause this and there are hardly any similar crash logs that I find online. Here's one I've found but there's also no resolution: https://github.com/BenCodez/VotingPlugin/issues/653

Interestingly, your crash log doesn't show anything related to RayTraceAntiXray. The only thing I can suggest right now is trying to reinstall Java and update if you're not already on latest.

Could you please add the server log file anyway (even though there are no errors)? Or can you at least tell me the server version/build and the RayTraceAntiXray version?

I'll keep this issue open for at least a while, although I don't think it's an issue in RayTraceAntiXray. Maybe someone else can reproduce this too.

Codzsters commented 1 year ago

Hi, this looks like a JVM bug. I've currently no idea what could cause this and there are hardly any similar crash logs that I find online. Here's one I've found but there's also no resolution: BenCodez/VotingPlugin#653

Interestingly, your crash log doesn't show anything related to RayTraceAntiXray. The only thing I can suggest right now is trying to reinstall Java and update if you're not already on latest.

Could you please add the server log file anyway (even though there are no errors)? Or can you at least tell me the server version/build and the RayTraceAntiXray version?

I'll keep this issue open for at least a while, although I don't think it's an issue in RayTraceAntiXray. Maybe someone else can reproduce this too.

Hi, yeah - I'm a bit confused. Just odd how the issue completely goes away when I uninstall RTAA. (I only figured this out as we didn't have the plugin installed until a few days ago as I wasn't aware that it was updated to 1.20)

We're using the latest release of RTAA on Purpur 1.20.1 (latest build as of writing this as well, 1996). However, this was also happening for us in 1.19.4.

I'd prefer not to share the server logs here as it would expose IP addresses of players and other sensitive data.

I'll give reinstalling Java a go as well.

Thanks for your help. I appreciate it

stonar96 commented 10 months ago

Since this looks like a JVM bug and it seems to be not reproducible (or maybe it's not even related to RayTraceAntiXray), I will close this issue now.