Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

inn-2.4.5 core dumps at startup after upgrade to perl 5.8.9

2 views
Skip to first unread message

Michael Grimm

unread,
Jan 20, 2009, 4:27:18 AM1/20/09
to
Hi -

I'm running FBSD 7.1-p2 and inn-2.4.5 with largefile, ovdb, and Perl
filtering support in a jail without any difficulties sofar.

Recently, I did upgrade Perl to 5.8.9 (FBSD port upgrade), and did
re-compile inn (libperl.so at different location).

Now, innd dumps core at startup, reproducibly:
|<kern.info> kernel: pid 25961 (innd), uid 8: exited on signal 10 (core dumped)

Either reverting back to Perl 5.8.8, or compiling inn without Perl
filtering support leads to a stable innd.

Another FBSD user confirmed my observation under the same condition. Has
anybody else difficulties with Perl 5.8.9? Either FBSD or any other OS?

Regards,
Michael
--
to let

D. Stussy

unread,
Jan 20, 2009, 6:35:14 PM1/20/09
to
"Michael Grimm" <tras...@odo.in-berlin.de> wrote in message
news:gl45dm$t3o$1...@odo.in-berlin.de...

If you were upgrading perl, why didn't you try version 5.10.0?


Jeffrey M. Vinocur

unread,
Jan 20, 2009, 9:47:53 PM1/20/09
to
In article <gl45dm$t3o$1...@odo.in-berlin.de>,
Michael Grimm <tras...@odo.in-berlin.de> wrote:
>
>I'm running FBSD 7.1-p2 and inn-2.4.5 [...]

>
>Recently, I did upgrade Perl to 5.8.9 (FBSD port upgrade), and did
>re-compile inn (libperl.so at different location).
>
>Now, innd dumps core at startup, reproducibly:

Yup, we had just started discussing this on inn-workers in the
past few days. It's clearly something about INN 2.4.5 and Perl
5.8.9, not sure if FreeBSD is critical or not.

Is anyone running another OS and Perl 5.8.9 that could try to
reproduce this?


Michael, if you are up for compiling INN and/or your Perl
libraries with debugging support and trying to investigate
further with gdb, that could be very helpful. It seems to be
something deep inside the initialization routines for the Perl
hooks, which is pretty hard to debug by intense concentration
alone (although I tried).


--
Jeffrey M. Vinocur
je...@litech.org

Message has been deleted

Julien ÉLIE

unread,
Jan 21, 2009, 12:54:43 PM1/21/09
to
Hi Michael,

> Recently, I did upgrade Perl to 5.8.9 (FBSD port upgrade), and did
> re-compile inn (libperl.so at different location).

Could you please try to apply these two patches to lib/perl.c?

http://inn.eyrie.org/trac/changeset/7938/branches/2.4/lib/perl.c?format=diff&new=7938
http://inn.eyrie.org/trac/changeset/7940/branches/2.4/lib/perl.c?format=diff&new=7940


I see that I fixed two things *after* the release of INN 2.4.5:

http://inn.eyrie.org/trac/changeset/7938/branches/2.4/lib/perl.c
http://inn.eyrie.org/trac/changeset/7940/branches/2.4/lib/perl.c

The second one has an impact on the arguments given to PERL_SYS_INIT3.
(I committed it because it otherwise raised a warning with Perl 5.10.0.)

--
Julien ÉLIE

« L'éternité, c'est long, surtout vers la fin. » (Woody Allen)

Michael Grimm

unread,
Jan 21, 2009, 2:30:38 PM1/21/09
to
Julien ÉLIE <iul...@nom-de-mon-site.com.invalid> wrote:

>> Recently, I did upgrade Perl to 5.8.9 (FBSD port upgrade), and did
>> re-compile inn (libperl.so at different location).
>
> Could you please try to apply these two patches to lib/perl.c?
>
> http://inn.eyrie.org/trac/changeset/7938/branches/2.4/lib/perl.c?format=diff&new=7938
> http://inn.eyrie.org/trac/changeset/7940/branches/2.4/lib/perl.c?format=diff&new=7940

Good news! Your patches did the trick:

| Jan 21 20:12:02 <news.warn> test.invalid innd: SERVER perl filtering enabled
| Jan 21 20:12:02 <news.notice> test.invalid innd: SERVER starting

| test> telnet localhost 119
| Trying 127.0.0.1...
| Connected to localhost.
| Escape character is '^]'.
| 200 test.invalid InterNetNews NNRP server INN 2.4.5 ready (posting ok).

Here's the combined patch for those who want to apply:

#v+
--- inn-2.4.5/lib/perl.c 2008-06-29 19:56:57.000000000 +0200
+++ inn-2.4.5-1/lib/perl.c 2009-01-21 19:36:03.000000000 +0100
@@ -110,14 +110,18 @@
if (PerlCode == NULL) {
/* Perl waits on standard input if not called with '-e'. */
int argc = 3;
- const char *argv[] = { "innd", "-e", "0", NULL };
- char *env[] = { NULL };
+ const char *argv_innd[] = { "innd", "-e", "0", NULL };
+ char **argv = (char **)argv_innd; /* Cast required by Perl 5.10. */
+ char **env = { NULL };
#ifdef PERL_SYS_INIT3
PERL_SYS_INIT3(&argc, &argv, &env);
#endif
PerlCode = perl_alloc();
perl_construct(PerlCode);
- perl_parse(PerlCode, xs_init, argc, (char **)argv, env) ;
+#ifdef PERL_EXIT_DESTRUCT_END
+ PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
+#endif
+ perl_parse(PerlCode, xs_init, argc, argv, env) ;
}

if (startupfile != NULL && filterfile != NULL) {
#v-

Thank you very much. I'll let the FreeBSD port maintainer know about
that fix.

Julien ÉLIE

unread,
Jan 21, 2009, 3:01:47 PM1/21/09
to
Hi Michael,

> Good news! Your patches did the trick:

That's great! Thanks for having tested them.


> - const char *argv[] = { "innd", "-e", "0", NULL };
> - char *env[] = { NULL };
> + const char *argv_innd[] = { "innd", "-e", "0", NULL };
> + char **argv = (char **)argv_innd; /* Cast required by Perl 5.10. */
> + char **env = { NULL };

This cast seems to also be required by Perl 5.8.9 then.
When I tested with Perl 5.10, innd worked without the cast (but complained
with a warning during the build). It was with Debian.

Perl 5.8.9 is not packaged for Debian (they directly switched to 5.10.0)
and I have not tested it. Therefore, I do not know whether the issue is specific
to FreeBSD.


> I'll let the FreeBSD port maintainer know about that fix.

Thanks!

--
Julien ÉLIE

« La vie ne vaut rien. Mais rien ne vaut la vie. » (André Malraux)

Michael Grimm

unread,
Jan 21, 2009, 5:58:11 PM1/21/09
to
Julien ÉLIE <iul...@nom-de-mon-site.com.invalid> wrote:

> This cast seems to also be required by Perl 5.8.9 then. When I tested
> with Perl 5.10, innd worked without the cast (but complained with a
> warning during the build). It was with Debian.
>
> Perl 5.8.9 is not packaged for Debian (they directly switched to
> 5.10.0) and I have not tested it. Therefore, I do not know whether
> the issue is specific to FreeBSD.

I have to confess that I didn't watch for warning messages during
compilation of INN against Perl 5.8.9, thus, it could have been the case
as well. BTW, the compiler version used is: gcc (GCC) 4.2.1 20070719
[FreeBSD], if one suspects a compiler issue.

Thanks again for your efforts.

0 new messages