Bug - Not A Bug SVN Builds very unforgiving of lousy connections

EdFox

Member
SVN 12043. Java 6 U 43. Win 7 x64.

This effect only occurs when using my phone's tethering as my internet connection. This connection is pretty lousy and I understand this is nothing Mafia is responsible for nor can fix. However, recent SVN builds (I use KOLMafiaUpdate to always use the latest build) have been having issues logging in and printing debug logs.

A typical login requires 3-8 cycles of "unexpected error during login" then a more successful login will print the log attached and login. However, character data will be invalid in various ways, such as not noting hardcore, Jarlsberg, incorrect values for food/drink/spleen consumed and capacity, etc.

I tested using the 15.9 build and that version logs in much more smoothly and does not print the debug log. While 15.9 isn't playable in AoJ, it working much better seems to me to be a sign that this is a bug and not solely my crappy connection.

Thank you. CLI capture of a login to follow.
Code:
Installing default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
[COLOR=red]Encountered error in login.[/COLOR]
Installing      default certificate validation...
Validating login server      (www.kingdomofloathing.com)...
646 players online.
Sending login      request...
Initializing session for edfox...
Refreshing session      data...
Synchronizing moon data...
Loading character status...
api.php?what=status      parse error: JSONObject["ascensions"] not found.
{"font-family":"arial"}
Retrieving      character data...
Unexpected error, debug log printed.
Refreshing      closet...
Examining consumables in closet...
Examining equipment in      closet...
Examining miscellaneous items in closet...
Updating      inventory...
Retrieving quest data...
Retrieving familiar data...
Familiar      data retrieved.
Retrieving campground data...
Refreshing storage...
Examining      meat in storage...
Examining consumables in storage...
Examining      equipment in storage...
Examining miscellaneous items in storage...
Session      data refreshed.
Feast of Boris tomorrow, 3 days until Muscle.
0      prices updated from      http://kolmafia.us/scripts/updateprices.php?action=getmap
 

Attachments

  • DEBUG_20130422.txt
    6.5 KB · Views: 57

roippi

Developer
That error means that mafia asked for a page and got a completely blank page back. Mafia is at what is known at the "Application" layer on the TCP/IP stack. It makes requests which get passed down to the lower layers on the stack, which negotiate with layers below it, and so forth. So some layer that is not mafia dropped the ball.

Mafia used to force TCP to not reuse connections - we no longer do this, we simply let TCP handle this on its own, closing or reusing as it sees fit.* What you are reporting is that forcing TCP to do one thing gets better results on a terrible internet connection. My response would be that the buggy behavior exists somewhere else in the TCP/IP stack - it is TCP's job to transmit packets and verify that everything was properly delivered, not mafia's. When we were forcing TCP to build a new connection for each request, that may have worked around some of your bugs (I guarantee that it did not work around all of them), but just because legacy behavior worked around bugs in your networking doesn't mean that there is a bug in mafia.

There may be things you can do to fix your broken TCP. This may involve messing with your JAVA_OPTS environment variable, messing with your java networking properties, and/or fixing things in your tethering setup. That's pretty far outside of the scope of this bug report forum. Unfortunately reintroducing the old work-around that is no longer in mafia is just not really an option, sorry.

*The only exception is if you tick the "forcibly time-out laggy requests" option in the login frame, which will do what it says on the tin. I recommend turning this off, especially in your case.
 

EdFox

Member
That option made a great difference. Certainly not perfect, given the underlying issues you helpfully outlined, but it did make mafia considerably more 'forgiving'. :)

I now have further avenues to explore to improve things. Thanks.
 
Top