Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] (PR#4175) Core on input_from_server: fd != aconnection.soc
Home

[Freeciv-Dev] (PR#4175) Core on input_from_server: fd != aconnection.soc

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] (PR#4175) Core on input_from_server: fd != aconnection.sock
From: "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 5 May 2003 19:04:19 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, May 05, 2003 at 01:21:13AM -0700, ChrisK@xxxxxxxx wrote:
> It is still easy to crash the client by simply holding the return
> key pressed in the connect dialog:
> 
> chris@max:~> civclient -t trident -P none
> 2: lost connection to server
> 2: letzte Mitteilung 2mal wiederholt
> 2: letzte Mitteilung 2mal wiederholt (insgesamt 4 Wiederholungen)
> 2: letzte Mitteilung 4mal wiederholt (insgesamt 8 Wiederholungen)
> 2: letzte Mitteilung 1mal wiederholt (insgesamt 9 Wiederholungen)
> 1: Unexpected buffers in try_to_connect()
> civclient: clinet.c:320: input_from_server: Zusicherung »fd ==
> aconnection.sock« nicht erfüllt.
> Abgebrochen (core dumped)
> 
> civserver:
> 2: chris von localhost erbittet Verbindung.
> 2: c12 hat Client 1.14.1-devel.
> > 
> 2: Rejected connection from localhost with duplicate login name.
> > 
> 2: Verbindung verloren: chris von localhost (Verbindung unvollständig).

I looked at this, and I can't reproduce this on cvs by entering a blank
name and getting rejected, which is as close as cvs can get to doing this
bug. This doesn't mean that my patch has the problem, it may just be
tickling an underlying bug.

Clearly, the fd that the client is getting from get_net_input is wrong, but
I don't see how. running the client in gdb and watching aconnection.sock, I
couldn't get the bug to trip which means little to me except that the
timing inside the debugger might change the conditions enough. I'm CCing 
vasc since the root of this may be a gtk problem in the gdk_input_add stuff.

I was able to crash both the GTK1.2 and GTK2.0 clients.

#0  0x4044c021 in __kill () at __kill:-1
#1  0x4044bca8 in raise (sig=1079317428) at ../sysdeps/posix/raise.c:27
#2  0x4044d56c in *__GI_abort () at ../sysdeps/generic/abort.c:88
#3  0x4044501a in *__GI___assert_fail (assertion=0x0, file=0x0, line=0, 
    function=0x80e0a21 "input_from_server") at assert.c:83
#4  0x0806a4fe in input_from_server (fd=4) at clinet.c:337
#5  0x40287de2 in gdk_io_invoke (source=0x0, condition=0, data=0x84932e0)
    at gdkevents.c:946
#6  0x403ea15f in g_io_unix_dispatch (source=0x1, callback=0x84932e0, 
    user_data=0x0) at giounix.c:159
#7  0x403c8ca5 in g_main_dispatch (context=0x82ba698) at gmain.c:1653
#8  0x403c9d18 in g_main_context_dispatch (context=0x82ba698) at
gmain.c:2197
#9  0x403ca02d in g_main_context_iterate (context=0x82ba698, block=1, 
    dispatch=1, self=0x828c098) at gmain.c:2278
#10 0x403ca72f in g_main_loop_run (loop=0x8472c90) at gmain.c:2498
#11 0x400eff3f in gtk_main () at gtkmain.c:1092
#12 0x0809b437 in ui_main (argc=1, argv=0xbffffd24) at gui_main.c:1164
#13 0x08066650 in main (argc=1, argv=0xbffffd24) at civclient.c:238
#14 0x40437fa4 in __libc_start_main (main=0x8066430 <main>, argc=1, 
    ubp_av=0xbffffd24, init=0x806195c <_init>, fini=0x40015640
<_rtld_local>, 
    rtld_fini=0x6, stack_end=0x405513b4) at
../sysdeps/generic/libc-start.c:1

Vasc, do you have an opinion?

-mike



[Prev in Thread] Current Thread [Next in Thread]