innfeed - "blocked sleeping 120" errors"

Julien ÉLIE julien at trigofacile.com
Wed Apr 15 19:56:27 UTC 2009


Hi Petr,

> And this is gdb output:
>
> #0  0x282d3674 in Perl_pop_scope ()
>   from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> [New LWP 100303]
> (gdb) bt
> #0  0x282d3674 in Perl_pop_scope ()
>   from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> #1  0x2825a1bb in perl_destruct ()
>   from /usr/local/lib/perl5/5.8.8/mach/CORE/libperl.so
> #2  0x08069aa9 in PerlClose () at perl.c:237
> #3  0x08059227 in JustCleanup () at innd.c:280
> #4  0x0805ee47 in SITEparsefile (StartSite=true) at newsfeeds.c:943
> #5  0x08059b1e in main (ac=134813491, av=0x0) at innd.c:651
> (gdb)
>
> This is not fatal error, but maybe this is not graceful shutdown?

Oh, that's a Perl dump core.
Strange it is not robust.

I believe the problem is because innd wants to destroy a Perl interpretor
which has still not been created.

Here is a patch:


Index: lib/perl.c
===================================================================
--- lib/perl.c  (révision 8406)
+++ lib/perl.c  (copie de travail)
@@ -234,11 +234,13 @@
 */
 void PerlClose(void)
 {
-   perl_destruct(PerlCode);
-   perl_free(PerlCode);
+   if (PerlCode != NULL) {
+      perl_destruct(PerlCode);
+      perl_free(PerlCode);
 #ifdef PERL_SYS_TERM
-   PERL_SYS_TERM();
+      PERL_SYS_TERM();
 #endif
+   }
    PerlFilterActive = false;
 }



Thanks for having reported it!

I see that Python already uses a check (close_method != NULL) in innd.

As for nnrpd, the Perl interpretor is never destructed!  I assume
perl_destruct is not called because it should be persistent between
all nnrpd instances -- only one for all nnrpd in daemon mode.  But
when nnrpd is spawned by innd, one for each nnrpd is called isn't it?
Isn't it a waste?  Or is there something I misunderstand regarding
Perl interpretors?

-- 
Julien ÉLIE

« Pour aller plus vite, j'additionne toujours de bas en haut :
  je fais du même coup l'addition et la preuve. » (Aurélien Scholl) 




More information about the inn-workers mailing list