Page 2 of 3

Re: Server Shutdown error

Posted: Sun Jul 05, 2009 5:39 pm
by eva_m
Has waited 20 minutes so anything and has not waited. As there was a message about

Exception in thread "AWT-Windows" java.lang.IllegalStateException: Shutdown in p
rogress
at java.lang.ApplicationShutdownHooks.add(Unknown Source)
at java.lang.Runtime.addShutdownHook(Unknown Source)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)



And remains. Loading of the processor of 100 % and also is not present the message on a server stop.

Re: Server Shutdown error

Posted: Sun Jul 05, 2009 5:59 pm
by _DS_
We can't reproduce this problem, so I think this is a combination of some system-dependent things :(
Try other JRE versions. I using 6u3.

Re: Server Shutdown error

Posted: Sun Jul 05, 2009 7:52 pm
by eva_m
Interestingly that at me it is all has appeared for no apparent reason, after the next updating server and DP. Thus were not updated Windows, service packs on Windows, JRE and in general any component of system except the assemblage of a server. I warrant for it. Problems were not - updating - the problem has appeared and does not disappear.
At that moment stood JRE 6u13, now 6u14. Particularly -
jdk-6u14-windows-x64.exe
The problem continues to be present. 6u3 I will try, as I will download.

Re: Server Shutdown error

Posted: Sun Jul 05, 2009 8:22 pm
by janiii
eva_m wrote:Interestingly that at me it is all has appeared for no apparent reason, after the next updating server and DP. Thus were not updated Windows, service packs on Windows, JRE and in general any component of system except the assemblage of a server. I warrant for it. Problems were not - updating - the problem has appeared and does not disappear.
At that moment stood JRE 6u13, now 6u14. Particularly -
jdk-6u14-windows-x64.exe
The problem continues to be present. 6u3 I will try, as I will download.
have you tried with clean core and dp? maybe custom code is making problem..

Re: Server Shutdown error

Posted: Mon Jul 06, 2009 12:31 pm
by lishawj
I have a rather useless update on this topic since it does not isolate the problem yet. However, it does seem to point to the core/dp update somewhere along the line.

1. Revert to clean core and dp (latest revision) without any custom codes, no user data, the server will shutdown in 10-15 minutes after receiving sigterm.

2. Clean core and dp (latest revision) with imported user data without any custom codes, the server fails to shutdown and will generate "AWT-Windows exception error". Server will not shutdown and java.exe process stalls at 100% unless console is forcibly terminated.

3. Reverted core and dp to old changeset revision 2980 with imported user data, and the server shutdown properly within 30 seconds of receiving sigterm.

#2 and #3 analysis leads me to believe that it's a core/dp change that is causing the "AWT-Windows exception error" with Java.exe. If user data was the culprit, it would generate the error regardless of revision(s) being tested. However, the error was not generated using changeset 2980 with the same imported user data that generated the error on the latest revisions.

I know it does not point to a specific issue so we can fix the problem but it does point to the core/dp codings and not custom codes (since no custom codes were loaded). I'll load other revisions and test this more when I have a bit more time. This should help us to located the changeset that generated the "AWT-Windows exception error".

Re: Server Shutdown error

Posted: Mon Jul 06, 2009 12:40 pm
by janiii
the longer shutdown is causing this changeset: http://www.l2jserver.com/trac/changeset/3206 - but it is a fix for not saved tradeitems on shutdown, so it will not be reverted..


but still not known awt error issue :/


maybe, could you use latest core/dp but with that one changeset [3206] reverted?


many thanks for your testing and searching of the problem :)

Re: Server Shutdown error

Posted: Mon Jul 06, 2009 1:04 pm
by lishawj
the longer shutdown is causing this changeset: http://www.l2jserver.com/trac/changeset/3206 - but it is a fix for not saved tradeitems on shutdown, so it will not be reverted..
I understand that reasoning since it fixes saving tradeitem on shutdown.

but still not known awt error issue :/
maybe, could you use latest core/dp but with that one changeset [3206] reverted?
many thanks for your testing and searching of the problem
Yes, I will do more revision tests and will try your suggestion as well. In time, hopefuly not too long, we can pin point the issue and have it resolved.

Re: Server Shutdown error

Posted: Mon Jul 06, 2009 5:09 pm
by eva_m
The problem has disappeared.
All that has been made is at first I tried to reduce size of used memory under a server with 2048 to 1536 (has not helped), has then replaced all versions JDK and JRE with 6u14 on 6u3 (were available 32-bit JRE, 64-bit JRE and 64-bit JDK). After removal 6u14 and installations same 6u3 the server has normally stopped work, and even very fast (6-10 minutes were not required)

Before tried with completely empty, just installed base, but with 6u14 - the positive result was not.
Problem obviously in what incompatibility something changeset's with 6u13\14

Re: Server Shutdown error

Posted: Tue Jul 07, 2009 2:21 am
by lishawj
Alrighty,

