+ Reply to Thread
Page 4 of 4 FirstFirst ... 2 3 4
Results 31 to 33 of 33

Thread: Username in use when logging in

  1. #31
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    yes, there is something amiss in ES4, but the trigger is that your plugin is throwing an exception at exactly the wrong time, so that the ES4 methods that handle users exiting a room and logging off get deadlocked. I remember hearing discussion about how we were going to separate the extension threads from the ES threads better in ES5, but I haven't peeked at the code to see if it was actually changed.

    Yes there's a bug in ES4, because we should be able to evict anyway. Fixing your plugins should prevent this bug from being triggered.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

  2. #32
    Senior Member
    Join Date
    Sep 2007
    Posts
    142
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I'm going to try to closely monitor these things and try to get users to report issues more promptly. The last time this happened I do see an error in the logs. An exception was thrown due to too many connections on our mysql server (we've been getting that a lot lately, don't know why as we have plenty) and things went into a dizzying tailspin from there. This was during a room creation phase.

    Here's the basic errors just for documentation purposes:

    Code:
    Room created: FTW-Game:fries4guys-205786 Room ID: 1:921 with user fries4guys
    Unable to connect to database.com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Too many connections
    22:35:52,536 [pool-1-thread-1089] ERROR com.electrotank.electroserver4.entities.BaseBridge  - Error occured calling extension code - Extension: ForTheWin - Name: Manager - Handle: TheManager
    java.lang.NullPointerException
    22:35:52,598 [pool-1-thread-1089] ERROR TransactionTiming  - Exception processing message com.electrotank.electroserver4.messages.client.request.ClientInvokePluginRequestMessage@1628d8
    java.lang.NullPointerException
    22:35:52,598 [pool-1-thread-1089] ERROR com.electrotank.electroserver4.servers.registry.GatewayIoHandler  - Exception processing message com.electrotank.electroserver4.messages.client.request.ClientInvokePluginRequestMessage@1628d8
    com.electrotank.electroserver4.servers.registry.MessagingException: Exception processing message com.electrotank.electroserver4.messages.client.request.ClientInvokePluginRequestMessage@1628d8
    22:35:52,601 [pool-1-thread-1088] ERROR com.electrotank.electroserver4.entities.BaseBridge  - Error occured calling extension code - Extension: ForTheWin - Name: Game - Handle: Game
    java.lang.NullPointerException
    22:35:52,614 [pool-1-thread-1088] ERROR TransactionTiming  - Exception processing message com.electrotank.electroserver4.messages.internal.InternalClientDisconnectedMessage@158b8b1
    java.lang.NullPointerException
    22:35:52,615 [pool-1-thread-1088] ERROR com.electrotank.electroserver4.servers.registry.GatewayIoHandler  - Exception processing message com.electrotank.electroserver4.messages.internal.InternalClientDisconnectedMessage@158b8b1
    com.electrotank.electroserver4.servers.registry.MessagingException: Exception processing message com.electrotank.electroserver4.messages.internal.InternalClientDisconnectedMessage@158b8b1
    For now I'll trap the exception and just not create the game if it happens. It does look like my userexit routine is thread safe, but, of course, threads are the most annoying things ever, so who knows for sure.

  3. #33
    Administrator tcarr's Avatar
    Join Date
    Dec 2007
    Posts
    7,214
    Thanks
    80
    Thanked 1,087 Times in 1,076 Posts
    If an exception is thrown during creation or destruction of a room, and particularly during a userExit, there is a small chance that RoomManager's data structures will get out of sync. It looks like the kick and evict methods are checking one data structure (that has the connection details) which is the one that the ES4 checks regularly for the client idle timeout, but isUserLoggedIn checks the other one.

    I don't know how long it's going to take us to determine the best way to fix this. I suggested just adding a few lines to the evict method, but the main ES4/ES5 developer wants to take a closer look at RoomManager first to make it more bulletproof.
    Teresa Carrigan
    Senior Engineer
    Electrotank, Inc.

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts