urbit / arvo

https://github.com/urbit/urbit
110 stars 58 forks source link

List addressing bugs: &33:~ bails out #703

Closed mikolajpp closed 5 years ago

mikolajpp commented 6 years ago

&33:~ bails out with out of loom error.

Calling &33:~[[%leaf p="syntax error"] [%leaf p="\{1 11}"]] hangs urbit until CTRL+C wherein it prints

  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[431 9].[443 11]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[431 13].[431 31]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[431 17].[431 31]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[475 7].[485 15]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[478 13].[485 9]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[478 17].[478 40]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[478 21].[478 40]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[1.290 7].[1.294 9]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[1.290 11].[1.290 54]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[1.290 15].[1.290 54]>
  /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford
  <[1.290 24].[1.290 52]>
-find.+17,179,869,182
ohAitch commented 6 years ago

Geez, nice. What's the !,*twig of that? The != ?

On Friday, 6 April 2018, mikolajpp notifications@github.com wrote:

&33:~ bails out with out of loom error.

Calling &33:~[[%leaf p="syntax error"] [%leaf p="{1 11}"]] hangs urbit until CTRL+C whereupon it prints

/~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 9].[443 11]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 13].[431 31]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 17].[431 31]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[475 7].[485 15]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 13].[485 9]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 17].[478 40]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 21].[478 40]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 7].[1.294 9]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 11].[1.290 54]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 15].[1.290 54]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 24].[1.290 52]> -find.+17,179,869,182

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/urbit/arvo/issues/703, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxXhstueYunyu7mmTqgTPbmUCY96iVhks5tl54CgaJpZM4TKYmm .

ohAitch commented 6 years ago

Oh right &33 as in +(32), somewhere the nock interpreter isn't checking for indirect atoms presumably.

On Friday, 6 April 2018, Anton Dyudin antechno777@gmail.com wrote:

Geez, nice. What's the !,*twig of that? The != ?

On Friday, 6 April 2018, mikolajpp notifications@github.com wrote:

&33:~ bails out with out of loom error.

Calling &33:~[[%leaf p="syntax error"] [%leaf p="{1 11}"]] hangs urbit until CTRL+C whereupon it prints

/~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 9].[443 11]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 13].[431 31]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[431 17].[431 31]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[475 7].[485 15]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 13].[485 9]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 17].[478 40]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[478 21].[478 40]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 7].[1.294 9]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 11].[1.290 54]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 15].[1.290 54]> /~sogdus-sibmep-ponmep-litsem/home/~2018.4.2..13.59.16..4850/sys/vane/ford <[1.290 24].[1.290 52]> -find.+17,179,869,182

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/urbit/arvo/issues/703, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxXhstueYunyu7mmTqgTPbmUCY96iVhks5tl54CgaJpZM4TKYmm .

mikolajpp commented 6 years ago

Yeah, 33 is actually the smallest number which causes the bail out :-))

This can be a source for great Urbit inside jokes...

ohAitch commented 6 years ago

&34:~[~], &35:~[~ ~], etc also bail.

Can't repro the hang case in #704 though, on Linux or Mac; does the test code look accurate?https://github.com/urbit/arvo/blob/bc6826d3b7a74038e21a80abe5295118541aad36/tests/bug/gh-703.hoon#L6-L9

mikolajpp commented 6 years ago

You are right. It seems you have to take actual output of parsing for hang to work. Try this:

=a (mule |.((ream '(bomb 2 2')))
&33:p.a

Guaranteed hang :-))

ohAitch commented 6 years ago

Ah, this gets compiled as &33.p.a, so not surprised it's different. And hangs trying to compile actually, increasing but immediately noticeable amounts as you go !=(&1.p.a),!=(&2.p.a),!=(&5.p.a) etc. The problem here is the fork type, p.a is either stack trace or a ++hoon AST, grabbing an arbitrary axis from which gets a bit huge:

produces: dojo `? ?:(| &4:*hoon ~)` ``` ?( p/@tas p/?({ven/@tas pro/@tas kel/@} {std/@tas kel/@} {ven/@tas pro/@tas ver/@ kel/@} lef/@tas) n/{p/@ q/{p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$ash p/#2} {$elm p/#2})}})}} p/#10 r/it({p/@tas q/#2}) i/@tD i/?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas) p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) p/?({p/@tas q/#2} @tas) q/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) i/{p/#2 q/#2} p/{p// q/{p/{p/@ q/@} q/{p/@ q/@}}} i/{p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2} q/#2 p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} p/{p/@t q/it(it({p/?($.n $.y) q/@t}))} p/@ p/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$~ u/#2} $~)}}) p/?({p/@ q/#15} @) p/?({p/@ q/@} p/@) p/#2 p/it({p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2}) r/#2 p/#15 g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} p/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/@tas} p/@ud p/{p/#10 q/?({$~ u/#2} $~)} i/?({$~ p/#2} @) #t i/#2 i ?( {?($call $tape $marl $manx) p/#2} { g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/it(?({?($call $tape $marl $manx) p/#2} {g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/#19})) } ) p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) l/nlr({p/@ q/{p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$ash p/#2} {$elm p/#2})}})}}) r it( { p/@tas q ^#2 ?( {$clcb p/#2 q/#2} {$brwt p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2} {$sand p/@tas q/*} {$bust p/?({$atom p/@ta} $bean $cell $void $noun $null)} {$sgbr p/#2 q/#2} {$ktdt p/#2 q/#2} {$brts p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r/#2} {$yell p/it(#2)} { $brcn p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q nlr({p/@ q/{p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$ash p/#2} {$elm p/#2})}})}}) } {$ktls p/#2 q/#2} {$tscl p/it({p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2}) q/#2} {$wing p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas))} {$brtr p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r/#2} {$sgbc p/@tas q/#2} {$wtls p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/it({p/#2 q/#2})} {$bccb p/#2} {$bckt p/#2 q/#2} {$dtts p/#2 q/#2} {$dtwt p/#2} {$tskt p/{p/#10 q/?({$~ u/#2} $~)} q/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) r/#2 s/#2} { $brkt p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r nlr({p/@ q/{p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$ash p/#2} {$elm p/#2})}})}}) } {$smfs p/#2} { $xray p { g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/it(?({?($call $tape $marl $manx) p/#2} {g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/#19})) } } {$sgls p/@ q/#2} {$ktts p/#10 q/#2} {$cntr p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/it({p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2})} {$cnls p/#2 q/#2 r/#2} {$bcts p/#10 q/#2} {$tsgr p/#2 q/#2} {$dtkt p/#2 q/#2} {$wtdt p/#2 q/#2 r/#2} {$bcsm p/#2} {$dbug p/{p// q/{p/{p/@ q/@} q/{p/@ q/@}}} q/#2} {$wtbr p/it(#2)} {$cnkt p/#2 q/#2 r/#2 s/#2} {$bchp p/#2 q/#2} {$wtkt p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/#2} {$tscm p/#2 q/#2} {$ktpm p/#2} {$dttr p/#2 q/#2} { $smts p it( ?( {?($call $tape $marl $manx) p/#2} { g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/^#19.?({i/?({?($call $tape $marl $manx) p/#2} {g/{n/?({@tas @tas} @tas) a/it({n/?({@tas @tas} @tas) v/it(?({$~ p/#2} @t))})} c/#19}) t/#19} $~) } ) ) } {$zpgr p/#2} {$wtzp p/#2} {$smcl p/#2 q/it(#2)} {$bcwt p/it(#2)} {$cnhp p/#2 q/it(#2)} {$ p/@} {$clls p/#2 q/#2 r/#2} {$knit p/it(?({$~ p/#2} @))} {$bccn p/it(#2)} {$smsg p/#2 q/it(#2)} {$sgwt p/@ud q/#2 r/#2 s/#2} {$zpzp $~} {$base p/?({$atom p/@ta} $bean $cell $void $noun $null)} {$wtts p/#2 q/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas))} {$tshp p/#2 q/#2} {$ktsg p/#2} {$sgpm p/@ud q/#2 r/#2} {$sggl p/?({p/@tas q/#2} @tas) q/#2} {$brhp p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2} {$tsls p/#2 q/#2} {$bccl p/it(#2)} {$wtcl p/#2 q/#2 r/#2} {$rock p/@tas q/*} {$ktbr p/#2} {$sgts p/#2 q/#2} {$tsbr p/#2 q/#2} {$cold p/#2} {$tsgl p/#2 q/#2} {$cndt p/#2 q/#2} {$halo p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/#2} {$lost p/#2} {$docs p/{p/@t q/it(it({p/?($.n $.y) q/@t}))} q/#2} {$clsg p/it(#2)} {$dtls p/#2} {$leaf p/{p/@tas q/@}} {$zpcm p/#2 q/#2} {$cltr p/it(#2)} {$ktwt p/#2} {$clkt p/#2 q/#2 r/#2 s/#2} { $hand #t q ^#15 ?( {p/#15 q/#15} {$4 p/#15} {$1 p/*} {$7 p/#15 q/#15} {$6 p/#15 q/#15 r/#15} {$2 p/#15 q/#15} {$5 p/#15 q/#15} {$9 p/@ q/#15} {$8 p/#15 q/#15} {$0 p/@} {$10 p/?({p/@ q/#15} @) q/#15} {$3 p/#15} {$11 p/#15 q/#15} ) } {$tswt p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/#2 s/#2} {$clhp p/#2 q/#2} {$sgzp p/#2 q/#2} {$bunt p/#2} {$sgfs p/?({ven/@tas pro/@tas kel/@} {std/@tas kel/@} {ven/@tas pro/@tas ver/@ kel/@} lef/@tas) q/#2} {$zpsm p/#2 q/#2} {$limb p/@tas} {$tune p/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({p/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$~ u/#2} $~)}}) q/it(#2)} @tas)}} {$wtgl p/#2 q/#2} {$tsfs p/{p/#10 q/?({$~ u/#2} $~)} q/#2 r/#2} {$sgcb p/#2 q/#2} {$brsg p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r/#2} {$tstr p/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/@tas} q/#2 r/#2} {$tssg p/it(#2)} {$cnsg p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/it(#2)} { $brcb p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r/it({p/@tas q/#2}) s nlr({p/@ q/{p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/nlr({p/@tas q/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/?({$ash p/#2} {$elm p/#2})}})}}) } {$cncb p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/it({p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2})} {$tell p/it(#2)} {$kthp p/#2 q/#2} {$tssm p/{p/^#10.?({$0 $~} {$2 p/#10 q/#10} {$1 p/{p/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~) q/@tas} q/#10} p/@tas) q/?({$~ u/#2} $~)} q/#2 r/#2} {$smsm p/#2 q/#2} {$ktcn p/#2} {$sgcn p/?({ven/@tas pro/@tas kel/@} {std/@tas kel/@} {ven/@tas pro/@tas ver/@ kel/@} lef/@tas) q/#2 r/^#9.?({i/{p/@tas q/#2} t/#9} $~) s/#2} {p/#2 q/#2} {$fits p/#2 q/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas))} {$bcpt p/#2 q/#2} {$wtgr p/#2 q/#2} {$zpts p/#2} {$wtpt p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/#2} {$cnts p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/it({p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2})} {$zpwt p/?({p/@ q/@} p/@) q/#2} {$brcl p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2 r/#2} {$wtpm p/it(#2)} {$eror p/""} {$brdt p/{p/?({$~ u/@tas} $~) q/?({$~ u/{p/@t q/it(it({p/?($.n $.y) q/@t}))}} $~)} q/#2} {$tsdt p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/#2} {$wtsg p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/#2 r/#2} {$sggr p/?({p/@tas q/#2} @tas) q/#2} {$wthp p/it(?({$.y p/@} {$.n p/@ud q/?({$~ u/@tas} $~)} @tas)) q/it({p/#2 q/#2})} ) } ) $sand $tune $dtkt $7 $bccb $clkt $sgls $zpcm $cncb $halo $ktwt $tsfs $wtdt $wtkt $9 $brdt $tscl $dttr $yell $hand $cnsg $sgzp $cnts $sgcn $3 $brts $bcsm $tsdt $clcb $ktdt $smfs $sgbr $0 $cnls $smcl $dtwt $wtzp $cltr $wtbr $tstr $clsg $bccl $fits $tsgr $wtpm $zpzp $brhp $wtls $smts $ $sggr $brsg $2 $zpwt $sgwt $tshp $wthp $wing $1 $tssg $ktpm $clhp $rock $4 $brwt $ktbr $ktcn $tsbr $ktsg $10 $~ $lost $wtpt $bcpt $cntr $bcwt $tsls $8 $tskt $zpsm $brtr $wtgl $zpgr $ktts $wtcl $bchp $bcts $limb $cnkt $sggl $bust $brcl $dtls $dtts $knit $tell $brcb $kthp $cnhp $cold $5 $sgts $eror $wtts $brcn $dbug $tsgl $tssm $zpts $tscm $bckt $sgfs $11 $brkt $smsm $wtsg $base $xray $atom $cndt $docs $ktls $sgpm $6 $leaf $bunt $smsg $bccn $clls $sgbc $wtgr $tswt $sgcb * ) ```
joemfb commented 5 years ago

fixed in urbit/urbit#1063, regression test added in #889