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

Stuck on "Retrieving character list" after logout with timer #945

Closed
Lankytim opened this issue May 27, 2016 · 12 comments
Closed

Stuck on "Retrieving character list" after logout with timer #945

Lankytim opened this issue May 27, 2016 · 12 comments
Assignees
Labels
Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5).

Comments

@Lankytim
Copy link

Current behavior:
Character selection screen stuck on "Retrieving character list" after character logout. Need to hit Cancel then re-select realm to get character list back. Also sometimes server crashes on re-login.

Expected behavior:
Character selection screen should appear with characters populated, ready to re-log in to game.

Steps to reproduce:

  1. Log in with an account containing at least 2 characters
  2. Move character A into a safe zone (Green map or an Inn) then choose Logout from game menu
  3. Move character B to a Yellow map (or somewhere that causes the 20sec logout timer) then choose Logout from game menu and wait
  4. Log in immediately with character B again - can cause server crash (1 time in 4 with my testing); or log in with character A again and everything seems fine

Client version:
2.4.3 (8606)

Commit hash:
cmangos/mangos-tbc@69bf156

Database version:
TBC-DB 1.5.0
ACID 2.4.3

Operating system:
Linux Debian 8 Jessie 64bit

@katz1
Copy link

katz1 commented May 29, 2016

I can confirm the part about not being able to return to the character selection screen after the 20 second logout. Tested with classic core, both Windows and Debian.

After you press cancel on the 'Retrieving character list', you will get a 'Session Expired'.

@Lankytim
Copy link
Author

Lankytim commented Jun 3, 2016

I found the "InstantLogout" setting in mangosd.conf.

The behavior I described above occurs with InstantLogout = 1 (default)

The issue is NOT present with InstantLogout = 0

@Lankytim
Copy link
Author

Lankytim commented Jun 3, 2016

I should have mentioned earlier - this is all with a GM level 0 account.

@Phatcat
Copy link
Contributor

Phatcat commented Jun 3, 2016

That could indicate that the issue lies with the InstantLogout functionality.

@cyberium it seems like the issues with the conf settings are piling up. I think we're gonna have to take a closer look at each and every one of them...

@katz1
Copy link

katz1 commented Jun 3, 2016

As I understand InstantLogout = 0 enables instant logout for all security levels. If this is the case the issue is not present with InstantLogout = 0, because there won't be a logout timer for anybody.

As both Lankytim and I stated, the issue happens when logging out with a timer. So the InstantLogout config value is unrelated to the issue itself in my opinion, or I may have misunderstood you guys horribly.

@Phatcat
Copy link
Contributor

Phatcat commented Jun 3, 2016

@katz1 Other way around.

@Lankytim
Copy link
Author

Lankytim commented Jun 3, 2016

I made the comment re: InstantLogout to at least show that a) the issue occurs with a default setting; b) setting it to 0 could perhaps be used as an interim workaround by affected server admins.

I gladly leave determining any relationship with the root cause (or the issue, actually) up to the experts! :)

@katz1
Copy link

katz1 commented Jun 4, 2016

setting it to 0 could perhaps be used as an interim workaround by affected server admins

That is true, thanks for the tip. I changed the flag now as well.

@Phatcat

Other way around.

From the config:

InstantLogout
Enable or disable instant logout for security level (0..4) or high (NOT in combat/while dueling/while falling)
Default: 1 (Mods/GMs/Admins)

I find the config comment a bit misleading, it should be more like: (0..4) and above
InstantLogout 0 enables instant logout for security level 0 and above, so there won't be a logout timer for anyone. I tested it on classic.

@Phatcat
Copy link
Contributor

Phatcat commented Jun 4, 2016

Enable or disable instant logout for security level (0..4) ...

Pretty sure it enables / disable instant logout for any security level or our commenting sure is a bit misleading.

@NocFenix
Copy link

NocFenix commented Jun 20, 2016

I noticed this exact same issue as well. Digging into the code, I found a fix that seems to work. I haven't noticed any negative side effects, but, if you want to try it out:

In WorldSession.cpp around line 293:

// check if we are safe to proceed with logout
// logout procedure should happen only in World::UpdateSessions() method!!!
if (updater.ProcessLogout())
{
    ///- If necessary, log the player out
    const time_t currTime = time(nullptr);

    if (m_Socket->IsClosed() || (ShouldLogOut(currTime) && !m_playerLoading))
    {
        LogoutPlayer(true);
        return true; // false;
    }
}

Changed return false; to return true; From what I can tell, this change basically says to keep the session open. When it was closing the session it expired and logged the player out; thus preventing the character list from repopulating.

Again, I have not seen any adverse effects yet from this change, but I'll post back if I do find any.

NOTE: I'm running Classic

@namreeb namreeb self-assigned this Jun 22, 2016
@ulfgebhardt
Copy link
Contributor

Can confirm the Problem on https://github.com/cmangos/mangos-tbc/tree/Last_mangos-tbc_PreBuild
InstantLogout = 1
Gm Level: 0/3

@Lankytim Lankytim changed the title Stuck on "Retrieving character list" after logout with timer, crash sometimes Stuck on "Retrieving character list" after logout with timer Jun 27, 2016
@Lankytim
Copy link
Author

I tried for a while today but was unable to reproduce the crash that I originally mentioned.

When the crash I mentioned happened, I had very recently done a "make install" and run the DB installation script, both while the server was under a temporary VMware snapshot as part of my deployment method. There was a chance that the disk I/O would be slightly slower at that time and maybe MySQL was busy doing something too. I tried snapshotting as well as artificially starving the VM of CPU today in a hope to reproduce some race condition, but alas, she would not crash.

Have amended the issue title accordingly.

@Fabi Fabi added Version-Cata Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5). labels Aug 27, 2016
Fabi pushed a commit to cmangos/mangos-wotlk that referenced this issue Aug 28, 2016
Fabi pushed a commit to cmangos/mangos-classic that referenced this issue Aug 28, 2016
Fabi pushed a commit to cmangos/mangos-cata that referenced this issue Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expansion: Classic (1.12) Issues relating to the Classic Expansion (1.12). Expansion: TBC (2.4.3) Issues relating to the TBC Expansion (2.4.3). Expansion: WotLK (3.3.5) Issues relating to the WotLK Expansion (3.3.5).
Projects
None yet
Development

No branches or pull requests

7 participants