URL:
<http://gna.org/bugs/?20490>
Summary: Player owner reconnecting to player while delegate
user attached => server assertion failures, crash
Project: Freeciv
Submitted by: jtn
Submitted on: Sat Feb 9 21:39:12 2013
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Assigned to: None
Originator Email:
Open/Closed: Open
Release: S2_4 r22316
Discussion Lock: Any
Operating System: GNU/Linux
Planned Release: 2.4.0,2.5.0
_______________________________________________________
Details:
* Two users initially: herp, derp, each with a player
* Game started
* herp: /delegate to pamcakes
* herp leaves
* pamcakes joins (not attached to player intitially)
* pamcakes: /delegate take Ur-Nammu [herp's player]
* bad things happen to server
"Bad things" include many many assertion failures and eventually a crash.
With -F, the first server assertion failure:
0: in dbv_isset() [bitvector.c::120]: assertion 'pdbv->vec != ((void *)0)'
failed.
#0 0x00007f76e90c07bb in raise (sig=<value optimised out>)
at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
No locals.
#1 0x00000000005e5f8c in fc_assert_fail (file=0x68436d "bitvector.c",
function=0x6844be "dbv_isset", line=120, assertion=<value optimised out>,
message=0x680e85 "nologmsg:%s") at log.c:520
level = LOG_FATAL
#2 0x00000000005fc8d5 in dbv_isset (pdbv=<value optimised out>,
bit=<value optimised out>) at bitvector.c:120
__FUNCTION__ = "dbv_isset"
#3 0x000000000048c931 in map_is_known_and_seen (ptile=0x5126, pplayer=0x5126,
vlayer=6) at maphand.c:749
No locals.
#4 0x000000000048cb97 in send_tile_info (dest=<value optimised out>,
ptile=0x354f2d0, send_unknown=false) at maphand.c:422
pplayer = 0x1f9ede0
pconn_iter = <value optimised out>
pconn = 0x8c1970
info = {tile = 0, continent = 0, known = 6107115, owner = 0,
worked = 0, terrain = 0, resource = 33156576, special = {false,
false, false, false, 80, 236, false, true, false, false, false},
bases = {vec = "\000\375MI"},
spec_sprite = '\000' <repeats 13 times>,
"\n\025]\000\000\000\000\000P\354\370\001\000\000\000\000\bOI", '\000'
<repeats 15 times>,
label = '\000' <repeats 14 times>"\205,
&o\213|\213\206\220\205u\001", '\000' <repeats 12 times>,
"p\031\214\000\000\000\000\000\320\363\025"}
owner = <value optimised out>
__FUNCTION__ = "send_tile_info"
#5 0x000000000048d193 in send_all_known_tiles (dest=0x1750580)
at maphand.c:364
tiles_sent = <value optimised out>
#6 0x000000000043b673 in send_all_info (dest=0x1750580) at srv_main.c:555
__FUNCTION__ = "send_all_info"
#7 0x00000000004816a9 in connection_attach_real (pconn=0x8c1970,
pplayer=0x1f9ede0, observing=false, connecting=false) at
connecthand.c:622
__FUNCTION__ = "connection_attach_real"
#8 0x000000000048198a in connection_delegate_restore (pconn=0x8c1970)
at connecthand.c:822
pplayer = <value optimised out>
__FUNCTION__ = "connection_delegate_restore"
#9 0x0000000000481e77 in establish_new_connection (pconn=0x8c20a0)
at connecthand.c:189
pdelegate = <value optimised out>
dest = 0x17505d0
pplayer = <value optimised out>
packet = {you_can_join = true,
message = "herp
Welcome\000\000\000\000\000\000\000\004\000\000\000L\315]\351v\177\000\000\340/h\000\000\000\000\000x\365\025\066\377\177\000\000\200\365\025\066\377\177\000\000\210\365\025\066\377\177\000\000p\365\025\066\377\177\000\000\320\365\025\066\377\177\000\000\345\334a\000\000\000\000\000\000\020\000\000\000\000\000\000G\030\251\000\000\000\000\000\063\347\326\347v\177\000\000\331\017\000\000\000\000\000\000\200\247\a\350v\177\000\000&\000\000\000\000\000\000\000\000@]\351v\177\000\000\000\000\000\000\000\000\000\000\205\375\326\347v\177\000\000
\030\251\000\000\000\000\000
\030\251\000\000\000\000\000&\000\000\000\000\000\000\000\200\247\a\350v\177\000\000\000\000\000\000\000\000\000\000\236\343\326\347v\177\000\000\060\060\060\060\060\060\060\060\200\247\a\350v\177\000\000
\030\251\000\000\000\000\000&", '\000' <repeats 15 times>, "@\022"...,
capability = "+Freeciv-2.4-network rules_finished
trademindist_size\000\000(\211\322\347v\177\000\000en_GB.UT\000\205&o\213|\213\206\004\000\000\000\000\000\000\000o\374\025\066\377\177\000\000\002\000\000\000\000\000\000\000\240\374\025\066\377\177\000\000\300\031\214\000\000\000\000\000\350\355\371\001\000\000\000\000\340\355\371\001\000\000\000\000u\362C\000\000\000\000\000\060\000\000\000\060\000\000\000\200\374\025\066\377\177\000\000\300\373\025\066\377\177\000\000\000\205&o\000\000\000\000@\370t\001\000\000\000\000ěE\000\005\000\000\000\070\374\025\066\377\177\000\000
\373\025\066\377\177\000\000\300\031\214\000\000\000\000\000\350\355\371\001\000\000\000\000@\370t\001\000\000\000\000@\276\a\350v\177\000\000\001\000\000\000\000\000\000\000"...,
challenge_file =
"challenge_5556_4\000\000\000\000\000\000\000\310JC\000\000\000\000\000
\000\000\000\060\000\000\000\020\376\025\066\377\177\000\000P\375\025\066\377\177",
'\000' <repeats 26 times>"\300,
\031\214\000\000\000\000\000@\025\026\066\377\177\000\000take Ur-\271\vH",
'\000' <repeats 13 times>,
"r^_\000\000\000\000\000\220\006\026\066\377\177\000\000\260\vH", '\000'
<repeats 13 times>, "p\031\214", '\000' <repeats 13 times>"\220,
\004\026\066\377\177\000\000\220\006\026\066\377\177\000\000\000\205&o\213|\213\206\220\002\026\066\377\177\000\000p\031\214",
'\000' <repeats 13 times>"\220,
\004\026\066\377\177\000\000\220\006\026\066\377\177\000\000\000\000\000\000\000\000\000\000\220\002\026\066\377\177\000\000V\251D\000\000\000\000\000\214\376\025\066\377\177",
'\000' <repeats 26 times>..., conn_id = 4}
connect_info = {
message = '\000' <repeats 55 times>, "0", '\000' <repeats 32
times>"\300,
\r\026\066\377\177\000\000@\022\026\066\377\177\000\000\260\016\026\066\377\177\000\000\001\000\000\000\000\000\000\000P\017\026\066\377\177\000\000\377\001\000\000\000\000\000\000\231\rh\000\000\000\000\000@\022\026\066\377\177\000\000p\242\337\347v\177\000\000\001\200\255\373\000\000\000\000@\022\026\066\377\177\000\000@\022\026\066\377\177\000\000@\022\026\066\377\177\000\000@\022\026\066\377\177\000\000p\022\026\066\377\177\000\000?\024\026\066\377\177\000\000@\022\026\066\377\177\000\000?\024\026\066\377\177",
'\000' <repeats 46 times>, "\004", '\000' <repeats 35 times>"\240,
\016\026\066\377\177\000\000@\020\026\066\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\240\024\026\066\377\177\000\000\377\377\377\377\000\000\000\000\310"...,
tile = 907416560, event = 32767, conn_id = 24442032}
hostname = "teacup\000\000\000\024\026\066\377\177\000\000
\363t\001\000\000\000\000\265\221\322\347v\177", '\000' <repeats 26 times>,
"8\025\026\066\377\177\000\000
\363t\001\000\000\000\000\001\000\000\000\000\000\000\000\220\374t\001",
'\000' <repeats 68 times>,
"8\025\026\066\377\177\000\000\310\005c\000\000\000\000\000
\363t\001\000\000\000\000\006\000\000\000\000\000\000\000\240\372t\001\000\000\000\000p\025\026\066\377\177\000\000]\215\322\347v\177\000\000C\000_GB.UTF-8\000v\177\000\000\000\000\000\000\000\000\000\000\200\211\322\347v\177\000\000LC_MESSAGES/freeciv.mo\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000\205&o\213|\213\206en_GB.UT\300\024\026\066\377\177\000\000\240"...
__FUNCTION__ = "establish_new_connection"
#10 0x0000000000482b59 in handle_login_request (pconn=0x8c20a0,
req=0x1fa4d10)
at connecthand.c:416
msg = '\000' <repeats 377 times>"\205,
&o\213|\213\206\000\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000\304\031\026\066\377\177\000\000\001\000\000\000\000\000\000\000p\031\214\000\000\000\000\000(7\026\066\377\177\000\000L7\026\066\377\177\000\000\353\221H\000\000\000\000\000\t\000\000\000civ1",
'\000' <repeats 60 times>, "civ2", '\000' <repeats 49 times>"\205,
&o\213|\213\206\000\000\000\000civ2\000\000\000\000\000\000\000\000p\031\214\000\000\000\000\000p\030\026\066\377\177\000\000p\030\026\066\377\177\000\000\000\000\000\000\000\000\000\000\260\030\026\066\377\177\000\000\261\031[\000\000\000\000\000p\031\214",
'\000' <repeats 13 times>"\260,
\003u\001\000\000\000\000\274\rH\000\000\000\000\000\200\030\026\066\377\177\000\000\260\031\026\066\377\177\000\000"...
kick_time_remaining = <value optimised out>
__FUNCTION__ = "handle_login_request"
#11 0x000000000043aaa5 in server_packet_input (pconn=0x8c20a0, packet=0x5126,
type=6) at srv_main.c:1531
pplayer = <value optimised out>
__FUNCTION__ = "server_packet_input"
#12 0x00000000004c64aa in incoming_client_packets () at sernet.c:457
command_ok = <value optimised out>
packet = {data = 0x1fa4d10, type = PACKET_SERVER_JOIN_REQ}
#13 server_sniff_all_input () at sernet.c:834
pconn = 0x8c20a0
nb = <value optimised out>
i = <value optimised out>
s = <value optimised out>
max_desc = <value optimised out>
readfs = {fds_bits = {256, 0 <repeats 15 times>}}
writefs = {fds_bits = {0 <repeats 16 times>}}
exceptfs = {fds_bits = {0 <repeats 16 times>}}
tv = {tv_sec = 0, tv_usec = 999996}
__FUNCTION__ = "server_sniff_all_input"
#14 0x000000000043c8ad in srv_running () at srv_main.c:2304
eot_timer = 0x3727e50
save_counter = 1
i = 0
is_new_turn = <value optimised out>
need_send_pending_events = false
__FUNCTION__ = "srv_running"
#15 0x000000000043d632 in srv_main () at srv_main.c:2764
__FUNCTION__ = "srv_main"
#16 0x0000000000433f9f in main (argc=<value optimised out>,
argv=0x7fff36163e68) at civserver.c:453
inx = 4
showhelp = false
showvers = false
option = 0x0
__FUNCTION__ = "main"
Without -F, I get 8112 of these assertions, then a different one, then a
segfault.
in dbv_isset() [bitvector.c::120]: assertion 'pdbv->vec != ((void *)0)'
failed.
...
in map_get_player_tile() [maphand.c::1093]: assertion
'pplayer->server.private_map' failed.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000048b9f9 in map_get_player_site (ptile=<value optimised out>,
pplayer=<value optimised out>) at maphand.c:1082
No locals.
#1 0x000000000047664f in send_all_known_cities (dest=0x19b2580)
at citytools.c:1846
ptile = <value optimised out>
ptile_index = 0
pplayer = 0x2201820
pconn_iter = 0x0
pconn = 0x8c1970
__FUNCTION__ = "send_all_known_cities"
#2 0x000000000043b67b in send_all_info (dest=0x19b2580) at srv_main.c:556
__FUNCTION__ = "send_all_info"
#3 0x00000000004816a9 in connection_attach_real (pconn=0x8c1970,
pplayer=0x2201820, observing=false, connecting=false) at
connecthand.c:622
__FUNCTION__ = "connection_attach_real"
#4 0x000000000048198a in connection_delegate_restore (pconn=0x8c1970)
at connecthand.c:822
pplayer = <value optimised out>
__FUNCTION__ = "connection_delegate_restore"
#5 0x0000000000481e77 in establish_new_connection (pconn=0x8c20a0)
at connecthand.c:189
pdelegate = <value optimised out>
dest = 0x19b25d0
pplayer = <value optimised out>
packet = {you_can_join = true,
message = "herp
Welcome\000\000\000\030\352N\245\004\000\000\000L\315Q.\301\177\000\000\340/h\000\000\000\000\000\030\351N\245\377\177\000\000
\351N\245\377\177\000\000(\351N\245\377\177\000\000\020\351N\245\377\177\000\000p\351N\245\377\177\000\000\345\334a\000\000\000\000\000\000\020\000\000\000\000\000\000G\030\251\000\000\000\000\000\063\347\312,\301\177\000\000\331\017\000\000\000\000\000\000\200\247\373,\301\177\000\000&\000\000\000\000\000\000\000\000@Q.\301\177\000\000\000\000\000\000\000\000\000\000\205\375\312,\301\177\000\000
\030\251\000\000\000\000\000
\030\251\000\000\000\000\000&\000\000\000\000\000\000\000\200\247\373,\301\177\000\000\000\000\000\000\000\000\000\000\236\343\312,\301\177\000\000\000\352N\245\377\177\000\000\200\247\373,\301\177\000\000
\030\251\000\000\000\000\000&", '\000' <repeats 15 times>"\340,
\005O\245\377\177\000\000\002\000\000\000\000\000\000\000\274"...,
capability = "+Freeciv-2.4-network rules_finished
trademindist_size\000\000(\211\306,\301\177\000\000en_GB.UT\000S\211\036\006x\206\214\004\000\000\000\000\000\000\000\017\360N\245\377\177\000\000\002\000\000\000\000\000\000\000@\360N\245\377\177\000\000\300\031\214\000\000\000\000\000(\030
\002\000\000\000\000 \030
\002\000\000\000\000u\362C\000\000\000\000\000\060\000\000\000\060\000\000\000
\360N\245\377\177\000\000`\357N\245\377\177\000\000\000S\211\036\000\000\000\000@\030\233\001\000\000\000\000ěE\000\005\000\000\000\330\357N\245\377\177\000\000\300\356N\245\377\177\000\000\300\031\214\000\000\000\000\000(\030
\002\000\000\000\000@\030\233\001\000\000\000\000@\276\373,\301\177\000\000"...,
challenge_file =
"challenge_5556_4\000\000\000\000\000\000\000\310JC\000\000\000\000\000
\000\000\000\060\000\000\000\260\361N\245\377\177\000\000\360\360N\245\377\177",
'\000' <repeats 26 times>"\300,
\031\214\000\000\000\000\000\340\bO\245\377\177\000\000 Michael\271\vH",
'\000' <repeats 13 times>,
"r^_\000\000\000\000\000\060\372N\245\377\177\000\000\260\vH", '\000' <repeats
13 times>, "p\031\214", '\000' <repeats 13 times>,
"0\370N\245\377\177\000\000\060\372N\245\377\177\000\000\000S\211\036\006x\206\214\060\366N\245\377\177\000\000p\031\214",
'\000' <repeats 13 times>,
"0\370N\245\377\177\000\000\060\372N\245\377\177\000\000\000\000\000\000\000\000\000\000\060\366N\245\377\177\000\000V\251D\000\000\000\000\000,\362N\245\377\177",
'\000' <repeats 26 times>"\352, \bO\245\377\177"..., conn_id = 4}
connect_info = {
message = '\000' <repeats 55 times>, "0", '\000' <repeats 32 times>,
"`\001O\245\377\177\000\000\340\005O\245\377\177\000\000P\002O\245\377\177\000\000\001\000\000\000\000\000\000\000\360\002O\245\377\177\000\000\377\001\000\000\000\000\000\000\231\rh\000\000\000\000\000\340\005O\245\377\177\000\000p\242\323,\301\177\000\000\001\200\255\373\000\000\000\000\340\005O\245\377\177\000\000\340\005O\245\377\177\000\000\340\005O\245\377\177\000\000\340\005O\245\377\177\000\000\020\006O\245\377\177\000\000\337\aO\245\377\177\000\000\340\005O\245\377\177\000\000\337\aO\245\377\177",
'\000' <repeats 46 times>, "\004", '\000' <repeats 35 times>,
"@\002O\245\377\177\000\000\340\003O\245\377\177\000\000\000\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000@\bO\245\377\177\000\000\377\377\377\377\000\000\000\000\310\005c\000\000\000\000\000\340\003O\245\377\177\000\000\300\217\373,\301\177\000\000\000\000\000\000\000\000\000\000\340"...,
tile = -1521547376, event = 32767, conn_id = 26940592}
hostname = "teacup\000\000\240\aO\245\377\177\000\000
\023\233\001\000\000\000\000\265\221\306,\301\177", '\000' <repeats 26
times>"\330, \bO\245\377\177\000\000
\023\233\001\000\000\000\000\001\000\000\000\000\000\000\000\220\034\233\001",
'\000' <repeats 68 times>"\330,
\bO\245\377\177\000\000\310\005c\000\000\000\000\000
\023\233\001\000\000\000\000\006\000\000\000\000\000\000\000\240\032\233\001\000\000\000\000\020\tO\245\377\177\000\000]\215\306,\301\177\000\000C\000_GB.UTF-8\000\301\177\000\000\000\000\000\000\000\000\000\000\200\211\306,\301\177\000\000LC_MESSAGES/freeciv.mo\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\000S\211\036\006x\206\214en_GB.UT`\bO\245\377\177\000\000\240
\214\000\000\000\000\000"...
__FUNCTION__ = "establish_new_connection"
#6 0x0000000000482b59 in handle_login_request (pconn=0x8c20a0,
req=0x2207750)
at connecthand.c:416
msg = '\000' <repeats 377 times>,
"S\211\036\006x\206\214\000\000\000\000\000\000\000\000\t\000\000\000\000\000\000\000d\rO\245\377\177\000\000\001\000\000\000\000\000\000\000p\031\214\000\000\000\000\000\310*O\245\377\177\000\000\354*O\245\377\177\000\000\353\221H\000\000\000\000\000\t\000\000\000civ1",
'\000' <repeats 60 times>, "civ2", '\000' <repeats 49 times>,
"S\211\036\006x\206\214\000\000\000\000civ2\000\000\000\000\000\000\000\000p\031\214\000\000\000\000\000\020\fO\245\377\177\000\000\020\fO\245\377\177\000\000\000\000\000\000\000\000\000\000P\fO\245\377\177\000\000\261\031[\000\000\000\000\000p\031\214",
'\000' <repeats 13 times>"\260,
#\233\001\000\000\000\000\274\rH\000\000\000\000\000
\fO\245\377\177\000\000P\rO\245\377\177\000\000\003\000\000\000"...
kick_time_remaining = <value optimised out>
__FUNCTION__ = "handle_login_request"
#7 0x000000000043aaa5 in server_packet_input (pconn=0x8c20a0, packet=0x0,
type=53184736) at srv_main.c:1531
pplayer = <value optimised out>
__FUNCTION__ = "server_packet_input"
#8 0x00000000004c64aa in incoming_client_packets () at sernet.c:457
command_ok = <value optimised out>
packet = {data = 0x2207750, type = PACKET_SERVER_JOIN_REQ}
#9 server_sniff_all_input () at sernet.c:834
pconn = 0x8c20a0
nb = <value optimised out>
i = <value optimised out>
s = <value optimised out>
max_desc = <value optimised out>
readfs = {fds_bits = {256, 0 <repeats 15 times>}}
writefs = {fds_bits = {0 <repeats 16 times>}}
exceptfs = {fds_bits = {0 <repeats 16 times>}}
tv = {tv_sec = 0, tv_usec = 999996}
__FUNCTION__ = "server_sniff_all_input"
#10 0x000000000043c8ad in srv_running () at srv_main.c:2304
eot_timer = 0x39497d0
save_counter = 1
i = 0
is_new_turn = <value optimised out>
need_send_pending_events = false
__FUNCTION__ = "srv_running"
#11 0x000000000043d632 in srv_main () at srv_main.c:2764
__FUNCTION__ = "srv_main"
#12 0x0000000000433f9f in main (argc=<value optimised out>,
argv=0x7fffa54f3208) at civserver.c:453
inx = 5
showhelp = false
showvers = false
option = 0x0
__FUNCTION__ = "main"
(I note that this is a map of 78 x 52 = 4056 tiles, so it looks like there are
two assertion failures per tile. I haven't checked if they have different
backtraces.)
A similar thing happens if the delegate 'pamcakes' just leaves the game,
without 'herp' reconnecting. So it may be something to do with the process of
detaching the delegate from the player. This is probably the simpler case to
debug, but I haven't double-checked the backtraces etc are exactly the same.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?20490>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev