Skip Menu |

This queue is for tickets about the Statistics-R CPAN distribution.

Report information
The Basics
Id: 11918
Status: resolved
Priority: 0/
Queue: Statistics-R

People
Owner: Nobody in particular
Requestors: erich.greene [...] yale.edu
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: $R->read freezes sporadically
(perl 5.8.0, Linux kernel 2.4.27, glibc 2.3.2) Every so often, calling the read method ($R->read, where $R is a Statistics::R object) causes the program to hang. It might be the 1st call in one run of the program and the 160th in another, but it happens sooner or later. Specifying a timeout [$R->read(5)] doesn't help. (I'm assuming the $TIMEOUT is a time in seconds, the documentation doesn't actually say.) When the program does freeze, there's always a file called "input.1.r" in /tmp/Statistics-R, and the last line of process.log contains some number other than 1. Renaming the input file to match the last line of process.log ends the freeze (though read sometimes returns ''). I've tried wrapping the read in an eval and setting an alarm to break out of a freeze: my $rsays; eval { local $SIG{ALRM} = sub {die "hung\n"}; alarm 5; $rsays = $R->read; alarm 0; }; {then checks on $@, etc} This fails: invoking read apparently derails the alarm. Any child processes (whatever they're doing) also freeze when the parent chokes on a read.
Hi, Thanks for the bug report. I have refactored the Statistics::R code (version 0.20). Since it now uses pipes instead of files anymore for the communication between Perl and R, the bug should be gone. Please, re-open the ticket if you still experience the problem with the new version though. Regards, Florent