frequent "timeout 08" timeouts

All your MAngband related technical questions answered. Problems compiling or running the game/server? No problem! Ask here.
Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

frequent "timeout 08" timeouts

Post by Minstrel » Thu 02.10.2008, 01:09

Just compiled on debian etch and everything runs fine except that the game closes out with a "Quitting: timeout 08" message any time I idle for more than a few seconds. If I'm constantly moving, typing, etc, it's fine, but if I just sit there without sending any input it crashes out. Any ideas?

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: frequent "timeout 08" timeouts

Post by Flambard » Thu 02.10.2008, 05:42

Are you trying to play on the internet, or running a local server? If it's on internet, do you have the same problem locally?

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Thu 02.10.2008, 19:04

It's on the internet, default server. I'll give it a try with a local server to see.

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Fri 03.10.2008, 04:08

Yep same issue when connecting to localhost as the server.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: frequent "timeout 08" timeouts

Post by Flambard » Tue 04.11.2008, 13:58

Unfortunately, there is no answer.. This problem was reported before, and it was just reported again, but it is very hard to tell what's the deal with it remotly. Gaining some access to your box would definitly shed more light, but that is simply not how support is done. So if you think you could provide any additional/debug info, please do.

I know that's not a very good reply, and am sorry.

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Mon 10.11.2008, 20:36

I'll check out the logs on my box to see if there is anything additional I can post.

It's also set up to dual boot to win XP, so I'll install the Windows client when I have a chance to eliminate the possibility of network issues. My laptop running SUSE works fine, but it's on a different part of the home network.

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Fri 28.11.2008, 15:24

Runs without issue on WinXP on the same PC. Will post more with log info from the unix install later.

Billsey
King Vampire
Posts: 272
Joined: Sun 12.02.2006, 14:36
Location: Oregon, USA
Contact:

Re: frequent "timeout 08" timeouts

Post by Billsey » Sun 30.11.2008, 06:10

Any chance the build has got a little too much optimization happening that could screw with the timing? Try a Debian compile with debugging on and see if it acts differently...
Mangband Project Team Member

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Wed 03.12.2008, 01:50

I'm afraid I'm not the most technically savvy linux user out there. Did you mean to make the executable using the -d flag? If so, I did that and it behaves as before. I'm not sure where to look in the debugging into that got output to find anything giving any clues.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: frequent "timeout 08" timeouts

Post by Flambard » Thu 04.12.2008, 09:49

Are you running a 64-bit system by any chance?

Could you run this program and copy the output here?

Code: Select all

#include <stdio.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>

#if defined(__alpha) || defined(__amd64__)
# define L64
typedef unsigned int u32b;
#else
typedef unsigned long u32b;
#endif

int	ticks	= 0;	// 100ms ticks
u32b	mticks	= 0;	// 1ms	 ticks

int	start_tick = 0;
int	delay = 10000;
int	pings = 0;

void update_ticks2()
{
	struct timeval cur_time;
	gettimeofday(&cur_time, NULL);

	mticks = cur_time.tv_sec;
	ticks = cur_time.tv_sec;

	if (!start_tick) start_tick = ticks;
}

void update_ticks()
{
	struct timeval cur_time;
	int newticks;
	float scale = 100000;
	int mins, hours;
	
	gettimeofday(&cur_time, NULL);

	newticks = ticks - (ticks % 10);

	newticks += cur_time.tv_usec / scale;

	if (newticks < ticks) newticks += 10;

	ticks = newticks;

	mticks = (long)(hours * 3600 * 100) +
		 (long)(mins * 60 * 100) +
		 (long)(cur_time.tv_sec * 100) +
		cur_time.tv_usec / ((scale/100)/10) ;

	if (!start_tick) start_tick = ticks;
}

void do_keepalive()
{
	static u32b last_sent;
	if ((mticks - last_sent) > delay)
	{
		printf("%ld (+%ld) * PING [+%d] \n", mticks, mticks - last_sent, ticks - start_tick);
		last_sent = mticks;
		pings++;
	}
}

void print_limits()
{
    int char_min = CHAR_MIN;

    printf("\n--------------[%d]----------------", sizeof(u32b));
    printf("\n        Character Types\n");
    printf("Number of bits in a character: %d\n",
        CHAR_BIT);
    printf("Size of character types is %d byte\n",
        (int)sizeof(char));
    printf("Signed char min: %d max: %d\n",
        SCHAR_MIN, SCHAR_MAX);
    printf("Unsigned char min: 0 max: %u\n",
        (unsigned int)UCHAR_MAX);

    printf("Default char is ");
    if (char_min < 0)
        printf("signed\n");
    else if (char_min == 0)
        printf("unsigned\n");
    else
        printf("non-standard\n");

    printf("\n        Short Int Types\n");
    printf("Size of short int types is %d bytes\n",
        (int)sizeof(short));
    printf("Signed short min: %d max: %d\n",
        SHRT_MIN, SHRT_MAX);
    printf("Unsigned short min: 0 max: %u\n",
        (unsigned int)USHRT_MAX);

    printf("\n           Int Types\n");
    printf("Size of int types is %d bytes\n",
        (int)sizeof(int));
    printf("Signed int min: %d max: %d\n",
        INT_MIN, INT_MAX);
    printf("Unsigned int min: 0 max: %u\n",
        (unsigned int)UINT_MAX);

    printf("\n        Long Int Types\n");
    printf("Size of long int types is %d bytes\n",
        (int)sizeof(long));
    printf("Signed long min: %ld max: %ld\n",
        LONG_MIN, LONG_MAX);
    printf("Unsigned long min: 0 max: %lu\n",
        ULONG_MAX);
}

int main(void)
{	
	int ch;
	int i;

	print_limits();

	printf("\n\nMethod I.\n\nPlease wait...\n");
	for (i = 0; i < 2*60000; i++)
	{
		update_ticks();
		do_keepalive();
		usleep(100);
	}
	printf("\n Total pings: %d \n", pings);

	printf("\n\nMethod II.\n\nPlease wait...\n");
	delay = 0; start_tick = 0; pings = 0;
	for (i = 0; i < 2*60000; i++)
	{
		update_ticks2();
		do_keepalive();
		usleep(100);
	}
	printf("\n Total pings: %d \n", pings);

    return 0;
}


Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Thu 04.12.2008, 14:10

Yes, I am running a 64 bit install. I'll let you know the results hopefully this weekend.

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Sat 06.12.2008, 18:44

Output is below...

Code: Select all

06:19 PM donald@donandmegan:~$ ./a.out

--------------[4]----------------
        Character Types
Number of bits in a character: 8
Size of character types is 1 byte
Signed char min: -128 max: 127
Unsigned char min: 0 max: 255
Default char is signed

        Short Int Types
Size of short int types is 2 bytes
Signed short min: -32768 max: 32767
Unsigned short min: 0 max: 65535

           Int Types
Size of int types is 4 bytes
Signed int min: -2147483648 max: 2147483647
Unsigned int min: 0 max: 4294967295

        Long Int Types
Size of long int types is 8 bytes
Signed long min: -9223372036854775808 max: 9223372036854775807
Unsigned long min: 0 max: 18446744073709551615


Method I.

Please wait...
1963442176 (+1963442176) * PING [+0]
138633216 (+2470158336) * PING [+0]
138649600 (+16384) * PING [+30]
138641408 (+4294959104) * PING [+36]
138657792 (+16384) * PING [+850]
138649600 (+4294959104) * PING [+856]
138665984 (+16384) * PING [+1670]
138657792 (+4294959104) * PING [+1676]
138674176 (+16384) * PING [+2480]
138665984 (+4294959104) * PING [+2486]
138682368 (+16384) * PING [+3300]
138674176 (+4294959104) * PING [+3306]
138690560 (+16384) * PING [+4120]
138682368 (+4294959104) * PING [+4126]

 Total pings: 14


Method II.

