URL:
  <http://gna.org/bugs/?22359>

                 Summary: Infinite loop in pick_random_tech
                 Project: Freeciv
            Submitted by: andreasr
            Submitted on: Thu 17 Jul 2014 07:16:55 PM UTC
                Category: freeciv-web
                Severity: 4 - Important
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
                 Release: 
         Discussion Lock: Any
        Operating System: GNU/Linux
         Planned Release: 

    _______________________________________________________

Details:

After updating to the latest SVN trunk version of Freeciv in Freeciv-web, many
servers sometimes become stuck in infinite lopps using 100% CPU, in
pick_random_tech it seems. 
Current trunk svn revision 25603. This problem leads to an unstable server.

Here are two separate backtraces generated from servers running on 100% CPU:

pick_random_tech (plr=plr@entry=0x28434d0) at techtools.c:842
842     techtools.c: No such file or directory.
(gdb) bt full
#0  pick_random_tech (plr=plr@entry=0x28434d0) at techtools.c:842
        i = 78
        presearch = 0x8f4c60 <research_array>
        chosen = <optimized out>
        researchable = 0
        __FUNCTION__ = "pick_random_tech"
#1  0x000000000041b9c0 in choose_random_tech (plr=plr@entry=0x28434d0) at
techtools.c:927
        research = 0x8f4c60 <research_array>
#2  0x000000000040c258 in end_phase () at srv_main.c:1078
        next_tech = <optimized out>
        presearch = <optimized out>
        MY_i = 84
        pplayer = 0x28434d0
#3  srv_running () at srv_main.c:2481
        save_counter = 1
        i = <optimized out>
        is_new_turn = true
        skip_mapimg = false
        eot_timer = <optimized out>
        need_send_pending_events = false
#4  srv_main () at srv_main.c:2950
        __FUNCTION__ = "srv_main"
#5  0x0000000000405591 in main (argc=17, argv=0x7fff9fdf5058) at
civserver.c:456
        inx = 17
        showhelp = <optimized out>
        showvers = <optimized out>
        option = <optimized out>
        __FUNCTION__ = "main"






221     research.c: No such file or directory.
(gdb) bt full
#0  research_invention_state (presearch=presearch@entry=0x8f4c60
<research_array>, tech=tech@entry=75) at research.c:221
No locals.
#1  0x000000000041a502 in pick_random_tech (plr=plr@entry=0x28434d0) at
techtools.c:843
        i = 75
        presearch = 0x8f4c60 <research_array>
        chosen = <optimized out>
        researchable = 0
        __FUNCTION__ = "pick_random_tech"
#2  0x000000000041b9c0 in choose_random_tech (plr=plr@entry=0x28434d0) at
techtools.c:927
        research = 0x8f4c60 <research_array>
#3  0x000000000040c258 in end_phase () at srv_main.c:1078
        next_tech = <optimized out>
        presearch = <optimized out>
        MY_i = 84
        pplayer = 0x28434d0
#4  srv_running () at srv_main.c:2481
        save_counter = 1
        i = <optimized out>
        is_new_turn = true
        skip_mapimg = false
        eot_timer = <optimized out>
        need_send_pending_events = false
#5  srv_main () at srv_main.c:2950
        __FUNCTION__ = "srv_main"
#6  0x0000000000405591 in main (argc=17, argv=0x7fff9fdf5058) at
civserver.c:456
        inx = 17
        showhelp = <optimized out>
        showvers = <optimized out>
        option = <optimized out>
        __FUNCTION__ = "main"





    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?22359>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to