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

Alpha v5 server crashing #1591

Closed
iOshawott opened this issue Oct 9, 2018 · 22 comments
Closed

Alpha v5 server crashing #1591

iOshawott opened this issue Oct 9, 2018 · 22 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update.

Comments

@iOshawott
Copy link

iOshawott commented Oct 9, 2018

I tried on spigot:

https://hastebin.com/jikuzugula.md

I tried on paper spigot too:

https://hastebin.com/wumaquzofu.shell

Problem is since I installed alphav5. I'm back to alphav3

Problem on 1.13.1

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

#1 When your stack trace is 5 miles long, I highly recommend using Hastebin, so people don't have to scroll 5 miles to be able to get the comment section.

#2 I had basically the same issue. I didnt report it because I haven't tested much. I have about 6 addons and some poorly written code (on purpose, long story) so I wasnt exactly sure what the problem is.
Good to see that I am not the only one!

@iOshawott
Copy link
Author

iOshawott commented Oct 9, 2018

@ShaneBeee thanks! Nice to know I am not the only one too, I'd be happy if you could confirm 1567 too :')
And about first thing I'll edit it ASAP

@bensku
Copy link
Member

bensku commented Oct 9, 2018

I need a test case to reproduce this. Does this happen without addons?

This might be an addon issue, although the addon to cause this would have to be quite poorly written.

@iOshawott
Copy link
Author

@bensku I'm not using addons at 1.13.1 at this moment

@WinterBear
Copy link

WinterBear commented Oct 9, 2018

Came here to report the same issue, interestingly it occurs during a scheduled event, but the event seems to work fine every 60 seconds for about 2 hours before the entire server hanging
https://hastebin.com/ewexapapit.md

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

Came here to report the same issue, interestingly it occurs during a scheduled event, but the event seems to work fine every 60 seconds for about 2 hours before the entire server hanging

Mine's about the same. It goes for about 10-15 minutes, then just crashes. The problem with mine is that it gets all the way to "Disabling Skript..." and stops there ... the crash never completes!

@iOshawott
Copy link
Author

yea, I have scheduled events too. Server works for a few minutes, max few hours (2-3) and stopping

@bensku
Copy link
Member

bensku commented Oct 9, 2018

I need code samples that make this happen. Simply creating a ton of variables does not appear to cause this issue.

Edit: If you can compile latest Skript, I've got a bugfix related to periodical events. Might change something.

@ShaneBeee
Copy link
Contributor

@bensku Ill try it now, Will report back!

@bensku
Copy link
Member

bensku commented Oct 9, 2018

I've changed Skript to be more optimistic with locking in some places; hopefully, this helps. Unfortunately I don't think it will solve this issue.

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

Good news. Doesnt seem to be crashing. But the bad news is, its having trouble loading some of my scripts, and looking at the stack trace its affected by Skript-Mirror imports.

When the server starts I get this
https://hastebin.com/izixeqanoh.md

When I reload my scripts I get this
https://hastebin.com/ebeqipupud.md

EDIT: I guess I shouldn't say good news, its probably not crashing because my script with the periodical event isnt loading

EDIT AGAIN: I removed the skript-mirror imports, and I got the same stack trace error, but this time the node is: on skript load

I tried reloading other skripts of mine and they all do similar things

@TheBentoBox
Copy link
Member

@ShaneBeee That first error is just because you didn't put the aliases into your JAR. When building Skript yourself you need to create an aliases-english folder in the JAR and copy the latest aliases into it. It doesn't seem to do this automatically when building. This is causing Skript to have issues loading which is probably what's causing your second issue.

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

@TheBentoBox Oh, Ive never done that in the past. I always just built the Skript jar, throw that in my plugins folder, and then threw all the aliases into an aliases folder /plugins/Skript/aliases/ ... never had an issue before this version.
But good to know that is how it's supposed to be done.

EDIT:
Okay I have done that, all loads without errors.
That is so weird that it never gave me errors like that before, and I never did that step!

@bensku
Copy link
Member

bensku commented Oct 9, 2018

Actually, build process does automatically copy aliases - if you have them available, and are building a 'clean' jar. Remember to get Git submodule!

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

@bensku Clearly I did something wrong in the build process that cause those errors. Its just confusing since every time I have built skript I never had that issue, and i was throwing the aliases into the /plugins/Skript/aliases/ folder, and they seem to load fine from there, just I guess not this time around.
I know that works before because I would edit those ones, and reload them, it would give me errors if I made a mistake.

Another note.... With this build, my test server has been up for 1 hour, no crashing, no errors. This is substantially longer than it has gone for before :)

@TheBentoBox
Copy link
Member

TheBentoBox commented Oct 9, 2018

Good to hear. Could someone try a test now where you write tons of variables and immediately delete them? With a freshly build Skript JAR, of course, so you're testing the latest commits.

@ShaneBeee
Copy link
Contributor

ShaneBeee commented Oct 9, 2018

ok heres the code I tested

on load:
    set {_start} to now
    loop 2500 times:
        set {test::test::%loop-number%} to loop-number
    wait 1 second
    delete {test::test::*}
    set {_end} to difference between {_start} and now
    send "That took: %{_end}% to console

the 2000 seems to be fine... .anything over that i get that error, took 1.02 seconds.... so I have a 1 second wait in there, remove that, I guess it was done in 0.02 seconds to save 2500 variables

Cannot write variables to the database 'default' at sufficient speed...

EDIT:
I removed the 1 second wait.... still works fine up to 2500 variables, at 0.03 seconds

@bensku
Copy link
Member

bensku commented Oct 10, 2018

Writing variables faster than your computer can handle is not related to this issue. It is just that Skript's global variables are rather terribly slow, if you write more than a dozen of them in one go. In addition to that, list variables are always kept sorted which incurs a cost whenever something is put to them.

@melinstagibson
Copy link

i still get this error aswell with the same skripts mentioned in #1590

@bensku
Copy link
Member

bensku commented Oct 13, 2018

Could someone verify if this still happens?

@WinterBear
Copy link

I can confirm the issue no longer appears to be present. Loaded a freshly built skript on 10/10/2018 and have not had a repeat incident since

@bensku
Copy link
Member

bensku commented Oct 13, 2018

Good to know! A new release is up, but I haven't touched relevant code after 10/10.

@bensku bensku closed this as completed Oct 13, 2018
@bensku bensku added the completed The issue has been fully resolved and the change will be in the next Skript update. label Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update.
Projects
None yet
Development

No branches or pull requests

6 participants