Please wait...
1228588089 (+1089905721) * PING [+0]
1228588090 (+1) * PING [+1]
1228588091 (+1) * PING [+2]
1228588092 (+1) * PING [+3]
1228588093 (+1) * PING [+4]
1228588094 (+1) * PING [+5]
1228588095 (+1) * PING [+6]
1228588096 (+1) * PING [+7]
1228588097 (+1) * PING [+8]
1228588098 (+1) * PING [+9]
1228588099 (+1) * PING [+10]
1228588100 (+1) * PING [+11]
1228588101 (+1) * PING [+12]
1228588102 (+1) * PING [+13]
1228588103 (+1) * PING [+14]
1228588104 (+1) * PING [+15]
1228588105 (+1) * PING [+16]
1228588106 (+1) * PING [+17]
1228588107 (+1) * PING [+18]
1228588108 (+1) * PING [+19]
1228588109 (+1) * PING [+20]
1228588110 (+1) * PING [+21]
1228588111 (+1) * PING [+22]
1228588112 (+1) * PING [+23]
1228588113 (+1) * PING [+24]
1228588114 (+1) * PING [+25]
1228588115 (+1) * PING [+26]
1228588116 (+1) * PING [+27]
1228588117 (+1) * PING [+28]
1228588118 (+1) * PING [+29]
1228588119 (+1) * PING [+30]
1228588120 (+1) * PING [+31]
1228588121 (+1) * PING [+32]
1228588122 (+1) * PING [+33]
1228588123 (+1) * PING [+34]
1228588124 (+1) * PING [+35]
1228588125 (+1) * PING [+36]
1228588126 (+1) * PING [+37]
1228588127 (+1) * PING [+38]
1228588128 (+1) * PING [+39]
1228588129 (+1) * PING [+40]
1228588130 (+1) * PING [+41]
1228588131 (+1) * PING [+42]
1228588132 (+1) * PING [+43]
1228588133 (+1) * PING [+44]
1228588134 (+1) * PING [+45]
1228588135 (+1) * PING [+46]
1228588136 (+1) * PING [+47]
1228588137 (+1) * PING [+48]
1228588138 (+1) * PING [+49]
1228588139 (+1) * PING [+50]
1228588140 (+1) * PING [+51]
1228588141 (+1) * PING [+52]
1228588142 (+1) * PING [+53]
1228588143 (+1) * PING [+54]
1228588144 (+1) * PING [+55]
1228588145 (+1) * PING [+56]
1228588146 (+1) * PING [+57]
1228588147 (+1) * PING [+58]
1228588148 (+1) * PING [+59]
1228588149 (+1) * PING [+60]
1228588150 (+1) * PING [+61]
1228588151 (+1) * PING [+62]
1228588152 (+1) * PING [+63]
1228588153 (+1) * PING [+64]
1228588154 (+1) * PING [+65]
1228588155 (+1) * PING [+66]
1228588156 (+1) * PING [+67]
1228588157 (+1) * PING [+68]
1228588158 (+1) * PING [+69]
1228588159 (+1) * PING [+70]
1228588160 (+1) * PING [+71]
1228588161 (+1) * PING [+72]
1228588162 (+1) * PING [+73]
1228588163 (+1) * PING [+74]
1228588164 (+1) * PING [+75]
1228588165 (+1) * PING [+76]
1228588166 (+1) * PING [+77]
1228588167 (+1) * PING [+78]
1228588168 (+1) * PING [+79]
1228588169 (+1) * PING [+80]
1228588170 (+1) * PING [+81]
1228588171 (+1) * PING [+82]
1228588172 (+1) * PING [+83]
1228588173 (+1) * PING [+84]
1228588174 (+1) * PING [+85]
1228588175 (+1) * PING [+86]
1228588176 (+1) * PING [+87]
1228588177 (+1) * PING [+88]
1228588178 (+1) * PING [+89]
1228588179 (+1) * PING [+90]
1228588180 (+1) * PING [+91]
1228588181 (+1) * PING [+92]
1228588182 (+1) * PING [+93]
1228588183 (+1) * PING [+94]
1228588184 (+1) * PING [+95]
1228588185 (+1) * PING [+96]
1228588186 (+1) * PING [+97]
1228588187 (+1) * PING [+98]
1228588188 (+1) * PING [+99]
1228588189 (+1) * PING [+100]
1228588190 (+1) * PING [+101]
1228588191 (+1) * PING [+102]
1228588192 (+1) * PING [+103]
1228588193 (+1) * PING [+104]
1228588194 (+1) * PING [+105]
1228588195 (+1) * PING [+106]
1228588196 (+1) * PING [+107]
1228588197 (+1) * PING [+108]
1228588198 (+1) * PING [+109]
1228588199 (+1) * PING [+110]
1228588200 (+1) * PING [+111]
1228588201 (+1) * PING [+112]
1228588202 (+1) * PING [+113]
1228588203 (+1) * PING [+114]
1228588204 (+1) * PING [+115]
1228588205 (+1) * PING [+116]
1228588206 (+1) * PING [+117]
1228588207 (+1) * PING [+118]
1228588208 (+1) * PING [+119]
1228588209 (+1) * PING [+120]
1228588210 (+1) * PING [+121]
1228588211 (+1) * PING [+122]
1228588212 (+1) * PING [+123]
1228588213 (+1) * PING [+124]
1228588214 (+1) * PING [+125]
1228588215 (+1) * PING [+126]
1228588216 (+1) * PING [+127]
1228588217 (+1) * PING [+128]
1228588218 (+1) * PING [+129]
1228588219 (+1) * PING [+130]
1228588220 (+1) * PING [+131]
1228588221 (+1) * PING [+132]
1228588222 (+1) * PING [+133]
1228588223 (+1) * PING [+134]
1228588224 (+1) * PING [+135]
1228588225 (+1) * PING [+136]
1228588226 (+1) * PING [+137]
1228588227 (+1) * PING [+138]
1228588228 (+1) * PING [+139]
1228588229 (+1) * PING [+140]
1228588230 (+1) * PING [+141]
1228588231 (+1) * PING [+142]
1228588232 (+1) * PING [+143]
1228588233 (+1) * PING [+144]
1228588234 (+1) * PING [+145]
1228588235 (+1) * PING [+146]
1228588236 (+1) * PING [+147]
1228588237 (+1) * PING [+148]
1228588238 (+1) * PING [+149]
1228588239 (+1) * PING [+150]
1228588240 (+1) * PING [+151]
1228588241 (+1) * PING [+152]
1228588242 (+1) * PING [+153]
1228588243 (+1) * PING [+154]
1228588244 (+1) * PING [+155]
1228588245 (+1) * PING [+156]
1228588246 (+1) * PING [+157]
1228588247 (+1) * PING [+158]
1228588248 (+1) * PING [+159]
1228588249 (+1) * PING [+160]
1228588250 (+1) * PING [+161]
1228588251 (+1) * PING [+162]
1228588252 (+1) * PING [+163]
1228588253 (+1) * PING [+164]
1228588254 (+1) * PING [+165]
1228588255 (+1) * PING [+166]
1228588256 (+1) * PING [+167]
1228588257 (+1) * PING [+168]
1228588258 (+1) * PING [+169]
1228588259 (+1) * PING [+170]
1228588260 (+1) * PING [+171]
1228588261 (+1) * PING [+172]
1228588262 (+1) * PING [+173]
1228588263 (+1) * PING [+174]
1228588264 (+1) * PING [+175]
1228588265 (+1) * PING [+176]
1228588266 (+1) * PING [+177]
1228588267 (+1) * PING [+178]
1228588268 (+1) * PING [+179]
1228588269 (+1) * PING [+180]
1228588270 (+1) * PING [+181]
1228588271 (+1) * PING [+182]
1228588272 (+1) * PING [+183]
1228588273 (+1) * PING [+184]
1228588274 (+1) * PING [+185]
1228588275 (+1) * PING [+186]
1228588276 (+1) * PING [+187]
1228588277 (+1) * PING [+188]
1228588278 (+1) * PING [+189]
1228588279 (+1) * PING [+190]
1228588280 (+1) * PING [+191]
1228588281 (+1) * PING [+192]
1228588282 (+1) * PING [+193]
1228588283 (+1) * PING [+194]
1228588284 (+1) * PING [+195]
1228588285 (+1) * PING [+196]
1228588286 (+1) * PING [+197]
1228588287 (+1) * PING [+198]
1228588288 (+1) * PING [+199]
1228588289 (+1) * PING [+200]
1228588290 (+1) * PING [+201]
1228588291 (+1) * PING [+202]
1228588292 (+1) * PING [+203]
1228588293 (+1) * PING [+204]
1228588294 (+1) * PING [+205]
1228588295 (+1) * PING [+206]
1228588296 (+1) * PING [+207]
1228588297 (+1) * PING [+208]
1228588298 (+1) * PING [+209]
1228588299 (+1) * PING [+210]
1228588300 (+1) * PING [+211]
1228588301 (+1) * PING [+212]
1228588302 (+1) * PING [+213]
1228588303 (+1) * PING [+214]
1228588304 (+1) * PING [+215]
1228588305 (+1) * PING [+216]
1228588306 (+1) * PING [+217]
1228588307 (+1) * PING [+218]
1228588308 (+1) * PING [+219]
1228588309 (+1) * PING [+220]
1228588310 (+1) * PING [+221]
1228588311 (+1) * PING [+222]
1228588312 (+1) * PING [+223]
1228588313 (+1) * PING [+224]
1228588314 (+1) * PING [+225]
1228588315 (+1) * PING [+226]
1228588316 (+1) * PING [+227]
1228588317 (+1) * PING [+228]
1228588318 (+1) * PING [+229]
1228588319 (+1) * PING [+230]
1228588320 (+1) * PING [+231]
1228588321 (+1) * PING [+232]
1228588322 (+1) * PING [+233]
1228588323 (+1) * PING [+234]
1228588324 (+1) * PING [+235]
1228588325 (+1) * PING [+236]
1228588326 (+1) * PING [+237]
1228588327 (+1) * PING [+238]
1228588328 (+1) * PING [+239]
1228588329 (+1) * PING [+240]
1228588330 (+1) * PING [+241]
1228588331 (+1) * PING [+242]
1228588332 (+1) * PING [+243]
1228588333 (+1) * PING [+244]
1228588334 (+1) * PING [+245]
1228588335 (+1) * PING [+246]
1228588336 (+1) * PING [+247]
1228588337 (+1) * PING [+248]
1228588338 (+1) * PING [+249]
1228588339 (+1) * PING [+250]
1228588340 (+1) * PING [+251]
1228588341 (+1) * PING [+252]
1228588342 (+1) * PING [+253]
1228588343 (+1) * PING [+254]
1228588344 (+1) * PING [+255]
1228588345 (+1) * PING [+256]
1228588346 (+1) * PING [+257]
1228588347 (+1) * PING [+258]
1228588348 (+1) * PING [+259]
1228588349 (+1) * PING [+260]
1228588350 (+1) * PING [+261]
1228588351 (+1) * PING [+262]
1228588352 (+1) * PING [+263]
1228588353 (+1) * PING [+264]
1228588354 (+1) * PING [+265]
1228588355 (+1) * PING [+266]
1228588356 (+1) * PING [+267]
1228588357 (+1) * PING [+268]
1228588358 (+1) * PING [+269]
1228588359 (+1) * PING [+270]
1228588360 (+1) * PING [+271]
1228588361 (+1) * PING [+272]
1228588362 (+1) * PING [+273]
1228588363 (+1) * PING [+274]
1228588364 (+1) * PING [+275]
1228588365 (+1) * PING [+276]
1228588366 (+1) * PING [+277]
1228588367 (+1) * PING [+278]
1228588368 (+1) * PING [+279]
1228588369 (+1) * PING [+280]
1228588370 (+1) * PING [+281]
1228588371 (+1) * PING [+282]
1228588372 (+1) * PING [+283]
1228588373 (+1) * PING [+284]
1228588374 (+1) * PING [+285]
1228588375 (+1) * PING [+286]
1228588376 (+1) * PING [+287]
1228588377 (+1) * PING [+288]
1228588378 (+1) * PING [+289]
1228588379 (+1) * PING [+290]
1228588380 (+1) * PING [+291]
1228588381 (+1) * PING [+292]
1228588382 (+1) * PING [+293]
1228588383 (+1) * PING [+294]
1228588384 (+1) * PING [+295]
1228588385 (+1) * PING [+296]
1228588386 (+1) * PING [+297]
1228588387 (+1) * PING [+298]
1228588388 (+1) * PING [+299]
1228588389 (+1) * PING [+300]
1228588390 (+1) * PING [+301]
1228588391 (+1) * PING [+302]
1228588392 (+1) * PING [+303]
1228588393 (+1) * PING [+304]
1228588394 (+1) * PING [+305]
1228588395 (+1) * PING [+306]
1228588396 (+1) * PING [+307]
1228588397 (+1) * PING [+308]
1228588398 (+1) * PING [+309]
1228588399 (+1) * PING [+310]
1228588400 (+1) * PING [+311]
1228588401 (+1) * PING [+312]
1228588402 (+1) * PING [+313]
1228588403 (+1) * PING [+314]
1228588404 (+1) * PING [+315]
1228588405 (+1) * PING [+316]
1228588406 (+1) * PING [+317]
1228588407 (+1) * PING [+318]
1228588408 (+1) * PING [+319]
1228588409 (+1) * PING [+320]
1228588410 (+1) * PING [+321]
1228588411 (+1) * PING [+322]
1228588412 (+1) * PING [+323]
1228588413 (+1) * PING [+324]
1228588414 (+1) * PING [+325]
1228588415 (+1) * PING [+326]
1228588416 (+1) * PING [+327]
1228588417 (+1) * PING [+328]
1228588418 (+1) * PING [+329]
1228588419 (+1) * PING [+330]
1228588420 (+1) * PING [+331]
1228588421 (+1) * PING [+332]
1228588422 (+1) * PING [+333]
1228588423 (+1) * PING [+334]
1228588424 (+1) * PING [+335]
1228588425 (+1) * PING [+336]
1228588426 (+1) * PING [+337]
1228588427 (+1) * PING [+338]
1228588428 (+1) * PING [+339]
1228588429 (+1) * PING [+340]
1228588430 (+1) * PING [+341]
1228588431 (+1) * PING [+342]
1228588432 (+1) * PING [+343]
1228588433 (+1) * PING [+344]
1228588434 (+1) * PING [+345]
1228588435 (+1) * PING [+346]
1228588436 (+1) * PING [+347]
1228588437 (+1) * PING [+348]
1228588438 (+1) * PING [+349]
1228588439 (+1) * PING [+350]
1228588440 (+1) * PING [+351]
1228588441 (+1) * PING [+352]
1228588442 (+1) * PING [+353]
1228588443 (+1) * PING [+354]
1228588444 (+1) * PING [+355]
1228588445 (+1) * PING [+356]
1228588446 (+1) * PING [+357]
1228588447 (+1) * PING [+358]
1228588448 (+1) * PING [+359]
1228588449 (+1) * PING [+360]
1228588450 (+1) * PING [+361]
1228588451 (+1) * PING [+362]
1228588452 (+1) * PING [+363]
1228588453 (+1) * PING [+364]
1228588454 (+1) * PING [+365]
1228588455 (+1) * PING [+366]
1228588456 (+1) * PING [+367]
1228588457 (+1) * PING [+368]
1228588458 (+1) * PING [+369]
1228588459 (+1) * PING [+370]
1228588460 (+1) * PING [+371]
1228588461 (+1) * PING [+372]
1228588462 (+1) * PING [+373]
1228588463 (+1) * PING [+374]
1228588464 (+1) * PING [+375]
1228588465 (+1) * PING [+376]
1228588466 (+1) * PING [+377]
1228588467 (+1) * PING [+378]
1228588468 (+1) * PING [+379]
1228588469 (+1) * PING [+380]
1228588470 (+1) * PING [+381]
1228588471 (+1) * PING [+382]
1228588472 (+1) * PING [+383]
1228588473 (+1) * PING [+384]
1228588474 (+1) * PING [+385]
1228588475 (+1) * PING [+386]
1228588476 (+1) * PING [+387]
1228588477 (+1) * PING [+388]
1228588478 (+1) * PING [+389]
1228588479 (+1) * PING [+390]
1228588480 (+1) * PING [+391]
1228588481 (+1) * PING [+392]
1228588482 (+1) * PING [+393]
1228588483 (+1) * PING [+394]
1228588484 (+1) * PING [+395]
1228588485 (+1) * PING [+396]
1228588486 (+1) * PING [+397]
1228588487 (+1) * PING [+398]
1228588488 (+1) * PING [+399]
1228588489 (+1) * PING [+400]
1228588490 (+1) * PING [+401]
1228588491 (+1) * PING [+402]
1228588492 (+1) * PING [+403]
1228588493 (+1) * PING [+404]
1228588494 (+1) * PING [+405]
1228588495 (+1) * PING [+406]
1228588496 (+1) * PING [+407]
1228588497 (+1) * PING [+408]
1228588498 (+1) * PING [+409]
1228588499 (+1) * PING [+410]
1228588500 (+1) * PING [+411]
1228588501 (+1) * PING [+412]
1228588502 (+1) * PING [+413]
1228588503 (+1) * PING [+414]
1228588504 (+1) * PING [+415]
1228588505 (+1) * PING [+416]
1228588506 (+1) * PING [+417]
1228588507 (+1) * PING [+418]
1228588508 (+1) * PING [+419]
1228588509 (+1) * PING [+420]
1228588510 (+1) * PING [+421]
1228588511 (+1) * PING [+422]
1228588512 (+1) * PING [+423]
1228588513 (+1) * PING [+424]
1228588514 (+1) * PING [+425]
1228588515 (+1) * PING [+426]
1228588516 (+1) * PING [+427]
1228588517 (+1) * PING [+428]
1228588518 (+1) * PING [+429]
1228588519 (+1) * PING [+430]
1228588520 (+1) * PING [+431]
1228588521 (+1) * PING [+432]
1228588522 (+1) * PING [+433]
1228588523 (+1) * PING [+434]
1228588524 (+1) * PING [+435]
1228588525 (+1) * PING [+436]
1228588526 (+1) * PING [+437]
1228588527 (+1) * PING [+438]
1228588528 (+1) * PING [+439]
1228588529 (+1) * PING [+440]
1228588530 (+1) * PING [+441]
1228588531 (+1) * PING [+442]
1228588532 (+1) * PING [+443]
1228588533 (+1) * PING [+444]
1228588534 (+1) * PING [+445]
1228588535 (+1) * PING [+446]
1228588536 (+1) * PING [+447]
1228588537 (+1) * PING [+448]
1228588538 (+1) * PING [+449]
1228588539 (+1) * PING [+450]
1228588540 (+1) * PING [+451]
1228588541 (+1) * PING [+452]
1228588542 (+1) * PING [+453]
1228588543 (+1) * PING [+454]
1228588544 (+1) * PING [+455]
1228588545 (+1) * PING [+456]
1228588546 (+1) * PING [+457]
1228588547 (+1) * PING [+458]
1228588548 (+1) * PING [+459]
1228588549 (+1) * PING [+460]
1228588550 (+1) * PING [+461]
1228588551 (+1) * PING [+462]
1228588552 (+1) * PING [+463]
1228588553 (+1) * PING [+464]
1228588554 (+1) * PING [+465]
1228588555 (+1) * PING [+466]
1228588556 (+1) * PING [+467]
1228588557 (+1) * PING [+468]
1228588558 (+1) * PING [+469]
1228588559 (+1) * PING [+470]
1228588560 (+1) * PING [+471]
1228588561 (+1) * PING [+472]
1228588562 (+1) * PING [+473]
1228588563 (+1) * PING [+474]
1228588564 (+1) * PING [+475]
1228588565 (+1) * PING [+476]
1228588566 (+1) * PING [+477]
1228588567 (+1) * PING [+478]
1228588568 (+1) * PING [+479]
1228588569 (+1) * PING [+480]
1228588570 (+1) * PING [+481]
1228588571 (+1) * PING [+482]
1228588572 (+1) * PING [+483]
1228588573 (+1) * PING [+484]
1228588574 (+1) * PING [+485]
1228588575 (+1) * PING [+486]
1228588576 (+1) * PING [+487]

 Total pings: 488