After several more tests, I believe I have a better idea of what is causing the following error on shutdown:
AWT-Windows" java.lang.IllegalStateException: Shutdown in progress
at java.lang.ApplicationShutdownHooks.add(Unknown Source)
at java.lang.Runtime.addShutdownHook(Unknown Source)
at sun.awt.windows.WToolkit.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Tests performed:

Test1:
Using latest core/dp revision with no custom codes, redacted/reverted changeset 3206. No user data, the server shutdown was performed normally using Java JDK u13 and u14. First shutdown took 2-3 minutes and subsequent shutdowns were performed under 2-3 minutes on test server.

Test2:
Using latest core/dp revision with no custom codes, redacted/reverted changeset 3206. Imported FULL L2JDB database from live server into test server L2JDB database. Peformed database upgrade and upgrade failed on several tables...error log stated that some columns do not match. I believe this may had been caused by premature forced termination of the server shutdown process after upgrading to or beyond changeset 3206. Upon shutdown, the administrator may NOT had heed -DS- warning that shutdown will take extremely long on the first shutdown. Server failed to shutdown properly once database was imported and exhibit the "AWT-Windows" Java error reported.

Test3:
Basing test 3 on the previous two tests information, I used latest core/dp revision with custom codes, leaving changeset 3206 intact, importing only good tables from live L2JDB database (excluding the reported bad tables from test 2). Performed database upgrades successfully without errors. Server shutdown on initial shutdown took 15 minutes and subsequent shutdown were 2-3 minutes.

Test4:
Clean core and dp using Java JDK 6 u3. No errors upon shutdown. Imported known good user data into new database. In fact, it seems that changeset 3206 work better with Java 6 u3 then u13 or u14 since shutdown timer is much faster.

Conclusion:
Making an educated statement based on the above four tests, I conclude that the "AWT-Windows" error (in my case) is caused by corrupt tables. Administrators may had upgraded to or beyond changeset 3206 and upon shutting down, terminated the server prematurely because it was taking longer then usual (2-3 minutes). The premature shutdown may had corrupted some tables as it was in my case.

Upon importing ONLY KNOWN good tables while excluding the reported bad tables, the server shutdown process proceeded normally. First shutdown successfully performed at 15 minutes and subsequent shutdown performed under 3 minutes.

Alternatively, you can downgrade your Java version to u3 and it should resolve the AWT-Windows error too.

Re: Server Shutdown error

Posted: Tue Jul 07, 2009 8:08 am
by eva_m
Basically all is clear. It is better to use 6u3, will be less problems.
There was other question. Now at a server stop \restart appear in the directory gameserver\data similar files:

universe1246950817576.fin and similar

What is such, what with it to do and whether it is necessary that that with it to do?

Re: Server Shutdown error

Posted: Tue Jul 07, 2009 8:20 am
by janiii
eva_m wrote:universe1246950817576.fin and similar
http://filext.com/file-extension/FIN

Re: Server Shutdown error

Posted: Tue Jul 21, 2009 9:18 am
by brutus
eva_m wrote:Basically all is clear. It is better to use 6u3, will be less problems.
There was other question. Now at a server stop \restart appear in the directory gameserver\data similar files:

universe1246950817576.fin and similar

What is such, what with it to do and whether it is necessary that that with it to do?
universe.fin is file created of outdated geodata system which is not used anymore

Re: Server Shutdown error

Posted: Wed Jul 29, 2009 3:34 pm
by mr.karrde
Tested a little bit:

JDK 6u14 gameserver shutdown took 5 minutes 32 seconds.
JDK 6u3 gameserver shutdown took 5 minutes 30 seconds.
Both with most time system freezing 100% CPU load.
No error messages.

And now the unbelievable:
Reinstalling jre 6u14 and after first gameserver start shutdown took only 45 seconds.

Now i delete libs/cachedir every time after shutdown and looks like all shutdown problems solved.


--
L2J Server Version: 3330
L2J Datapack Version: 6440

Re: Server Shutdown error

Posted: Wed Jul 29, 2009 3:37 pm
by janiii
what about fresh database install after each testing round? you should test with clean db.

the problem is not about java version. the high load occures on every very first shutdown. then if you shutdown within the item refresh time it takes again much less. if you shutdown after that item refresh time, too many item timers have to be refreshed and that makes the high cpu load.

Re: Server Shutdown error

Posted: Wed Jul 29, 2009 5:06 pm
by mr.karrde
Strange.
Test with a second clean db (with JRE 6u14 only), high load occures only on very first shutdown all (2) later shutdown's took only 20-25 seconds (both times after ~10 Minutes playing around with a new char).

Maybe i known to less about these item refresh timers, with my updated db almost every not only first shutdown (after update) took 5 Minutes. Playing 1 hour or even if the gameserver was only 1-2 minutes up with or without a char on. How many item timers have to refresh in such a short time?