The tier crash problem

Discussion in 'Development General' started by coyotte508, Dec 14, 2012.

  1. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    As some of you noticed, when updating tiers it crashes on the main server. Let's try to find out what happens.

    Facts:
    - The crash doesn't happen when there are no players on the servers
    - The crash corrupts memory so well that it's actually an unrelated further call to malloc from libc later in the execution that hangs the program (and displays a warning about double linked lists corrupted)

    One relationship of tiers and players is that when tiers are updated, each player has his team tested to see if it belongs, if not he's moved to another tier.

    There's also asynchroneous calls in the server, for example to update / find rating, that have a link to Tier* objects (which are deleted and recreated when tiers are updated). Those asynchroneous calls are in multithreading mode. But normally all the locks should be there to make sure nothing happens (with even a 'version' variable on the calls handler to make sure not to call anything bad), but obviously something somewhere has gone wrong.

    This thread is for programmers who look at the code, try figuring out things / narrowing down the problem :o