CCT Logon

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: CCT Logon (xboard 4.4.x bug)

Post by Michel »

There also is no response to the 'who' command I type on the console.
You typed

who CR/LF

whereas, as I pointed out above, the line terminator on FICS is LF/CR. Not saying this is the cause of the problem, but line termination issues often lead to weird behaviour when not properly addressed.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

Well, I typed only <Enter>, of course. How the OS passes this to XBoard I have no control over. But I think we can assume it always does it the same way. And usually typing 'who <Enter>' works...
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: CCT Logon (xboard 4.4.x bug)

Post by Michel »

Well, I typed only <Enter>, of course. How the OS passes this to XBoard I have no control over. But I think we can assume it always does it the same way. And usually typing 'who <Enter>' works...
Well to be absolutely sure perhaps next time you should type <Enter> twice. That creates a LF/CR sequence. If that doesn't make a difference then fine! There are definitely some line termination issues as a comment in the icsdrone source shows. But it is true that they occur in a predictable way.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

OK, the ultimate proof:

I downloaded openseal.c, and put fprintf statements in it to keep a log of all communiation between it and XBoard. After some tries I had a game that hung almost immediately,the log of which is shown below.
openseal log wrote:FICS -> 'fics% '
FICS -> 'fics% '
FICS <- 'match fairy 1 0
'
FICS -> 'Issuing: WBtester (----) FairyMax (----) unrated lightning 1 0.

'
FICS -> 'fics% '
FICS -> '

'
FICS -> 'FairyMax accepts the match offer.

'
FICS -> '

'
FICS -> 'Creating: FairyMax (++++) WBtester (++++) unrated lightning 1 0

'
FICS -> '{Game 60 (FairyMax vs. WBtester) Creating unrated lightning match.}

'
FICS -> '

'
FICS -> '<12> rnbqkbnr pppppppp -------- -------- -------- -------- PPPPPPPP RNBQKBNR W -1 1 1 1 1 0 60 FairyMax WBtester -1 1 0 39 39 60000 60000 1 none (0:00.000) none 1 0 0

'
FICS -> 'fics% '
FICS -> '

'
FICS -> '<12> rnbqkbnr pppppppp -------- -------- -------- -----N-- PPPPPPPP RNBQKB-R B -1 1 1 1 1 1 60 FairyMax WBtester 1 1 0 39 39 60000 60000 1 N/g1-f3 (0:00.000) Nf3 1 0 0

'
FICS -> 'fics% '
FICS <- 'f7f5
kibitz !!! +0.10/6 (0.56 sec, 89368 nodes, 159 knps) PV=f7f5 c2c4 b8c6 d2d4 g8f6 b1c3
'
FICS <- 'who
'
FICS <- 'tell fairy I am stuck!
'
So it gets the initial position, and Fairy-Max' first move. Then it plays its own first move (f7f5), sends the accompanying kibitz, and then... nothing! On the other board I see that Fairy-Max has played g2-g3. Not only does that move not arrive, but WBtester also does not get confirmation of its own move (which should also result in FICS sending a board) and its kibitz (no "(kibitzed to 1 player)" or "WBtester(U)(----)[60] kibitzes: ...", like you normally get), but there is no reply to the "who" command I type later. The "tell" I type does arrive in FairyMax' console. A "tell" I type there in reply never arrives. WB tester gets not notified that FairyMax resigns, and later quits.

So this is ironclad proof that the problem is not inside XBoard. The messages just stop coming in. In this case that can be a problem in openseal (but I also had the hangs not using it) or in the OS TCP/IP support. Or in FICS...

Of course it could still be that only XBoard triggers such an error, because it sends too much data, sends it too fast, or whatever. But that then just exposes the error. The error itself lies elsewhere,
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

It might seem strange that a hang occurs so early in the game, without any sign of trouble, but nte that this game was started immediately after the preceeding game, (which was in the phase of near-instant moving), where a large communication lag had built up. Normally that means I still get complaints from FICS about communication quota being exceeded or communication being queued in th first few moves of the next game.

So for completeness, the part of the log that went just before the hanging game:
openseal log wrote:FICS -> 'fics% '
FICS <- 'a7a8=Q
kibitz !!! +79.97/7 (0.25 sec, 80019 nodes, 319 knps) PV=a7a8 e4e5 f2f7 e5d6 a8d5
'
FICS -> '

'
FICS -> '<12> Q------- -------- -------- -------- ----k--- -KP---P- -----Q-- -------- B -1 0 0 0 0 0 222 WBtester FairyMax -1 1 0 20 0 10535 -2291 77 P/a7-a8=Q (0:00.257) a8=Q+ 0 1 234

'
FICS -> 'fics% '
FICS -> 'Your communication has been queued for 20 second(s).

'
FICS -> 'fics%

'
FICS -> '<12> Q------- -------- -------- ----k--- -------- -KP---P- -----Q-- -------- W -1 0 0 0 0 1 222 WBtester FairyMax 1 1 0 20 0 10535 -2651 78 K/e4-e5 (0:00.360) Ke5 0 1 0

'
FICS -> '

'
FICS -> 'fics% '
FICS <- 'f2f7
kibitz !!! +79.98/28 (0.06 sec, 63943 nodes, 1048 knps) PV=f2f7 e5d6 a8d5
'
FICS -> '

'
FICS -> '<12> Q------- -----Q-- -------- ----k--- -------- -KP---P- -------- -------- B -1 0 0 0 0 2 222 WBtester FairyMax -1 1 0 20 0 10396 -2651 78 Q/f2-f7 (0:00.139) Qf7 0 1 320

'
FICS -> 'fics% You have reached the communication quota; please retry in a few seconds.

'
FICS -> 'fics% '
FICS -> '

'
FICS -> '<12> Q------- -----Q-- ---k---- -------- -------- -KP---P- -------- -------- W -1 0 0 0 0 3 222 WBtester FairyMax 1 1 0 20 0 10396 -3029 79 K/e5-d6 (0:00.378) Kd6 0 1 0

'
FICS -> '

'
FICS -> 'fics% '
FICS <- 'a8d5
kibitz !!! +79.99/28 (0.00 sec, 636 nodes, 636 knps) PV=a8d5
'
FICS -> '

'
FICS -> 'WBtester(U)(----)[222] kibitzes: !!! +1.79/7 (0.19 sec, 33891 nodes, 177 knps)

'
FICS -> '\ PV=h5h6 e3e2 h6h7 e2e1 g6g7 c7c6

'
FICS -> '(kibitzed to 1 player)

'
FICS -> 'fics% '
FICS -> '

'
FICS -> '<12> -------- -----Q-- ---k---- ---Q---- -------- -KP---P- -------- -------- B -1 0 0 0 0 4 222 WBtester FairyMax -1 1 0 20 0 10296 -3029 79 Q/a8-d5 (0:00.100) Qad5# 0 1 401

'
FICS -> '

'
FICS -> '{Game 222 (WBtester vs. FairyMax) FairyMax checkmated} 1-0

'
FICS -> '

'
FICS -> 'No ratings adjustment done.

'
FICS -> 'fics% You are not playing or observing a game.

'
FICS -> 'fics% '
FICS <- 'gameend

'
FICS -> 'gameend: Command not found.

'
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

