Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6328503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:28:08+00:00 2026-05-24T17:28:08+00:00

I need some help identifying, and eliminating, the cause of an odd child process

  • 0

I need some help identifying, and eliminating, the cause of an odd child process error when polling SNMP services.

During SNMP connect, I verify SNMP connectivity by polling for the
device name until it times out:

sub snmp_close {
    my $self = shift;

    $self->{SNMP_SESSION}->close if (defined $self->{SNMP_SESSION} && $self->{SNMP_SESSION});
    $self->{SNMP_SESSION} = undef;
}

sub {
    my ($self, $ip, $community) = @_;
    # If there's a leftover session around, make sure it's closed
    $self->snmp_close;

    my ($session, $error) = Net::SNMP->session(
        -hostname => $ip,
        -community => $community,
        -nonblocking => 1,
        -version => 'snmpv2c',
        -translate => [
            -timeticks => 0x0
        ],
    );

    if (!defined $session) {
        $self->_logger->logcluck("Can't create SNMP object, error: '$error'");
        return;
    }

    $self->{SNMP_SESSION} = $session;

    my $end = time() + 90;
    while (time < $end) {
        $self->_logger->debug("Probing for SNMP connectivity, giving up in " . int($end - time()) . " seconds");
        my %sysName = $self->get_bulk('1.3.6.1.2.1.1.5');
        if(scalar keys %sysName >= 1) { # try polling sysName..
            return 1;
        }
        else {
            sleep 5;
        }
    }
    # if we've made it this far there's no hope for snmp...
    $self->_logger->warn("No SNMP connectivity after 90 seconds");
    $self->{SNMP_SESSION} = 0;
    return;
}

sub get_bulk { # return a hash of oid keys and values
    my ($self, $oid) = @_;

    $self->_logger->logdie("Not connected; call snmp_connect") if not defined $self->{SNMP_SESSION};
    $self->_logger->logdie("Connection failed") if not $self->{SNMP_SESSION};

    my %table;

    my $result = $self->snmp->get_bulk_request(
        -varbindlist => [ $oid ],
        -maxrepetitions => 20,
        -callback => [\&_table_callback, $self, \%table, $oid],
    );

    if (!defined $result) {
        $self->_logger->warn("SNMP error: '" . $self->snmp->error() . "'");
        return;
    }

    snmp_dispatcher();

    use Data::Dumper; my %_table = map {s/\Q$oid.\E//; $_} %table; $self->_logger->debug("SNMP Debug, OID polled: '$oid', response is: " . Dumper(\%_table));
    return %table;
}

Most of the time, this works flawlessly, but some percentage of the time
I get a FATAL error out of Net::SNMP::Dispatcher:

FATAL: select() error [No child processes] at perl/lib/perl5.8/Net/SNMP/Dispatcher.pm line 635.
  at perl/lib/perl5.8/Net/SNMP/Dispatcher.pm line 635
        Net::SNMP::Dispatcher::_event_select('Net::SNMP::Dispatcher=HASH(0xaca5ce0)', 4.99994683265686) called at perl/lib/perl5.8/Net/SNMP/Dispatcher.pm line 601
        Net::SNMP::Dispatcher::_event_handle('Net::SNMP::Dispatcher=HASH(0xaca5ce0)') called at perl/lib/perl5.8/Net/SNMP/Dispatcher.pm line 80
        Net::SNMP::Dispatcher::activate('Net::SNMP::Dispatcher=HASH(0xaca5ce0)') called at perl/lib/perl5.8/Net/SNMP.pm line 611
        Net::SNMP::snmp_dispatcher() called at perl/lib/perl5.8/Device.pm line 857
        Device::get_bulk('Device::Class=HASH(0xb1e405c)', 1.3.6.1.2.1.1.5) called at perl/lib/perl5.8/Device.pm line 824
        Device::snmp_connect('Device::Class=HASH(0xb1e405c)', 10.0.0.1, 'COMMUNITY_STRING') called at perl/lib/perl5.8/Device.pm line 912

(Line 857 is the snmp_dispatcher in get_bulk, above)

I’m new enough to perl — and totally new to SNMP — that I don’t really
know how to troubleshoot this. The method in question is executed in a
mod_perl CGI call, if that helps isolate the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T17:28:10+00:00Added an answer on May 24, 2026 at 5:28 pm

    Some local investigation turned up the fact that this is a side effect of multi-core machines; the child process ran on another core, and its pipe file handle was not available to the parent process.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need some help please with this error : TypeError : 'unicode' object does not
Need some help with this error. Fresh wordpress 2.9 install... Fatal error: Cannot instantiate
Need some help understanding the difference between the success and ajaxSuccess events documented here
need some help here My problem is, my app starts with a single view,
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help with this problem in implementing with XSLT, I had already implemented
Need some help gathering thoughts on this issue. Our team is moving ahead with
Need some help from javascript gurus. I have one page where http://www.google.com/finance/converter is embedded
Need some help assigning a mouseover event to display some icons that start out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.