Timeseal

Discussion of chess software programming and technical issues.

Moderator: Ras

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

Timeseal

Post by hgm »

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¡Š£q­mÉÈ—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Öt￾­nß»†‹¢Ž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Õ™￾Œn￾o­® ¥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Çvg­eÇžh޳¿eŸž`y‚b‡}irsqÅ{q«Î°²€µ™￾Œ­ab`©ªq￾Ž®¹mžÎÇ£e†ªz©¿`³ŸªŒvÎhÆÂÑxÇq¶µšpk~qu™¯¬v²ƒ­Ž`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£q­mÉÈ—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³c­f·ª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.
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Timeseal

Post by hgm »

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

Re: Timeseal

Post by ZirconiumX »

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¡Š£q­mÉÈ—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Öt￾­nß»†‹¢Ž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Õ™￾Œn￾o­® ¥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Çvg­eÇžh޳¿eŸž`y‚b‡}irsqÅ{q«Î°²€µ™￾Œ­ab`©ªq￾Ž®¹mžÎÇ£e†ªz©¿`³ŸªŒvÎhÆÂÑxÇq¶µšpk~qu™¯¬v²ƒ­Ž`Ëf—`Ú`®™¢ºŠi²¡Š|‡Œ¥wr¡Š£q­mÉÈ—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³c­f·ª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
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Timeseal

Post by hgm »

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

Re: Timeseal

Post by Michel »

The encoding used by timeseal is trivial. It would be easy to write a decoder oneself.
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Timeseal

Post by hgm »

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

Re: Timeseal

Post by stevenaaus »

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 ?]
User avatar
hgm
Posts: 28451
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Timeseal

Post by hgm »

Indeed, but I think this was exactly what Tim Mann fixed in the timeseal we package with WinBoard.