[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Buggy perl's socket library: incorrect perl build?

Hi again,

while I'm at it... I initially heard (thanks to Aurelien) of ktrace when
I asked how to debug a buggy Socket.pm (or his associated .so part).

After some tests, it looks like a normal bind() call in a C program is
successful (after all, many servers work well on GNU/kFreeBSD), with 16
as last (3rd) parameter. On GNU/Linux, a Perl program using Socket.pm
also implies a bind() call with the correct 3rd parameter. But on
GNU/kFreeBSD, this parameter is set to 0, which I guess is quite wrong
and explains while I'm getting "Invalid argument".

[For references, see #415607, #415611, vncserver is using "use Socket;"
to detect a free port to bind the server to. I'm also Cc-ing the
maintainer, Ola, so that he doesn't lose time on debugging what is a
GNU/kFreeBSD problem.]

I also wrote some scripts to automate the download and comparison of a
"personal" build log and one from buildd.d.o or experimental.ftbfs.de,
and here is the wdiff output:

(FWIW, you can view it with syntax coloration using ":set ft=wdiff"
under vim.)

The following changes are repetitive but harmless:
> Processing hints file [-hints/linux.pl-] {+hints/gnukfreebsd.pl+}
since gnukfreebsd.pl sources linux.pl.

What is more embarrassing IMHO is lines 77-97 (library detection) as
well as the compilation of many files without LIBC:
> -DLIBC="/lib/libc-2.3.6.so"     on GNU/Linux
> -DLIBC=""                       on GNU/kFreeBSD

I didn't dig that much (though I probably will soon), but I wanted to
make sure that this problem is known. My guess is a buggy DynaLoader due
to wrong library detection, which could explain a wrong call to bind().
Also, I'm getting weird "Inappropriate ioctl for device" when issuing a
simple "wdiff" call with two parameters, from Perl. I don't know whether
it is related, but I'd say that Perl might be buggy in more areas that
the sole Socket.pm case.  Anyway, I'm using it intensively and these are
the only troubles I've encountered by now.


Cyril Brulebois

Attachment: pgpSKSBipGMAD.pgp
Description: PGP signature

Reply to: