Discussion of chess software programming and technical issues.
Moderator: Ras
hgm
Posts: 28451 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Mon Feb 25, 2013 11:56 am
It seems that the timeseal decoder crashes on very long input lines. At the end of the CCT blitz yesterday one of the participants kibitzed a line of ~1000 characters, and from that moment on commands from those using timeseal was no longer decoded:
Code: Select all
p22: 'd3f2'
p22: 'kibitz !!! +0.00/16 (8.06 sec, 12743883 nodes, 1581 knps) PV=Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1'
p52: 'd1e1'
p8: '$kibitz depth=27 time=7.35 node=2788502511 speed=204285904 score=+0.43 pv="Ra7 Kb4 f4 Nxa3 f3 Bc4 Kf6 Nc2 Rd7 Kc3 Kg5 Ne3 Kf4 Ng4 Rc7 Kd4 Kg3 Bd5 Rd7 Kc5 f2 Nxf2 Kxf2"'
p8: 'd7a7'
p52: '¢d€zµ{daªÆ‚ÍÝap£c{`}p ²¶²a¡n¡`¶`·¬°‡nk¢¥«³ÇvocªÝ©`®Ÿ—Œ°Î»ÆÂÑxÇq¶µšpk~qu™¯¬v²ƒŽ`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£qmÉÈ—zζ`ªÛ€Ã`¢w¯Œ¹°kƒ¥€k°’ÎÙ¥jt© sÖwŠeºƒ¥¢pŠiž`zƒÉhØxŠ˜qn{rÆÎ¡²ka²ªŸŒ``©}sf¥¿v‚oÎÇ dÅßžk‹³Žª¿›ÎyÆ…Óbs§ŽÅpk©sž²Ÿc™eƒ·a`‰²qŽ‹®²¢¹Ëi£¡išÔ¢ŸŽvŸ¡ŠtsÆÆØ‡xζc«pËfqvœ¯§¹³†ƒŽ€€d¹kÛŽk™© €Ôœ¡Œªmƒ¥¡q¡†»q®hÉÃØ{˘`nŽŠmk££jŒ²ªiŸ‹€qf’€f¥Œw©€kÖtnß»†‹¢Žek°k{׌hÓb€¥ßna€Æ€ž²œb²ŠŠŒcŠ`¢²rc‹¿²mm`Ì¡°hÅÔ¢i¶Ž°i›€ÆÆÛ†ÓÂk§·Àp`fr›œŸ§vgжµ¥‰¹kŒ¶€²žo˃œ¡¿«Ô‚ŠŽuš¡»rÃhØÃ—¯`œbµËmkt¡§£e†i‹€rg¹ËÃŽhœ©«kÕ™Œno® ¥d†°k¬ÕgÃÂËrßnb¥mË»£i‰²¡Š¿ŽŠq¢}ŠÈ®œ£l€`Ìv²ƒnÅm†a޳h°Ëc×mÓik€ÚÀa`©Š°¹Œ¶wŠŠa·Î¢š€ca€²»n`l¹°kÀÔ©Š·˜š°tŠhÍÚÒ–Â`œµ}Þ`|€›v§ d†®µŠŒ¹`÷…œž«€²ªŸ‘‚®w§¡€Ã‚gÃÁ¬`z¶Îm`» „‰£¡ik¥¯s³|ËÈ®j¡‡«qƒ™eƒnÆlŽž¥gƒ°`cÔbmÂi€pqecqšË°¹kŽœ¡ŒiŽ`΢«¥ÈŽ¥£o…`ǹ³†ÀÅ©ic³¿²ŒuËhÍÐ}iqrÚªÞ`¥°™€¶t®¶ËŒš`Œc®¹ºº¥l²ªi}z©Œa˜p¢¥hmÂÒ•Ç`¶z|ÛÎ|`tt¯¬¡°h†¥¯€±—`Ùa…v‡«r‚²ŠŠ’‡¥žŠŠƒ¡`¬€ÉÈÀx¥qeŽsÃ`¡v„cœ¡¿h¥k³ÎÈ¥¥ ‚…qÇvgeÇžh޳¿eŸž`y‚b‡}irsqÅ{q«Î°²€µ™Œab`©ªqŽ®¹mžÎÇ£e†ªz©¿`³ŸªŒvÎhÆÂÑxÇq¶µšpk~qu™¯¬v²ƒŽ`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£qmÉÈ—zζ`ª'
p52: '¢w¯Œ¹°kƒ¥€k°’ÎÙ¥jt© sÖwŠeºƒ¥¢pŠiž`zƒÉhØxŠ˜qv{˜ÆÎ¡²ka²¹Ÿž±•r„ÀµÝ·žbº'
p8: 'pÊx¡bxhu•™Ò'
p52: 'ˆ¶µª¹Ÿ¹œ°˜ÛÛ™'
p13: '‡ž¿šu{ÓÑÒ«‚…'
p13: 'd}ft~xšÊºe btf|sÖicÑq–vË’'
p13: ' d€max¹ŽÉg®y§¥qÖ²²žaܹ¿µ€¢·~°£dƒÞÃÃx`¡¢wŽ®¢`u€£µ‚³€žuo®¢juȳ®¯o¥tlp¡ÀŸž««šÙl£žpÆÚÑ`{Ï¡§cÒ€u€ž'
p22: 'Ø··¡¹²q¿«eœš}Št‚¹—xØŒ¿Š'
p22: '{©l©±h¯s³cf·ªv²¹qÐªŠ¢§»rÇ£dŽbÔjµv ŠŽž°®»‚ŒŒßiq£lyÀ«d°c|¯§„¶¿i‹¯q‰}`ȶhœÓ™Ö¢žŽ~İ»®”'
p31: '؂Ƭu®i–aŽ€if›…ŠgºgŠt€ÛŒ'
p31: 'yµm±w±¬w±œžÊž'
p15: 'ngnØh`d³f`yŸ® –‡×”i¯¶q»³q§sc§·¿Ê¹h»q€µº–§žpwsˆ`™¯'
p8: 'Žcœ¡ºÁx°bªy™†±›ªpŒœ|¢Ÿ'
p44: 'date'
Unfortunately the timeseal decoder is closed source. But I guess I can limit the length of the lines that are sent to it for decoding, in the ICS itself.
hgm
Posts: 28451 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Mon Feb 25, 2013 12:32 pm
Statistics of the length of input lines in the past two months:
Code: Select all
994. 2
996. 6
999. 33
1000. 24
1001. 34
1002. 40
1003. 39
1004. 30
1005. 1
1007. 1
1008. 6
1027. 1 <---------- This one crashed the timeseal decoder yesterday
1030. 134
1031. 96
All other long lines are mamer output (delivering the "mam who 1" replies with multi-line qtell commands), and mamer is not logged in through timeseal. The length of the lines in the log file is exaggerated by 6-7 characters because of a player-number prefix and quoting.
ZirconiumX
Posts: 1361 Joined: Sun Jul 17, 2011 11:14 am
Full name: Hannah Ravensloft
Post
by ZirconiumX » Mon Feb 25, 2013 4:50 pm
hgm wrote: It seems that the timeseal decoder crashes on very long input lines. At the end of the CCT blitz yesterday one of the participants kibitzed a line of ~1000 characters, and from that moment on commands from those using timeseal was no longer decoded:
Code: Select all
p22: 'd3f2'
p22: 'kibitz !!! +0.00/16 (8.06 sec, 12743883 nodes, 1581 knps) PV=Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1 Nf2+ Ke1 Nd3+ Kd1'
p52: 'd1e1'
p8: '$kibitz depth=27 time=7.35 node=2788502511 speed=204285904 score=+0.43 pv="Ra7 Kb4 f4 Nxa3 f3 Bc4 Kf6 Nc2 Rd7 Kc3 Kg5 Ne3 Kf4 Ng4 Rc7 Kd4 Kg3 Bd5 Rd7 Kc5 f2 Nxf2 Kxf2"'
p8: 'd7a7'
p52: '¢d€zµ{daªÆ‚ÍÝap£c{`}p ²¶²a¡n¡`¶`·¬°‡nk¢¥«³ÇvocªÝ©`®Ÿ—Œ°Î»ÆÂÑxÇq¶µšpk~qu™¯¬v²ƒŽ`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£qmÉÈ—zζ`ªÛ€Ã`¢w¯Œ¹°kƒ¥€k°’ÎÙ¥jt© sÖwŠeºƒ¥¢pŠiž`zƒÉhØxŠ˜qn{rÆÎ¡²ka²ªŸŒ``©}sf¥¿v‚oÎÇ dÅßžk‹³Žª¿›ÎyÆ…Óbs§ŽÅpk©sž²Ÿc™eƒ·a`‰²qŽ‹®²¢¹Ëi£¡išÔ¢ŸŽvŸ¡ŠtsÆÆØ‡xζc«pËfqvœ¯§¹³†ƒŽ€€d¹kÛŽk™© €Ôœ¡Œªmƒ¥¡q¡†»q®hÉÃØ{˘`nŽŠmk££jŒ²ªiŸ‹€qf’€f¥Œw©€kÖtnß»†‹¢Žek°k{׌hÓb€¥ßna€Æ€ž²œb²ŠŠŒcŠ`¢²rc‹¿²mm`Ì¡°hÅÔ¢i¶Ž°i›€ÆÆÛ†ÓÂk§·Àp`fr›œŸ§vgжµ¥‰¹kŒ¶€²žo˃œ¡¿«Ô‚ŠŽuš¡»rÃhØÃ—¯`œbµËmkt¡§£e†i‹€rg¹ËÃŽhœ©«kÕ™Œno® ¥d†°k¬ÕgÃÂËrßnb¥mË»£i‰²¡Š¿ŽŠq¢}ŠÈ®œ£l€`Ìv²ƒnÅm†a޳h°Ëc×mÓik€ÚÀa`©Š°¹Œ¶wŠŠa·Î¢š€ca€²»n`l¹°kÀÔ©Š·˜š°tŠhÍÚÒ–Â`œµ}Þ`|€›v§ d†®µŠŒ¹`÷…œž«€²ªŸ‘‚®w§¡€Ã‚gÃÁ¬`z¶Îm`» „‰£¡ik¥¯s³|ËÈ®j¡‡«qƒ™eƒnÆlŽž¥gƒ°`cÔbmÂi€pqecqšË°¹kŽœ¡ŒiŽ`΢«¥ÈŽ¥£o…`ǹ³†ÀÅ©ic³¿²ŒuËhÍÐ}iqrÚªÞ`¥°™€¶t®¶ËŒš`Œc®¹ºº¥l²ªi}z©Œa˜p¢¥hmÂÒ•Ç`¶z|ÛÎ|`tt¯¬¡°h†¥¯€±—`Ùa…v‡«r‚²ŠŠ’‡¥žŠŠƒ¡`¬€ÉÈÀx¥qeŽsÃ`¡v„cœ¡¿h¥k³ÎÈ¥¥ ‚…qÇvgeÇžh޳¿eŸž`y‚b‡}irsqÅ{q«Î°²€µ™Œab`©ªqŽ®¹mžÎÇ£e†ªz©¿`³ŸªŒvÎhÆÂÑxÇq¶µšpk~qu™¯¬v²ƒŽ`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£qmÉÈ—zζ`ª'
p52: '¢w¯Œ¹°kƒ¥€k°’ÎÙ¥jt© sÖwŠeºƒ¥¢pŠiž`zƒÉhØxŠ˜qv{˜ÆÎ¡²ka²¹Ÿž±•r„ÀµÝ·žbº'
p8: 'pÊx¡bxhu•™Ò'
p52: 'ˆ¶µª¹Ÿ¹œ°˜ÛÛ™'
p13: '‡ž¿šu{ÓÑÒ«‚…'
p13: 'd}ft~xšÊºe btf|sÖicÑq–vË’'
p13: ' d€max¹ŽÉg®y§¥qÖ²²žaܹ¿µ€¢·~°£dƒÞÃÃx`¡¢wŽ®¢`u€£µ‚³€žuo®¢juȳ®¯o¥tlp¡ÀŸž««šÙl£žpÆÚÑ`{Ï¡§cÒ€u€ž'
p22: 'Ø··¡¹²q¿«eœš}Št‚¹—xØŒ¿Š'
p22: '{©l©±h¯s³cf·ªv²¹qÐªŠ¢§»rÇ£dŽbÔjµv ŠŽž°®»‚ŒŒßiq£lyÀ«d°c|¯§„¶¿i‹¯q‰}`ȶhœÓ™Ö¢žŽ~İ»®”'
p31: '؂Ƭu®i–aŽ€if›…ŠgºgŠt€ÛŒ'
p31: 'yµm±w±¬w±œžÊž'
p15: 'ngnØh`d³f`yŸ® –‡×”i¯¶q»³q§sc§·¿Ê¹h»q€µº–§žpwsˆ`™¯'
p8: 'Žcœ¡ºÁx°bªy™†±›ªpŒœ|¢Ÿ'
p44: 'date'
Unfortunately the timeseal decoder is closed source. But I guess I can limit the length of the lines that are sent to it for decoding, in the ICS itself.
You can try openseal. Since it is GPLv2 or higher, you could even include it in XBoard.
http://uz.sns.it/~m2/openseal.c
Matthew:out
tu ne cede malis, sed contra audentior ito
hgm
Posts: 28451 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Mon Feb 25, 2013 5:38 pm
Openseal is a timeseal encoder , not the decoder that needs to be interfaced with the ICS. The timeseal we do supply with WinBoard is in fact a compiled Openseal that Tim Mann fixed for some bug that could make it crash.
Michel
Posts: 2292 Joined: Mon Sep 29, 2008 1:50 am
Post
by Michel » Mon Feb 25, 2013 6:07 pm
The encoding used by timeseal is trivial. It would be easy to write a decoder oneself.
hgm
Posts: 28451 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Mon Feb 25, 2013 6:58 pm
Could be. It is even more trivial to just limit the length of the lines passed to it, though. I guess users have no legitimate business to pass lines longer than 1000 char. I should also patch WinBoard not to do that.
stevenaaus
Posts: 613 Joined: Wed Oct 13, 2010 9:44 am
Location: Australia
Post
by stevenaaus » Sat Mar 02, 2013 3:44 am
Scid vs. PC had problems with non-ascii chars crashing timeseal, and we now remove them before sending to FICS.
Code: Select all
# Remove non-ascii chars. They cause timeseal to die and give a network error
set line [regsub -all {[\u0080-\uffff]} $line ?]
hgm
Posts: 28451 Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller
Post
by hgm » Sat Mar 02, 2013 11:20 am
Indeed, but I think this was exactly what Tim Mann fixed in the timeseal we package with WinBoard.