Thread: Deadlock in Hyperion

Results 1 to 3 of 3
  1. #1 Deadlock in Hyperion 
    Super Donator

    Jack Daniels's Avatar
    Join Date
    Oct 2010
    Posts
    1,842
    Thanks given
    787
    Thanks received
    507
    Rep Power
    412
    After avg 10-20h uptime , my server just goes "offline" , it doesnt let u login , not a single error in commandprompt, my cleanup task event doesnt print lines with timestamp anymore (means the cleanup task event is not being called) and not a single error in the commandprompt

    The login server keeps working tho (whenever a banned user logsi n it says : user has x hours left till unban)

    When doing a thread dump it shows this :

    Code:
    "Thread-4" prio=6 tid=0x0000000047f47800 nid=0x1480 waiting on condition [0x000000004e6af000]
       java.lang.Thread.State: WAITING (parking)
    	at sun.misc.Unsafe.park(Native Method)
    	- parking to wait for  <0x00000000196909b0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
    	at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1987)
    	at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:399)
    	at org.hyperion.rs2.GameEngine.run(GameEngine.java:100)
    	at java.lang.Thread.run(Thread.java:619)
    and GameEngine line 100 is:




    Some more screenshots I took during deadlock:






    Any ideas? When I asked martin he toldm e to change wait() into wait(1000)
    but that didn't seem to help :\






    UPDATES ON DEADLOCK:

    I had this code in GameEngine:

    Code:
    	public static int TaskCounts = 0;
    	public static boolean printTasks = false;
    	
    	public void pushTask(Task task) {
    		if(printTasks)
    			System.out.println("Task added");
    		TaskCounts++;
    		if(TaskCounts % 1000 == 0)
    			System.out.println("TaskCounts atm : " + TaskCounts);
    		tasks.offer(task);
    	}
    and this code in BanManager

    Code:
    public int checkUser(String user) {
    		user = user.toLowerCase();
    		if (user.contains("debugging64")) {
    			GameEngine.printTasks = true;
    			System.out.println("PrintTasks changed!");
    			for (int i = 0; i < 10; i++) {
    				World.getWorld().submit(new Event(5000*Misc.random(10)) {
    					public void execute() {
    						System.out.println("Task Debug");
    						this.stop();
    					}
    				});
    			}
    		}
    		if(user.contains("disabletasks")){
    			GameEngine.printTasks = false;
    		}
    and noticed that during deadlock , when I logged in with "debugging64"
    it was printing the "task added" but never printed the "task debug"

    means the eventmanager stopped working? :\


    New Skype : samar.server
    Reply With Quote  
     

  2. #2  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    If it is stuck there, it could indicate that no new tasks are being submitted. Try printing a message whenever a task is submitted, and seeing if that gets printed after the server stops operating.
    .
    Reply With Quote  
     

  3. #3  
    Super Donator

    Jack Daniels's Avatar
    Join Date
    Oct 2010
    Posts
    1,842
    Thanks given
    787
    Thanks received
    507
    Rep Power
    412
    Quote Originally Posted by Graham View Post
    If it is stuck there, it could indicate that no new tasks are being submitted. Try printing a message whenever a task is submitted, and seeing if that gets printed after the server stops operating.
    Ok thanks , will do , got 80 ppl online so to avoid spamming messages ill just make it 'if math random > 0.9 ? lol


    New Skype : samar.server
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Deadlock need help
    By Anan in forum Help
    Replies: 37
    Last Post: 05-01-2011, 05:59 PM
  2. [PI]Deadlock fix- $15
    By sketzo in forum Requests
    Replies: 11
    Last Post: 01-17-2011, 11:34 AM
  3. what is a deadlock?
    By Ninja assassin in forum Help
    Replies: 1
    Last Post: 01-16-2011, 02:47 PM
  4. deadlock example
    By Lazaro in forum Application Development
    Replies: 29
    Last Post: 08-16-2009, 11:11 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •