Score:1

Use of uninitialized value in numeric eq (==) at /usr/share/perl5/Net/Server/Fork.pm line 168

jp flag
Dom

On my new Debian Bookworm, the file /usr/share/perl5/Net/Server/Fork.pm generates an error in logs each time Munin calls it. The error logged is

"Use of uninitialized value in numeric eq (==) at /usr/share/perl5/Net/Server/Fork.pm line 168."

In Debian Bullseye, there is no error.

By the way, here are the differences between the two versions :

5c5
< #  Copyright (C) 2001-2017
---
> #  Copyright (C) 2001-2022
146a147
>         $self->register_child($pid, 'fork');
167c168
<     if (SOCK_DGRAM == $sock->getsockopt(SOL_SOCKET,SO_TYPE)) {
---
>     if (SOCK_DGRAM == unpack('i', $sock->getsockopt(SOL_SOCKET, SO_TYPE))) {

The line 168 is the last diff, where the problem occurs.

I don't know the Perl, so how can I solve this and report the error to Perl package owner ?

Score:1
my flag

It looks like this issue is already reported to the project in github perl-net-server issue 32. You could add your own analysis there to see if this can get better attention.

I don't see it reported in the central Perl bug tracking system so you might want to add it there. If so, please include a link to the github issue.

The code fix for this should be pretty easy:

my $sockopt = unpack('i', $sock->getsockopt(SOL_SOCKET, SO_TYPE));
if (defined $sockopt and SOCK_DGRAM == $sockopt) {

assuming that variable name isn't used nearby in the code.

jp flag
Dom
Thanks a lot :-)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.