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

Multiverse Incompatibility - server crash #2149

Closed
haroldrc opened this issue Jun 3, 2023 · 32 comments · Fixed by #2150
Closed

Multiverse Incompatibility - server crash #2149

haroldrc opened this issue Jun 3, 2023 · 32 comments · Fixed by #2150
Assignees
Labels

Comments

@haroldrc
Copy link

haroldrc commented Jun 3, 2023

Expected behavior

world creation without server crash

Observed/Actual behavior

https://pastebin.com/upGNc52g

Steps/models to reproduce

the server always crashes after i do the /boxed command.

steps to reproduce it:

start the server
and use the /boxed command
restart the server
use the /boxed command (in this case it will crash the server)

BentoBox version

BentoBox v1.23.3-SNAPSHOT-b2390

Plugin list

No response

Other

No response

@tastybento
Copy link
Member

Try this:

  1. Stop server
  2. Delete all the Boxed worlds (the folders in the main server directory called boxed_world and boxed_world_nether
  3. Make sure your server has a lot of RAM. It needs at least 12GB of free RAM.
  4. Start the server with this command (assumes your server jar is called paper-1.19.4.jar:
    java -Xms12G -Xmx12G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper-1.19.4.jar nogui
  5. Wait for the worlds to create - this will take about 10 minutes. Do not log in. Just wait until it's all done. This is a one-time thing.
  6. After it's done, you can log in and try /boxed command.

If that doesn't work for you, please share the full log from the server (the log is in the logs folder in the server). It may be latest.log. Zip it and drag and drop it here so I can see what happened on your server from start up.

@haroldrc
Copy link
Author

haroldrc commented Jun 5, 2023

keeps crashing

@tastybento
Copy link
Member

Sorry to hear that. If you want to help then share your start up script, machine specs and the full co sole log.

@haroldrc
Copy link
Author

java -Xms14G -Xmx16G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 --add-modules=jdk.incubator.vector -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -XX:G1NewSizePercent=40 -XX:G1MaxNewSizePercent=50 -XX:G1HeapRegionSize=16M -XX:G1ReservePercent=15 -XX:InitiatingHeapOccupancyPercent=20 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar {{SERVER_JARFILE}} nogui

image

@alessiaciotta
Copy link

i have the same issue, but for me the server crashes when several people do the command at the same time.

@tastybento
Copy link
Member

@alessiaciotta can you share your crash log?

@alessiaciotta
Copy link

@tastybento tastybento self-assigned this Jun 19, 2023
@tastybento
Copy link
Member

@alessiaciotta Thanks. The server thinks there is no populator for some reason. Is that the only error in the log? The full log would be useful (you can drag and drop zip files into the reply here). I'll delete it if you want me to after getting it.

Also, can you do /bbox version so I can see what your server and BentoBox setup is?

@alessiaciotta
Copy link

alessiaciotta commented Jun 19, 2023

@tastybento latest.log

[21:08:38 INFO]: In esecuzione su Invalido (PUFFERFISH) Invalido.
[21:08:38 INFO]: Versione BentoBox: 1.24.0-SNAPSHOT-b2394
[21:08:38 INFO]: Database: JSON
[21:08:38 INFO]: Mondi di gioco caricati:
[21:08:38 INFO]: boxed_world (Boxed): Overworld, Nether, End
[21:08:38 INFO]: Addons caricati:
[21:08:38 INFO]: Border 4.1.1-SNAPSHOT-b177 (ENABLED)
[21:08:38 INFO]: Boxed 2.2.0-SNAPSHOT-b217 (ENABLED)
[21:08:38 INFO]: InvSwitcher 1.12.0-SNAPSHOT-b226 (ENABLED)

@tastybento
Copy link
Member

What version of Pufferfish? I've not tried that before.

@alessiaciotta
Copy link

image

@tastybento
Copy link
Member

Hmm, I can't replicate this right now. I made boxes as two players almost at the same time and it worked fine. I don't have all your plugins (ViaVersion, etc) but from a basic load it all works okay with Pufferfish. I'm running on an M1 MacBookPro 16 inch with 16GB of RAM, FWIW.
latest.log

The issue in your log is with the server, but it isn't clear why that occurred. I did get one error with Pufferfish the first time I ran things, but it was not the same as yours and was not fatal.

I'm not sure why there should be an issue right now...

@alessiaciotta
Copy link

alessiaciotta commented Jun 20, 2023

hi @tastybento . we removed multiverse and then replicated the problem, and the server didnt crash.
so we tried with myworlds, we replicated the problem and the server DID crash. at this point it's not an issue related to mv or myworld, it's about worlds management.

@tastybento
Copy link
Member

That makes sense. The main worlds are registered with the multiverse but not the seed worlds so that may be where the issue is.

@alessiaciotta
Copy link

can this be solved in the short term?

@haroldrc
Copy link
Author

can this be solved in the short term?

I hope so

tastybento referenced this issue in BentoBoxWorld/Boxed Jun 21, 2023
Must be used with BentoBox 1.24.0
#52
@tastybento
Copy link
Member

tastybento commented Jun 21, 2023

Okay, I've added world generator registration into Boxed, but it requires the latest version of BentoBox too. You can download both from ci.bentobox.world. I was able to confirm that the additional worlds, like the base and seed world are now correctly registered in Multiverse (or MyWorlds) with BentoBox with their generator. I am not sure if this will fix the server error you guys saw because I have not been able to replicate that (yet) on my machine. Hopefully it will, but let's see. Please try the latest and let me know what happens.
One thing you must do is delete the previous Boxed worlds and ideally the BentoBox database too, i.e., start from scratch. As the worlds did not have the generators associated with them, they will be malformed, so they need deletion. For the database, it's just so you can start a box properly. If you cannot delete the database, use the /boxadmin unregister command to unregister your player(s) before you play and then /box to generate a new box.

@haroldrc
Copy link
Author

image

@alessiaciotta
Copy link

Hi @tastybento I tried with the latest versions and it doesnt crash anymore. But now the world generates a cube in the middle of water, with random structures around.

@tastybento
Copy link
Member

Hmm. Did you delete the old worlds before testing? If you did and this is happening then the generator is still not being correctly associated. I did test this before I committed and it worked. Hmmm.

@alessiaciotta
Copy link

@tastybento Hi, I tried again and the error its not there. it's all fixed!
also, is there a possibility to generate the world randomly every time a user does the command /boxed for the first time, so that the user doesn't always have the same map? if you could add this it could be really great.

@tastybento
Copy link
Member

I’m glad it works. In regards to your request, the magic of Boxed is that each player gets the same box and so the game is fair. That was actually really hard to do and still have a vanilla-like world. Also, the environment has been designed to enable the advancements to be done, so it is not random for that reason.
I would be possible to make it random but then none of the structures would necessarily fit, the advancements may not be possible and some players may end up in the middle of an ocean. So, right now, if you want random vanilla it might be better to use a random teleport plugin for a vanilla world.

@alessiaciotta
Copy link

@tastybento Hey, i'm sad to say that the issue with the boxed generating in the middle of the water is not fixed. Lmk if you need any test done.

@tastybento
Copy link
Member

@alessiaciotta I can't replicate any issue right now. What is your setup and what are the steps to replicate? I just did a clean install and it works great:

> plugins
[12:42:21 INFO]: Server Plugins (5):
[12:42:21 INFO]: Bukkit Plugins:
[12:42:21 INFO]:  - BentoBox, BentoBox-Boxed, Essentials, EssentialsSpawn, Multiverse-Core
> mv list
[12:42:26 INFO]: ====[ Multiverse World List ]====
[12:42:26 INFO]: world - NORMAL
[12:42:26 INFO]: world_the_end - THE_END
[12:42:26 INFO]: boxed_world/seed_base - NORMAL
[12:42:26 INFO]: world_nether - NETHER
[12:42:26 INFO]: boxed_world - NORMAL
[12:42:26 INFO]: boxed_world/seed_nether_base - NETHER
[12:42:26 INFO]: boxed_world/seed_nether - NETHER
[12:42:26 INFO]: boxed_world_nether - NETHER
[12:42:26 INFO]: boxed_world/seed - NORMAL
> bbox v
[12:42:32 INFO]: Running PAPER 1.20.1.
[12:42:32 INFO]: BentoBox version: 1.24.0-SNAPSHOT-LOCAL
[12:42:32 INFO]: Database: JSON
[12:42:32 INFO]: Loaded Game Worlds:
[12:42:32 INFO]: boxed_world (Boxed): Overworld, Nether
[12:42:32 INFO]: Loaded Addons:
[12:42:32 INFO]: Border 4.1.0 (ENABLED)
[12:42:32 INFO]: Boxed 2.2.1-SNAPSHOT-LOCAL (ENABLED)
[12:42:32 INFO]: InvSwitcher 1.12.0-SNAPSHOT-LOCAL (ENABLED)

@alessiaciotta
Copy link

to replicate, you have to:

  • stop the server
  • reset the world and bentobox's database
  • restart the server
  • create the boxed
  • after that, stop and restart the server
  • after the restart, reset with /boxed reset

@tastybento
Copy link
Member

This is very difficult to debug and I've been working for hours on this. I have narrowed it down to the fact that Multiverse does not pick up on the generator for boxed_world properly after a reboot. I don't know why. There is a work around: remove the world from Multiverse before shutting down, then when it restarts it is correctly detected. So this works:

  1. Before shutdown execute this command mv remove boxed_world
  2. When the server restarts, the correct generator is found.

I am trying to work out why the usual registration with Multiverse does not work if Multiverse already knows about the Boxed world. Also, I don't understand why this doesn't affect other game modes, like AcidIsland (yet).

I'll keep looking at it, but it's a stumper.

@tastybento tastybento changed the title server crash Multiverse Incompatibility - server crash Jun 25, 2023
@tastybento
Copy link
Member

I tested with MyWorlds and it works fine, so this seems to be an incompatibility with MultiVerse Core.

@alessiaciotta
Copy link

This is very difficult to debug and I've been working for hours on this. I have narrowed it down to the fact that Multiverse does not pick up on the generator for boxed_world properly after a reboot. I don't know why. There is a work around: remove the world from Multiverse before shutting down, then when it restarts it is correctly detected. So this works:

  1. Before shutdown execute this command mv remove boxed_world
  2. When the server restarts, the correct generator is found.

I am trying to work out why the usual registration with Multiverse does not work if Multiverse already knows about the Boxed world. Also, I don't understand why this doesn't affect other game modes, like AcidIsland (yet).

I'll keep looking at it, but it's a stumper.

by executing mv remove boxed_world the world gets removed in multiverse, but when i restart the server everything returns as before.

@tastybento
Copy link
Member

I'm going to shift this to BentoBox because this MV issue affects all game modes, not just Boxed.
Screenshot 2023-06-26 at 4 11 51 PM

@tastybento tastybento transferred this issue from BentoBoxWorld/Boxed Jun 26, 2023
@tastybento
Copy link
Member

My current plan is to unhook worlds from MV during shutdown so that it can be picked up again by MV on restart.

@haroldrc
Copy link
Author

haroldrc commented Jul 1, 2023

I have another problem: structures are not generated

@tastybento

@tastybento
Copy link
Member

Please make a new ticket for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants