Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Awesome! Matthew Flatt writes: > Thanks! I've pushed a repair. > > At Sun, 28 Oct 2018 15:24:27 -0400, Sam Tobin-Hochstadt wrote: >> Since the dynamic wind error is definitely a Racket bug, I reproduced >> it in a single file and opened an issue here: >> https://github.com/racket/racket/issues/2341 >> >> I haven't gotten an error in RacketCS yet, but it is about 2x slower >> than on traditional Racket. >> >> Sam >> On Sun, Oct 28, 2018 at 2:05 PM Christopher Lemmer Webber >> wrote: >> > >> > Christopher Lemmer Webber writes: >> > >> > > Matthew Flatt writes: >> > > >> > >> Is your example something I can run myself to track down the problem? >> > >> The trigger for these kinds of bugs is often difficult to extract into >> > >> a small example. >> > > >> > > It is, but there's currently another bug intertwined which is causing >> > > memory exhaustion in this same case. I don't think they're interrelated >> > > anymore, but let me fix that one so you can see the problem in isolation >> > > without blowing through your RAM :) >> > > >> > > I'll try to clean it up today/tomorrow and will respond with an example >> > > you can run once I've done so. >> > >> > So I actually didn't get rid of the memory exhaustion problem, but I >> > *did* get rid of the "Dynamic-wind record doesn't match prompt!" error. >> > I'm not sure exactly how the "fix" fixed it though, I mostly moved the >> > code shape closer to the shape it was previously before the error >> > happened. >> > >> > To reproduce, clone goblins: >> > https://gitlab.com/spritely/goblins.git >> > >> > Now check out the commit 1db58e8, which is the v0.1 release >> > >> > Now follow the instructions on the top of: >> > https://gitlab.com/spritely/goblins/issues/8 >> > >> > (the second code block there has some code you can run yourself to >> > reproduce the bug.) >> > >> > More about the "fix": >> > https://gitlab.com/spritely/goblins/issues/8#note_112548932 >> > >> > Note that I still am hitting problems, but they aren't this problem: >> > - Still have the memory leak. It's very hard for me to figure out >> >why references to the promises, promise resolvers, and listeners >> >are not being cleaned up. >> > - A couple of the fixes I've tried have managed to segfault Racket... >> >one crashed the GC. I guess those might be of interest. >> > >> > I didn't have these problems before I moved to the promise-based >> > architecture I'm now using. There's a lot more allocation of >> > intermediate actors powering things now, and I'm okay with some >> > performance tradeoff if it means a cleaner design, but I should probably >> > sort out the leaks and crashes :) >> > >> > - Chris >> > >> > -- >> > You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> > For more options, visit https://groups.google.com/d/optout. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Thanks! I've pushed a repair. At Sun, 28 Oct 2018 15:24:27 -0400, Sam Tobin-Hochstadt wrote: > Since the dynamic wind error is definitely a Racket bug, I reproduced > it in a single file and opened an issue here: > https://github.com/racket/racket/issues/2341 > > I haven't gotten an error in RacketCS yet, but it is about 2x slower > than on traditional Racket. > > Sam > On Sun, Oct 28, 2018 at 2:05 PM Christopher Lemmer Webber > wrote: > > > > Christopher Lemmer Webber writes: > > > > > Matthew Flatt writes: > > > > > >> Is your example something I can run myself to track down the problem? > > >> The trigger for these kinds of bugs is often difficult to extract into > > >> a small example. > > > > > > It is, but there's currently another bug intertwined which is causing > > > memory exhaustion in this same case. I don't think they're interrelated > > > anymore, but let me fix that one so you can see the problem in isolation > > > without blowing through your RAM :) > > > > > > I'll try to clean it up today/tomorrow and will respond with an example > > > you can run once I've done so. > > > > So I actually didn't get rid of the memory exhaustion problem, but I > > *did* get rid of the "Dynamic-wind record doesn't match prompt!" error. > > I'm not sure exactly how the "fix" fixed it though, I mostly moved the > > code shape closer to the shape it was previously before the error > > happened. > > > > To reproduce, clone goblins: > > https://gitlab.com/spritely/goblins.git > > > > Now check out the commit 1db58e8, which is the v0.1 release > > > > Now follow the instructions on the top of: > > https://gitlab.com/spritely/goblins/issues/8 > > > > (the second code block there has some code you can run yourself to > > reproduce the bug.) > > > > More about the "fix": > > https://gitlab.com/spritely/goblins/issues/8#note_112548932 > > > > Note that I still am hitting problems, but they aren't this problem: > > - Still have the memory leak. It's very hard for me to figure out > >why references to the promises, promise resolvers, and listeners > >are not being cleaned up. > > - A couple of the fixes I've tried have managed to segfault Racket... > >one crashed the GC. I guess those might be of interest. > > > > I didn't have these problems before I moved to the promise-based > > architecture I'm now using. There's a lot more allocation of > > intermediate actors powering things now, and I'm okay with some > > performance tradeoff if it means a cleaner design, but I should probably > > sort out the leaks and crashes :) > > > > - Chris > > > > -- > > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Ah, this is great! I'm glad to see my code being simplified and put to good use to identify it. Sam Tobin-Hochstadt writes: > Since the dynamic wind error is definitely a Racket bug, I reproduced > it in a single file and opened an issue here: > https://github.com/racket/racket/issues/2341 > > I haven't gotten an error in RacketCS yet, but it is about 2x slower > than on traditional Racket. > > Sam > On Sun, Oct 28, 2018 at 2:05 PM Christopher Lemmer Webber > wrote: >> >> Christopher Lemmer Webber writes: >> >> > Matthew Flatt writes: >> > >> >> Is your example something I can run myself to track down the problem? >> >> The trigger for these kinds of bugs is often difficult to extract into >> >> a small example. >> > >> > It is, but there's currently another bug intertwined which is causing >> > memory exhaustion in this same case. I don't think they're interrelated >> > anymore, but let me fix that one so you can see the problem in isolation >> > without blowing through your RAM :) >> > >> > I'll try to clean it up today/tomorrow and will respond with an example >> > you can run once I've done so. >> >> So I actually didn't get rid of the memory exhaustion problem, but I >> *did* get rid of the "Dynamic-wind record doesn't match prompt!" error. >> I'm not sure exactly how the "fix" fixed it though, I mostly moved the >> code shape closer to the shape it was previously before the error >> happened. >> >> To reproduce, clone goblins: >> https://gitlab.com/spritely/goblins.git >> >> Now check out the commit 1db58e8, which is the v0.1 release >> >> Now follow the instructions on the top of: >> https://gitlab.com/spritely/goblins/issues/8 >> >> (the second code block there has some code you can run yourself to >> reproduce the bug.) >> >> More about the "fix": >> https://gitlab.com/spritely/goblins/issues/8#note_112548932 >> >> Note that I still am hitting problems, but they aren't this problem: >> - Still have the memory leak. It's very hard for me to figure out >>why references to the promises, promise resolvers, and listeners >>are not being cleaned up. >> - A couple of the fixes I've tried have managed to segfault Racket... >>one crashed the GC. I guess those might be of interest. >> >> I didn't have these problems before I moved to the promise-based >> architecture I'm now using. There's a lot more allocation of >> intermediate actors powering things now, and I'm okay with some >> performance tradeoff if it means a cleaner design, but I should probably >> sort out the leaks and crashes :) >> >> - Chris >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Since the dynamic wind error is definitely a Racket bug, I reproduced it in a single file and opened an issue here: https://github.com/racket/racket/issues/2341 I haven't gotten an error in RacketCS yet, but it is about 2x slower than on traditional Racket. Sam On Sun, Oct 28, 2018 at 2:05 PM Christopher Lemmer Webber wrote: > > Christopher Lemmer Webber writes: > > > Matthew Flatt writes: > > > >> Is your example something I can run myself to track down the problem? > >> The trigger for these kinds of bugs is often difficult to extract into > >> a small example. > > > > It is, but there's currently another bug intertwined which is causing > > memory exhaustion in this same case. I don't think they're interrelated > > anymore, but let me fix that one so you can see the problem in isolation > > without blowing through your RAM :) > > > > I'll try to clean it up today/tomorrow and will respond with an example > > you can run once I've done so. > > So I actually didn't get rid of the memory exhaustion problem, but I > *did* get rid of the "Dynamic-wind record doesn't match prompt!" error. > I'm not sure exactly how the "fix" fixed it though, I mostly moved the > code shape closer to the shape it was previously before the error > happened. > > To reproduce, clone goblins: > https://gitlab.com/spritely/goblins.git > > Now check out the commit 1db58e8, which is the v0.1 release > > Now follow the instructions on the top of: > https://gitlab.com/spritely/goblins/issues/8 > > (the second code block there has some code you can run yourself to > reproduce the bug.) > > More about the "fix": > https://gitlab.com/spritely/goblins/issues/8#note_112548932 > > Note that I still am hitting problems, but they aren't this problem: > - Still have the memory leak. It's very hard for me to figure out >why references to the promises, promise resolvers, and listeners >are not being cleaned up. > - A couple of the fixes I've tried have managed to segfault Racket... >one crashed the GC. I guess those might be of interest. > > I didn't have these problems before I moved to the promise-based > architecture I'm now using. There's a lot more allocation of > intermediate actors powering things now, and I'm okay with some > performance tradeoff if it means a cleaner design, but I should probably > sort out the leaks and crashes :) > > - Chris > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Christopher Lemmer Webber writes: > Matthew Flatt writes: > >> Is your example something I can run myself to track down the problem? >> The trigger for these kinds of bugs is often difficult to extract into >> a small example. > > It is, but there's currently another bug intertwined which is causing > memory exhaustion in this same case. I don't think they're interrelated > anymore, but let me fix that one so you can see the problem in isolation > without blowing through your RAM :) > > I'll try to clean it up today/tomorrow and will respond with an example > you can run once I've done so. So I actually didn't get rid of the memory exhaustion problem, but I *did* get rid of the "Dynamic-wind record doesn't match prompt!" error. I'm not sure exactly how the "fix" fixed it though, I mostly moved the code shape closer to the shape it was previously before the error happened. To reproduce, clone goblins: https://gitlab.com/spritely/goblins.git Now check out the commit 1db58e8, which is the v0.1 release Now follow the instructions on the top of: https://gitlab.com/spritely/goblins/issues/8 (the second code block there has some code you can run yourself to reproduce the bug.) More about the "fix": https://gitlab.com/spritely/goblins/issues/8#note_112548932 Note that I still am hitting problems, but they aren't this problem: - Still have the memory leak. It's very hard for me to figure out why references to the promises, promise resolvers, and listeners are not being cleaned up. - A couple of the fixes I've tried have managed to segfault Racket... one crashed the GC. I guess those might be of interest. I didn't have these problems before I moved to the promise-based architecture I'm now using. There's a lot more allocation of intermediate actors powering things now, and I'm okay with some performance tradeoff if it means a cleaner design, but I should probably sort out the leaks and crashes :) - Chris -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
At Wed, 24 Oct 2018 08:09:09 -0400, Christopher Lemmer Webber wrote: > > Meanwhile, if you're game to try RacketCS, I'd be interested to hear > > whether it behaves any differently. RacketCS has a more reliable > > implementation of delimited continuations. > > Oh interesting. I am interested in trying it, if I can get the > time... are there instructions for building it somewhere? Roughly, clone the Racket GitHub repo and `make cs`. If you're on Windows with the MSVC tools set up for command-line use, run `nmake win32-cs` instead. See "INSTALL.txt" for more information. If you happen to be on Mac OS, then there's a Minimal Racket build here: https://www.cs.utah.edu/plt/snapshots/ For now, look for "64-bit Intel CS"; the organization of the snapshot page will likely change in the near future. Also, a Linux build will hopefully appear in the next day or two (but it failed today because the system clock is out-of-sync in the build VM). -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Matthew Flatt writes: > At Tue, 23 Oct 2018 17:24:38 -0400, Christopher Lemmer Webber wrote: >> Somehow I'm triggering this error in Goblins. >> >> ; Dynamic-wind record doesn't match prompt! >> >> I am doing some things with delimited continuations. I'm guessing >> that's related, but I'm not sure why/how one might expect to trigger >> this error. Any ideas? > > That's an internal error, so I think it must be a bug in the > implementation of delimited continuations and `dynamic-wind`. Ah! > Is your example something I can run myself to track down the problem? > The trigger for these kinds of bugs is often difficult to extract into > a small example. It is, but there's currently another bug intertwined which is causing memory exhaustion in this same case. I don't think they're interrelated anymore, but let me fix that one so you can see the problem in isolation without blowing through your RAM :) I'll try to clean it up today/tomorrow and will respond with an example you can run once I've done so. > Meanwhile, if you're game to try RacketCS, I'd be interested to hear > whether it behaves any differently. RacketCS has a more reliable > implementation of delimited continuations. Oh interesting. I am interested in trying it, if I can get the time... are there instructions for building it somewhere? -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Yes I do. Effectively I want to support message passing across distributed & asynchronous systems which supports the appearance of sequential code, even though it's really suspending and then waking back up again when a response becomes available. So running something like: (<<- my-actor 'some-method) Triggers the following code, elsewhere: ;; ... (define resume-data (call-with-composable-continuation (lambda (k) (abort-current-continuation actor-prompt-tag k to sys-method kws kw-args args)) actor-prompt-tag)) ;; ... So this is during a message send where we want our code to suspend, but then when the other actor sends a response, this code is woken back up again. You can see more here: https://gitlab.com/spritely/goblins/blob/eff201e93bc01e73baef160cfa798e993dddc73b/goblins/actors.rkt#L127 https://gitlab.com/spritely/goblins/blob/eff201e93bc01e73baef160cfa798e993dddc73b/goblins/actors.rkt#L338 Linked to a specific commit, as some of that code is about to go through overhaul. Matthias Felleisen writes: > Do you manipulate delimited continuations with explicit prompts somewhere? > > >> On Oct 23, 2018, at 7:38 PM, Christopher Lemmer Webber >> wrote: >> >> Christopher Lemmer Webber writes: >> >>> Christopher Lemmer Webber writes: >>> Somehow I'm triggering this error in Goblins. ; Dynamic-wind record doesn't match prompt! I am doing some things with delimited continuations. I'm guessing that's related, but I'm not sure why/how one might expect to trigger this error. Any ideas? Thoughts? - Chris >>> >>> Hm okay, my code is making things run out of memory I think and that's >>> causing weird errors :) >>> >>> I'll try to figure out the source of that. >> >> Never mind, it's still happening regardless of the memory issue, but >> inconsistently. I'm not sure of the source of the error. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Racket Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to racket-users+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
At Tue, 23 Oct 2018 17:24:38 -0400, Christopher Lemmer Webber wrote: > Somehow I'm triggering this error in Goblins. > > ; Dynamic-wind record doesn't match prompt! > > I am doing some things with delimited continuations. I'm guessing > that's related, but I'm not sure why/how one might expect to trigger > this error. Any ideas? That's an internal error, so I think it must be a bug in the implementation of delimited continuations and `dynamic-wind`. Is your example something I can run myself to track down the problem? The trigger for these kinds of bugs is often difficult to extract into a small example. Meanwhile, if you're game to try RacketCS, I'd be interested to hear whether it behaves any differently. RacketCS has a more reliable implementation of delimited continuations. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Do you manipulate delimited continuations with explicit prompts somewhere? > On Oct 23, 2018, at 7:38 PM, Christopher Lemmer Webber > wrote: > > Christopher Lemmer Webber writes: > >> Christopher Lemmer Webber writes: >> >>> Somehow I'm triggering this error in Goblins. >>> >>> ; Dynamic-wind record doesn't match prompt! >>> >>> I am doing some things with delimited continuations. I'm guessing >>> that's related, but I'm not sure why/how one might expect to trigger >>> this error. Any ideas? >>> >>> Thoughts? >>> - Chris >> >> Hm okay, my code is making things run out of memory I think and that's >> causing weird errors :) >> >> I'll try to figure out the source of that. > > Never mind, it's still happening regardless of the memory issue, but > inconsistently. I'm not sure of the source of the error. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Christopher Lemmer Webber writes: > Christopher Lemmer Webber writes: > >> Somehow I'm triggering this error in Goblins. >> >> ; Dynamic-wind record doesn't match prompt! >> >> I am doing some things with delimited continuations. I'm guessing >> that's related, but I'm not sure why/how one might expect to trigger >> this error. Any ideas? >> >> Thoughts? >> - Chris > > Hm okay, my code is making things run out of memory I think and that's > causing weird errors :) > > I'll try to figure out the source of that. Never mind, it's still happening regardless of the memory issue, but inconsistently. I'm not sure of the source of the error. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] "Dynamic-wind record doesn't match prompt!" error
Christopher Lemmer Webber writes: > Somehow I'm triggering this error in Goblins. > > ; Dynamic-wind record doesn't match prompt! > > I am doing some things with delimited continuations. I'm guessing > that's related, but I'm not sure why/how one might expect to trigger > this error. Any ideas? > > Thoughts? > - Chris Hm okay, my code is making things run out of memory I think and that's causing weird errors :) I'll try to figure out the source of that. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.