06:36 PM donald@donandmegan:~$

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: frequent "timeout 08" timeouts

Post by Flambard » Sun 07.12.2008, 08:46

Thanks for your time!

Those aren't the results I was expecting :( I was quite sure it had something to do with time resolution, and the machine being 64-bit hinted at the same direction.. However, "Method I" is what mangband uses, and "14 pings" is the correct result (I'm getting same ammount on my machine).. I guess I shall ask, How much time subjectivly did "Method I" took? It's my last straw really. But we'll look more into this.

Minstrel
Seedy Looking Human
Posts: 17
Joined: Thu 02.10.2008, 01:05

Re: frequent "timeout 08" timeouts

Post by Minstrel » Sun 07.12.2008, 13:44

Flambard wrote:...I guess I shall ask, How much time subjectivly did "Method I" took? It's my last straw really...
I'd run it again for a less subjective answer if I weren't running out the door shortly, but as I recall the first 8 lines or so of method 1 went by very fast, 10 seconds total perhaps. It took around another 2 minutes for method 1 to complete.

User avatar
Flambard
King Vampire
Posts: 258
Joined: Wed 20.06.2007, 10:49

Re: frequent "timeout 08" timeouts

Post by Flambard » Sun 07.12.2008, 22:36

It took around another 2 minutes for method 1 to complete.
Ah-ha, thank you. So it's timing issue afterall.

Luckily for you, we just received a notice the patch is on it's way. I guess we can do some preliminary testing... Does this code work ?

Code: Select all

#include <stdio.h>
#include <limits.h>
#include <time.h>
#include <sys/time.h>

#if defined(__alpha) || defined(__amd64__)
# define L64
typedef unsigned int u32b;
#else
typedef unsigned long u32b;
#endif

int   ticks   = 0;   // 100ms ticks
u32b   mticks   = 0;   // 1ms    ticks

int   start_tick = 0;
int   delay = 10000;
int   pings = 0;

void update_ticks()
{
   struct timeval cur_time;
   int newticks;
   float scale = 100000;
   int mins, hours;
   
   gettimeofday(&cur_time, NULL);

   newticks = ticks - (ticks % 10);

   newticks += cur_time.tv_usec / scale;

   if (newticks < ticks) newticks += 10;

   ticks = newticks;

   mticks = (long)(cur_time.tv_sec*100) + cur_time.tv_usec/((scale/100)/10) ;
   if (!start_tick) start_tick = ticks;
}

void do_keepalive()
{
   static u32b last_sent;
   if ((mticks - last_sent) > delay)
   {
      printf("%ld (+%ld) * PING [+%d] \n", mticks, mticks - last_sent, ticks - start_tick);
      last_sent = mticks;
      pings++;
   }
}

