Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 24956
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: jettero [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.9917
Fixed in: (no value)



Subject: POE::Wheel::ReadLine out-of-band put() vs get() problem
I posted about this in the perl.poe newsgroup but didn't get much of a response -- except by one fellow that was able to reproduce about half my problem... I have attached a small program that should demonstrate the problem if all goes well. Issue /np 500 to see things behave as expected and issue /go 500 to see things go kaflooy. On my screen, not only will it fail to print all the lines, but it will irrevocably mess up the prompt display until I issue a program restart. Something strange goes wrong, but despite flipping through the sources for a few hours (adding the odd debugging statement), I was unable to find any reason for the problem -- besides something internal to libreadline? But I don't think that even gets loaded. -paul -- If riding in an airplane is flying, then riding in a boat is swimming. 85 jumps, 36.0 minutes of freefall, 69.1 freefall miles.
Subject: small_example
Download small_example
application/octet-stream 1.3k

Message body not shown because it is not plain text.

On Wed Feb 14 16:59:27 2007, JETTERO wrote: Show quoted text
> I posted about this in the perl.poe newsgroup but didn't get much of a > response -- except by one fellow that was able to reproduce about half > my problem... > > I have attached a small program that should demonstrate the problem if > all goes well. Issue /np 500 to see things behave as expected and issue > /go 500 to see things go kaflooy. > > On my screen, not only will it fail to print all the lines, but it will > irrevocably mess up the prompt display until I issue a program restart. > Something strange goes wrong, but despite flipping through the sources > for a few hours (adding the odd debugging statement), I was unable to > find any reason for the problem -- besides something internal to > libreadline? But I don't think that even gets loaded.
Hi, Paul! I also tried this but was unable to reproduce your problem. All 500 lines showed up. I followed up on the group where you posted about it.
From: jettero [...] cpan.org
On Tue Feb 27 01:20:19 2007, RCAPUTO wrote: Show quoted text
> Hi, Paul! I also tried this but was unable to reproduce your problem. > All 500 lines showed up. I followed up on the group where you posted > about it.
I posted further there too, but I might as well keep both threads updated. I'm really flabbergasted that so few seem to have this problem. I wondered if it could be my libreadline, but I don't think ::ReadLine pulls that in. Do you have any slower machines you could try it on? It seems to be a timing issue. Your machine could literally be too fast for the test. -- If riding in an airplane is flying, then riding in a boat is swimming. 85 jumps, 36.0 minutes of freefall, 69.1 freefall miles.
I don't seem to have a slow enough machine. I tried /go up to 100000 without loss and without prompt corruption. I ran "perl -wle '1 while 1'" loops on the machines (they're single core) to try to slow them down. It all worked well. ... ** spam (99998/100000): &=@21/_=*>A'4!6?B_A5<3CC8(3+#7&#95#->#.%9!1BB934#3"&(7!*-<4?;.5?$48&65>A!6'?-@;& ** spam (99999/100000): &:?=/;$".6/4BC>57*".*91$!"C7#!#>+&3?3-2'1_.74=1;,:C@8/6(?$>=C@3B48&*:%-&*=706@71 ** spam (100000/100000): 4*3!-:C.%<,$_)-24=1/_6669>0+@=0%9020=8*@9C-.8B@A<+@'/>(+<8&%C0#-$4C_@@5>.,2306') I'm sure the problem exists, but I cannot test it. I'll leave the ticket open as "stalled" for now. -- Rocco On Sat Mar 03 07:18:24 2007, JETTERO wrote: Show quoted text
> On Tue Feb 27 01:20:19 2007, RCAPUTO wrote:
> > Hi, Paul! I also tried this but was unable to reproduce your problem. > > All 500 lines showed up. I followed up on the group where you posted > > about it.
> > I posted further there too, but I might as well keep both threads > updated. I'm really flabbergasted that so few seem to have this > problem. I wondered if it could be my libreadline, but I don't think > ::ReadLine pulls that in. > > Do you have any slower machines you could try it on? It seems to be a > timing issue. Your machine could literally be too fast for the test.
Subject: POE::Wheel::ReadLine out-of-band put() problem -- [small_example]
On Sun Jul 22 19:31:13 2007, RCAPUTO wrote: Show quoted text
> I'm sure the problem exists, but I cannot test it. > I'll leave the ticket open as "stalled" for now.
I don't recall opening a ticket on this, although, I do remember the conversation attached to it. Huh. I imagined it was on the mailing list I guess. I have renewed interest in this problem. I've attached the "small_example" I've been working with (also a gist: http://gist.github.com/112786). In the small example is a POD with a more detailed description of the problem, including some notes from another guy who saw this (from irc://irc.perl.org/#poe). I would be happy to spend as much time on this as is required -- to locate the problem, write a test for it, or even help write a patch -- but I've no idea what could possibly cause it. If you have any ideas about where to begin looking or how to approach the problem, they would be appreciated. -- If riding in an airplane is flying, then riding in a boat is swimming. 109 jumps, 44.4 minutes of freefall, 85.0 freefall miles.
Download small_example
application/octet-stream 4.8k

Message body not shown because it is not plain text.

Fixed in revision 2768. For some reason STDOUT buffers may overrun when STDIN is non-blocking. Setting STDIN to blocking works around the problem in a completely non-intuitive way.
Subject: Re: [rt.cpan.org #24956] POE::Wheel::ReadLine out-of-band put() vs get() problem
Date: Fri, 1 Jan 2010 08:25:05 -0500
To: bug-POE [...] rt.cpan.org
From: Paul Miller <jettero [...] cpan.org>
On Thu, Dec 31, 2009 at 9:46 PM, Rocco Caputo via RT <bug-POE@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=24956 > > > Fixed in revision 2768.  For some reason STDOUT buffers may overrun when > STDIN is non-blocking.  Setting STDIN to blocking works around the > problem in a completely non-intuitive way. >
... sorry to reopen the ticket, but I just wanted to say: wow, thanks. I was going to put in some real effort to find this next week (I wanted it fixed for something at work) and this is a surprise. -Paul -- If riding in an airplane is flying, then riding in a boat is swimming. 114 jumps, 47.2 minutes of freefall, 90.4 freefall miles.