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

                 Summary: Server crash with supplied scenarios (trunk)
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Saturday 13/02/10 at 17:05
                Category: None
                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:

Happens with tutorial scenario (before and after patching bug #15316, which
is where I found it) and also with data/scenario/earth-160x90-v2.sav. Doesn't
happen if I just start the server on its own with no "-f" argument.

This is trunk r16825. Don't see it on S2_2.

Here's what I see when running the server separately from the client (crash
also happens within client):


$ server/freeciv-server -f data/scenario/tutorial.sav
This is the server for Freeciv version 2.2.99-dev
You can learn a lot about Freeciv at http://www.freeciv.org/
2: Loading rulesets
2: AI*1 has been added as Easy level AI-controlled player.
2: AI*2 has been added as Easy level AI-controlled player.
2: AI*3 has been added as Easy level AI-controlled player.
2: AI*4 has been added as Easy level AI-controlled player.
2: AI*5 has been added as Easy level AI-controlled player.
Loading tutorial events.
1: in load_command() [stdinhand.c::3324]: Failed at
[sanitycheck.c::686]:!(pplayer->team != NULL)
1: in load_command() [stdinhand.c::3324]: last message repeated 2 times
1: in load_command() [stdinhand.c::3324]: last message repeated 2 times
(total 4 repeats)
2: AI*6 has been added as Easy level AI-controlled player.
2: AI*7 has been added as Easy level AI-controlled player.
2: Now accepting new client connections.

For introductory help, type 'help'.
>
2: Connection request from jtn from localhost
2: c1 has client version 2.2.99-dev
2: jtn has connected from localhost.
Segmentation fault (core dumped)


Note the sanity check warnings before the client connects. The server then
segfaults when a client actually connects. Here's the backtrace:


#0  0x00000000004610c5 in package_player_info (plr=0x916c18, 
    packet=0x7fffc8ab1700, receiver=0x915fe8, 
    min_info_level=<value optimized out>) at plrhand.c:921
        info_level = INFO_MINIMUM
        highest_team_level = INFO_MINIMUM
        research = (struct player_research *) 0x0
        pgov = <value optimized out>
        __PRETTY_FUNCTION__ = "package_player_info"
#1  0x00000000004614c8 in send_player_slot_info_c (src=0x916c18, 
    dest=<value optimized out>) at plrhand.c:689
        myiter = (const struct genlist_link *) 0x0
        pconn = (struct connection *) 0x86e100
        info = {playerno = 1, 
  name =
"AI*2\000�+\002\000\000\000\000\030��p\000\000\000\000\001\000\000\000\000\000\000\000\000\000\000",

  username = "Unassigned", '\0' <repeats 21 times>, score = 0, is_male =
true, 
  was_created = false, government = 0, target_government = 0, real_embassy =
{
    false <repeats 32 times>}, city_style = 0, nation = -1, team = -1, 
  is_ready = false, phase_done = false, nturns_idle = 0, is_alive = true, 
  diplstates = {{type = DS_NO_CONTACT, max_state = DS_ARMISTICE, 
      first_contact_turn = 0, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = DS_ARMISTICE, 
      first_contact_turn = 0, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = 4294967295, 
      first_contact_turn = 0, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = 3366664432, 
      first_contact_turn = 32767, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = 3366664784, 
      first_contact_turn = 32767, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = 3681606, 
      first_contact_turn = 0, turns_left = 0, has_reason_to_cancel = 0, 
      contact_turns_left = 0}, {type = DS_WAR, max_state = 1298088780, 
      first_contact_turn = 1095979845, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 1892165715, first_contact_turn = 32737, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 1197436517, first_contact_turn = 1414868546, turns_left =
0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 1891154785, first_contact_turn = 32737, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 4294967295, first_contact_turn = 94, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 790180608, first_contact_turn = 1096783250, turns_left = 0,

      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 41347600, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 3366656256, first_contact_turn = 32767, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 1835099476, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = 3354912, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, 
      first_contact_turn = 1835099476, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 3551520, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 1835099476, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = 3748128, first_contact_turn = 0, 
      turns_left = 0, has_reason_to_cancel = 0, contact_turns_left = 0}, {
      type = DS_WAR, max_state = DS_ARMISTICE, 
      first_contact_turn = 1835099476, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 3289632, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = DS_ARMISTICE, first_contact_turn = 0, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}, {type = DS_WAR, 
      max_state = 197, first_contact_turn = 100, turns_left = 0, 
      has_reason_to_cancel = 0, contact_turns_left = 0}}, gold = 0, tax = 0,

  science = 0, luxury = 0, bulbs_last_turn = 0, bulbs_researched = 0, 
  techs_researched = 0, researching = 197, science_cost = 100, 
  future_tech = 0, tech_goal = 199, is_connected = false, 
  revolution_finishes = -1, ai = true, ai_skill_level = 3, barbarian_type =
0, 
  gives_shared_vision = 0, 
  inventions = '0' <repeats 88 times>, "\00029", '\0' <repeats 25 times>,
"Team 30", '\0' <repeats 14 times>,
"3\031/\222\225_A\000\000\000\000Team\000�\206", '\0' <repeats 13 times>,
"�\033���\177\000\000�\033���\177\000\000\000\035���\177\000\000\000\034���\177\000\000�",
love = {1 <repeats 32 times>}, wonders = {
    0 <repeats 200 times>}}
#2  0x0000000000461712 in send_player_info_c (src=<value optimized out>, 
    dest=0x22bf7d0) at plrhand.c:719
        pplayer = (struct player *) 0x916c18
        MY_i = 1
#3  0x000000000044ee92 in establish_new_connection (pconn=0x86e100)
    at connecthand.c:195
        dest = (struct conn_list *) 0x22bf7d0
        pplayer = <value optimized out>
        packet = {you_can_join = true, 
  message = "jtn Welcome\000\177", '\0' <repeats 18 times>, "P
���\177\000\000
!���\177\000\000\000\000\000\000\000\000\000\000�!���\177\000\...@�g\002\000\000\000\000��g\002\000\000\000\000x�g\002\000\000\000\000�\034�p�\177\000\000\200\"���\177\000\000
\177x\002\000\000\000\000��x\002\000\000\000\000�\177x\002\000\000\000\000�\177x\002",
'\0' <repeats 20 times>,
"��g\002\000\000\000\000��������\200\"���\177\000\0000�g\002\000\000\000\000p\r�p�\177\000\000�!���\177\000\000\001\000\000\000\000\000\000\000
!���\177\000\000\204ط"..., 
  capability = "+Freeciv.Devel.2010.Fev.8 \000 by any player.\000rated by
production in that city.\n\nIn each city, only one Power Plant, Hydro Plant,
Nuclear Plant, or Solar Plant can take
e\000\020\000\000\000\000\000\000p�u\002\000\000\000\000�\037\000\000\000\000\000\000���p�\177\000\000H"...,

  challenge_file =
"challenge_5556_1\000\000\000\000\000\000\000���p�\177\000\000H[���\177\000\000�N�p�\177\000\000\210H���\177\000\000pH���\177\000\000\220H���\177\000\000x(���\177\000\000w(���\177\000\000o9���\177\000\000p(���\177\000\0008��p�\177\000\000p�u\002\000\000\000\000\001\000\000\000\002\000\000\000\002\000\000\000\000\000\000\000\001\000\000\000\000\000\000\...@��p�\177\000\000\020��p�\177\000\000search
castellan.local\n\000nager\n\000\000�3���\177\000\000�"..., conn_id
= 1}
        hostname =
"teacup\000\000\0209���\177\000\000\000\000\000\000\000\000\000\000.c|q�\177\000\000\000\000\000\000\000\000\000\000\220�\233q�\177\000\000\001",
'\0' <repeats 15 times>, "\001", '\0' <repeats 23 times>,
"�8���\177\000\000\000\000\000\000�\177\000\000\000\000\000\000\001\000\000\000\220�\233q�\177\000\000X�\235q�\177\000\000\2209���\177\000\000\000�\235q�\177\000\000\201\034@",
'\0' <repeats 13 times>, "
\000\000\000\000\000\000\000�+\002\000\000\000\000\006\000\000\000\000\000\000\000�8���\177\000\000\000\000\000\000\000\000\000\000��+\002\000\000\000\000
:���\177\000\000\214�p�"...
        __FUNCTION__ = "establish_new_connection"
#4  0x000000000044f75b in handle_login_request (pconn=0x86e100,
req=0x2759e80)
    at connecthand.c:354
        msg =
"\t�\221\000\000\000\000\000��[\000\000\000\000\000AI*7\000\000\000\000\000\000\000\000",
'�' <repeats 12 times>,
"\0003\031/\222\225_\000\000\000\000\000\000\000\000\000��������/\232W\000\000\000\000\000,\232W",
'\0' <repeats 13 times>, "�?���\177\000\000\001\000\000\000\002", '\0'
<repeats 11 times>,
"PB���\177\000\000�\t\\\000\000\000\000\000�\t\\", '\0' <repeats 37
times>, "b�W\000\000\000\000\000
�W\000\000\000\000\000\000\000\000\000�\n\000\000�A���\177\000\000�A�s\000\000\000\000\200A���\177\000\000,\\|q�\177\000\000data/sce,"...
        __FUNCTION__ = "handle_login_request"
#5  0x0000000000409d0d in server_packet_input (pconn=0x86e100, 
    packet=0x915fe8, type=0) at srv_main.c:1366
        pplayer = <value optimized out>
        __FUNCTION__ = "server_packet_input"
#6  0x000000000048c987 in server_sniff_all_input () at sernet.c:407
        pconn = (struct connection *) 0x86e100
        max_desc = <value optimized out>
        readfs = {fds_bits = {32, 0 <repeats 15 times>}}
        writefs = {fds_bits = {0 <repeats 16 times>}}
        exceptfs = {fds_bits = {0 <repeats 16 times>}}
        tv = {tv_sec = 0, tv_usec = 999997}
        __FUNCTION__ = "server_sniff_all_input"
        last_noplayers = 0
        connections = false
#7  0x000000000040b6e4 in srv_main () at srv_main.c:2459
        __FUNCTION__ = "srv_main"
#8  0x0000000000404699 in main (argc=3, argv=0x7fffc8ab5d18) at
civserver.c:372
        inx = 3
        showhelp = false
        showvers = false
        option = <value optimized out>
        __FUNCTION__ = "main"





    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  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