System:
POPfile v1.1.3 under Debian GNU/Linux (32bit)
[I installed my own copy of POPfile.]
Problem: A transient(?) error seems to have failed
the launch of a new instance of POPfile.
I show the session log below.
The script to run POPfile, bin/run-popfile.sh
contains the following environnment variables, etc.
:
#
PD=/extra/ishikawa/download/POPFILE-DIR
#PD=/new-hd1/extra/ishikawa/download/POPFILE-DIR
#PD=/tmp/usb-old-extra/ishikawa/download/POPFILE-DIR
POPFILE_USER=$PD/
POPFILE_ROOT=$PD/
export POPFILE_USER POPFILE_ROOT
perl $PD/popfile.pl \
--set html_language=Nihongo \
--set html_local=0 \
--set html_port=9090 \
--set pop3_port=1110
--- end quote ---
--- Start Session Log: with a comment line
debian-vbox-ci:/home/ishikawa# bin/run-popfile.sh
POPFile Engine loading
Loading...
{core: config mq logger history}
{classifier: bayes wordmangle}
{interface: xmlrpc html}
{proxy: pop3 nntp smtp}
{services: imap}
POPFile Engine v1.1.3 starting
Initializing...
{core: config history logger mq}
{classifier: bayes wordmangle}
{interface: html xmlrpc}
{proxy: nntp pop3 smtp}
{services: imap}
Starting...
{core:
A copy of POPFile appears to be running.
Attempting to signal the previous copy.
Waiting 10 seconds for a reply.
The other POPFile (4393) failed to signal back, starting new copy (32396)
config history logger mq}
{classifier: bayes wordmangle}
{interface: html}
{proxy: pop3}
{services:}
POPFile Engine v1.1.3 running
panic: attempt to copy freed scalar 9c71e0c to 982c1d0 at /extra/ishikawa/download/POPFILE-DIR//POPFile/MQ.pm line 330.
**** The above is the error line ??? *****
POPFile Engine v1.1.3 stopping
Stopping...
{classifier: bayes wordmangle}
{core: config history logger mq}
{interface: html}
{proxy: pop3}
{services:}
POPFile Engine v1.1.3 terminated
debian-vbox-ci:/home/ishikawa# bin/run-popfile.sh
POPFile Engine loading
Note the error on line 330 of MQ.pm
/extra/ishikawa/download/POPFILE-DIR//POPFile/MQ.pm line 330.
Failure to run popfile when the previous copy is deemed non-existent
doesn't happen very often. (I think I see this particular bug for the
first time.)
It is in read_pipe. My guess is that there was some transitory
error or something. But I am not sure.
Just thought to report this bug for someone in the know to
take pre-cautionary measure (like the pipe cache? is being removed before use, the child process disappearing before having a chance to wait for it, etc.???).
265 #----------------------------------------------------------------------------
266 #
267 # read_pipe_
268 #
269 # reads a single message from a pipe in a cross-platform way.
270 # returns undef if the pipe has no message
271 #
272 # $handle The handle of the pipe to read
273 #
274 #----------------------------------------------------------------------------
275 sub read_pipe_
276 {
277 my ( $self, $handle ) = @_;
278
279 if ( $^O eq "MSWin32" ) {
280
281 # bypasses bug in -s $pipe under ActivePerl
282
283 my $message; # PROFILE PLATFORM START MSWin32
284
285 if ( &{ $self->{pipeready_} }($handle) ) {
286
287 # add data to the pipe cache whenever the pipe is ready
288
289 sysread($handle, my $string, -s $handle);
290
291 # push messages onto the end of our cache
292
293 $self->{pipe_cache__} .= $string;
294 }
295
296 # pop the oldest message;
297
298 $message = $1 if (defined($self->{pipe_cache__}) && # PROFILE BLOCK START
299 ( $self->{pipe_cache__} =~ s/(.*?\n)// ) ); # PROFILE BLOCK STOP
300
301 return $message; # PROFILE PLATFORM STOP
302 } else {
303
304 # do things normally
305
306 if ( &{ $self->{pipeready_} }($handle) ) {
307 return <$handle>;
308 }
309 }
310
311 return undef;
312 }
313
TIA