void print_limits()
{
    int char_min = CHAR_MIN;

    printf("\n--------------[%d]----------------", sizeof(u32b));
    printf("\n        Character Types\n");
    printf("Number of bits in a character: %d\n",
        CHAR_BIT);
    printf("Size of character types is %d byte\n",
        (int)sizeof(char));
    printf("Signed char min: %d max: %d\n",
        SCHAR_MIN, SCHAR_MAX);
    printf("Unsigned char min: 0 max: %u\n",
        (unsigned int)UCHAR_MAX);

    printf("Default char is ");
    if (char_min < 0)
        printf("signed\n");
    else if (char_min == 0)
        printf("unsigned\n");
    else
        printf("non-standard\n");

    printf("\n        Short Int Types\n");
    printf("Size of short int types is %d bytes\n",
        (int)sizeof(short));
    printf("Signed short min: %d max: %d\n",
        SHRT_MIN, SHRT_MAX);
    printf("Unsigned short min: 0 max: %u\n",
        (unsigned int)USHRT_MAX);

    printf("\n           Int Types\n");
    printf("Size of int types is %d bytes\n",
        (int)sizeof(int));
    printf("Signed int min: %d max: %d\n",
        INT_MIN, INT_MAX);
    printf("Unsigned int min: 0 max: %u\n",
        (unsigned int)UINT_MAX);

    printf("\n        Long Int Types\n");
    printf("Size of long int types is %d bytes\n",
        (int)sizeof(long));
    printf("Signed long min: %ld max: %ld\n",
        LONG_MIN, LONG_MAX);
    printf("Unsigned long min: 0 max: %lu\n",
        ULONG_MAX);
}

int main(void)
{   
   int ch;
   int i;

   //print_limits();

   printf("\n\nMethod I.\n\nPlease wait...\n");
   for (i = 0; i < 2*60000; i++)
   {
      update_ticks();
      do_keepalive();
      usleep(100);
   }
   printf("\n Total pings: %d \n", pings);
   return 0;
}
P.S. Ticket 748 was created to address the problem, but I'll keep you posted on this thread too :)

Post Reply