[Orca-users] Re: Orca and defunct processes on Solaris 8 [Sparc]

Blair Zajac blair at orcaware.com
Sat Aug 25 13:46:39 PDT 2001


Dave,

Can you try the following patch for Orca 0.27b1 and let me know if
your defunct processes disappear?

Best,
Blair

dmoore48 at csc.com wrote:
> 
> --- In orca-discuss at y..., Blair Zajac <blair at g...> wrote:
> > Hi,
> 
>   ^^^ Hi Blair...
> >
> > Which systems are you seeing the defunct processes on?  I'm guessing
> > its the host running Orca itself and not the hosts running
> orcallator.
> > Is this correct?
> >
>   ^^^ Yes - you're right, I'm having the problem on the host running
>   Orca, not a client.
> 
> > I'm guessing that you have compressed orcallator output files that
> > Orca is reading via zcat or bzcat and its not cleaning them up.
> >
>   ^^^ Orca is running gunzip / bunzip2 against the output files, and
>   the spawned jobs are dropping into defunct.
> 
> > Which version of Perl and Orca are you using?  The newer versions
> may
> > handle this better?
> 
>   ^^^ I'm running ActivePerl-5.6 and Orca-1.27bl
> 
> >
> > Best,
> > Blair
> 
>   ^^^ Cheers.
> 
>   Dave.
> 
> >
> > David Moore wrote:
> > >
> > > Hi..
> > >      I'm running an Orca configuration with around 20 Solaris 7 /
> 8
> > > clients
> > >      [all Sparc].
> > >
> > >      The orca server process runs on a Solaris 8 box.
> > >
> > >      The orca / orcallator.se processes seem to be generating
> large
> > > numbers
> > > of
> > >      defunct processes [around 20 per day current average.]
> > >
> > >      The number of defunct processes I'm finding seems to be
> gradually
> > > increasing.
> > >
> > >      Is this a known problem on Solaris, and does anyone have a
> > > solution
> > > other than
> > >      running a cron job to kill and restart orca / orcallator.se
> to
> > > hose
> > > the defunct processes.
> > >
> > >     Thanks  in advance.
> > >
> > >     Dave Moore.
> > >
> > >                    Yahoo! Groups Sponsor
> > >                           [Image]
> > >
> > >
> Service.
> 
>                    Yahoo! Groups Sponsor
>                           [Image]
> 
> 
-------------- next part --------------
diff -ru ../orca-0.27b1/lib/Orca/OpenFileHash.pm ./lib/Orca/OpenFileHash.pm
--- ../orca-0.27b1/lib/Orca/OpenFileHash.pm	Wed Feb 28 16:15:56 2001
+++ ./lib/Orca/OpenFileHash.pm	Fri Aug 24 09:53:03 2001
@@ -212,6 +212,16 @@
   }
 }
 
+sub is_pipe {
+  my ($self, $fid) = @_;
+
+  if (defined (my $ref = $self->[I_HASH]{$fid})) {
+    return $ref->[I_FID_IS_PIPE];
+  } else {
+    return;
+  }
+}
+
 sub is_open {
   defined $_[0]->[I_HASH]{$_[1]};
 }
diff -ru ../orca-0.27b1/lib/Orca/SourceFile.pm ./lib/Orca/SourceFile.pm
--- ../orca-0.27b1/lib/Orca/SourceFile.pm	Thu Mar 29 15:25:41 2001
+++ ./lib/Orca/SourceFile.pm	Fri Aug 24 09:55:01 2001
@@ -893,16 +906,17 @@
   # close the descriptor, reopen it and read all the rest of the data.
   # If neither of these cases is true, then close the file if the file
   # should be reopened next time.
-  if ($file_status == -1 or ($file_status == 2 and !$opened_new_fd)) {
+  if ($file_status == 2 and !$opened_new_fd) {
     $open_file_cache->close($fid) or
       warn "$0: warning: cannot close `$sfile_fids[$fid]' for reading: $!\n";
-    if ($file_status != -1) {
-      # Setting the last_read_time to -1 will force load_new_data to
-      # read it.
-      $self->[I_LAST_READ_TIME] = -1;
-      $number_added += $self->load_new_data;
-    }
-  } elsif ($close_once_done or $self->[I_REOPEN]) {
+    # Setting the last_read_time to -1 will force load_new_data to
+    # read it.
+    $self->[I_LAST_READ_TIME] = -1;
+    $number_added += $self->load_new_data;
+  } elsif ($file_status == -1 or
+           $close_once_done   or
+           $self->[I_REOPEN]  or
+           $open_file_cache->is_pipe($fid)) {
     $open_file_cache->close($fid) or
       warn "$0: warning: cannot close `$sfile_fids[$fid]' for reading: $!\n";
   }


More information about the Orca-users mailing list