Michel wrote:Well to be absolutely sure perhaps next time you should type <Enter> twice. That creates a LF/CR sequence. If that doesn't make a difference then fine! There are definitely some line termination issues as a comment in the icsdrone source shows. But it is true that they occur in a predictable way.
I don't think that is worth it, as the "who" was just an example, and not of any importance in itself. As you can see there is also no reply from the tell, or the move, or the kibitz. While it is 100% sure FICS understood all of these, as the opponent did get the move, the kibitz and the tell.
xboard.debug wrote:2703040 >first : f7f5
AnimateMove: piece 22 slides from 5,6 to 5,4
nps: w=-1, b=-1
Display title 'FairyMax (39) vs. WBtester (39) {1 0}, gameInfo.variant = 0'
successful read from 8366d60
2703384 <first : 1 14 0 3 d2d4
2703384 <first : 1 17 0 5 c2c4
2703384 <first : 2 4 0 13 c2c4 b8c6
2703384 <first : 2 6 0 21 d2d4 a7a5
2703384 <first : 2 13 0 26 d2d3 c7c5
2703384 <first : 3 15 0 270 d2d3 c7c5 c2c4
2703384 <first : 4 11 0 1146 d2d3 b8c6 c2c4 g8f6
2703385 <first : 4 19 0 1324 d2d4 a7a5 b1c3 b8c6
2703385 <first : 5 9 1 3454 d2d4 a7a5 b1c3 b8c6 c1f4
2703385 <first : 5 20 21 18240 g2g3 c7c5 d2d4 c5d4 f3d4
2703385 <first : 5 22 27 25913 b1c3 b8c6 d2d4 g8f6 c1f4
successful read from 8344e88
2703461 <first : 6 10 42 42135 b1c3 b8c6 d2d4 d7d5 c1f4 c8e6
successful read from 8344e88
2703706 <first : 6 15 66 96713 d2d4 d7d5 c1f4 b8c6 b1d2 c8e6
successful read from 8344e88
2704611 <first : 7 10 157 270405 d2d4 b8c6 c1f4 g8f6 b1c3
successful read from 8344e88
2705652 <first : 7 20 261 482428 g2g3 b8c6 f1h3 d7d5 e1g1 c8e6 d2d4
successful read from 8344e88
2706703 <first : move g2g3
>ICS: g2g3\015\012
successful read from 8344e88
<ICS: \007\012\015<12> rnbqkbnr ppppp-pp -------- -----p-- -------- -----NP- PPPPPP-P RNBQKB-R B -1 1 1 1 1 0 60 FairyMax WBtester -1 1 0 39 39 56089 60000 2 P/g2-g3 (0:03.911) g3 0 1 0\012\015fics%
successful read from 8366d60
<ICS: \012\015WBtester(U)(----)[60] kibitzes: !!! +0.10/6 (0.56 sec, 89368 nodes, 159 knps) \012\015\ PV=f7f5 c2c4 b8c6 d2d4 g8f6 b1c3\012\015fics%
successful read from 8366d60
<ICS: \012\015WBtester(U) tells you: I am stuck!\012\015fics%
successful read from 8366d60
>ICS: tell WBtester too bad!\015\012
successful read from 8368da0
<ICS: (told WBtester, who is playing)\012\015fics%
successful read from 8366d60
>ICS: resign\015\012
successful read from 8368da0
<ICS: \012\015{Game 60 (FairyMax vs. WBtester) FairyMax resigns} 0-1\012\015\012\015No ratings adjustment done.\012\015fics%
GameEnds(38, FairyMax resigns, 0)
Interrupting first
2800419 >first : result 0-1 {FairyMax resigns}
2800419 >first : force
2800419 >first : ping 28
>ICS: gameend\015\012
>ICS: \015\012
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: CCT Logon (xboard 4.4.x bug)

Post by marcelk »

hgm wrote:It might seem strange that a hang occurs so early in the game, without any sign of trouble, but nte that this game was started immediately after the preceeding game, (which was in the phase of near-instant moving), where a large communication lag had built up. Normally that means I still get complaints from FICS about communication quota being exceeded or communication being queued in th first few moves of the next game.
Now it is getting interesting... The communication limit is certainly suspect. Can you make it hang when kibitzing is off?
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

What could further be relevant (for the FICS programmers, that is), is that it is always the kibitzing side that hangs. I have always been playing one kibitzing against one non-kibitzing engine, and so far I have _never_ seen the non-kibitzing player hang. Against 5 or 6 for the kibitzing player.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: CCT Logon (xboard 4.4.x bug)

Post by Michel »

The real test would be to test as a registered user. As far as I know the communication limit is only for guests.

In the past I don't think the communication limit applied to the protocol. Perhaps something has changed in this respect. That would be silly indeed.

I will make icsdrone play as a guest. See if I can make it hang.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: CCT Logon (xboard 4.4.x bug)

Post by hgm »

Well, I can only test as a guest, so someone else would have to do that.