Menu

#2985 Use of uninitialized value

2.8
closed
General (881)
5
2013-01-25
2012-07-19
Ling
No

A customer reported that they have seen the following warnings when running xcatd in debug mode.
Use of uninitialized value in concatenation (.) or string at /opt/xcat/lib/perl/xCAT_plugin/tabutils.pm line 220, <$readpipe> line 797.

Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/xcatd line 1213, <$readpipe> line 797.

Use of uninitialized value in numeric eq (==) at /opt/xcat/lib/perl/xCAT_plugin/nodestat.pm line 112, <$readpipe> line 797.

I got the 2 of them recreated by the following steps:

  1. run xcatd -f, or comment out the following two line from /opt/xcat/sbin/xcatd and restart xcatd
    open STDOUT, '>/dev/null';
    open STDERR, '>/dev/null';

  2. nodestat compute21

    Use of uninitialized value in numeric eq (==) at /opt/xcat/lib/perl/xCAT_plugin/nodestat.pm line 112, <$readpipe> line 785.
    xCAT: Allowing nodestat to compute21 for root from localhost
    Use of uninitialized value in numeric eq (==) at /opt/xcat/lib/perl/xCAT_plugin/nodestat.pm line 112, <$readpipe> line 785.
    compute21: noping

  3. gettab node=service nodelist.groups <---- service is a group name.

    xCAT: Allowing gettab node=service nodelist.groups for root from localhost
    Use of uninitialized value in concatenation (.) or string at /opt/xcat/lib/perl/xCAT_plugin/tabutils.pm line 220, <$readpipe> line 785.

But I cannot get the following recreated:
Use of uninitialized value in numeric comparison (<=>) at /usr/sbin/xcatd line 1213, <$readpipe> line 797.

I have tested againt xCAT 2.7.2 and 2.7.4.

Please investigate and fix.

Discussion

  • Bruce

    Bruce - 2012-08-28

    Could you take a look at these? If you can't recreate the xcatd problem either, we probably will have to ask the customer for more info. Thx.

     
  • Lissa Valletta

    Lissa Valletta - 2012-08-30

    I fixed 3. # gettab node=service nodelist.groups <---- service is a group name.
    tabutils Committed revision 13671.

     
  • Lissa Valletta

    Lissa Valletta - 2012-08-30

    I also can create the nodestat problem on Linda's machine
    [root@hpcrhmn xCAT_plugin]# rhsn nodestat rhsn
    -bash: rhsn: command not found
    [root@hpcrhmn xCAT_plugin]# nodestat rhsn
    Use of uninitialized value in numeric eq (==) at /opt/xcat/lib/perl/xCAT_plugin/nodestat.pm line 112, <$readpipe> line 809.
    xCAT: Allowing nodestat to rhsn for root from localhost.localdomain
    Use of uninitialized value in numeric eq (==) at /opt/xcat/lib/perl/xCAT_plugin/nodestat.pm line 112, <$readpipe> line 809.

    But it is in this check which is in every plugin preprocess request. I don't know why it would fail

    if ((defined($req->{_xcatpreprocessed})) &&
    ($req->{_xcatpreprocessed}->[0] == 1)) {
    return [$req];
    }

     
  • Lissa Valletta

    Lissa Valletta - 2012-08-30

    I 'll add another error to the list. When running in xcatd debug ( commented out the STD* lines. And restart xcatd. I get
    Stopping xCATd Not a subroutine reference at /opt/xcat/sbin/xcatd line 46.
    this is 2.7.4

     
  • Lissa Valletta

    Lissa Valletta - 2012-09-28
    • milestone: 2.7.5 --> 2.8
     
  • Lissa Valletta

    Lissa Valletta - 2013-01-07
    • status: open --> pending
     
  • Lissa Valletta

    Lissa Valletta - 2013-01-07

    Fixed nodestat.pm in 2.8
    Sending plugins/nodestat.pm
    Transmitting file data .
    Committed revision 14786.
    Change check to
    if (defined $req->{_xcatpreprocessed}->[0] && $req->{_xcatpreprocessed}->[0] == 1) { return [$req]; }

    Instead of

    if ( (defined($req->{_xcatpreprocessed}))
    && ($req->{_xcatpreprocessed}->[0] == 1))
    {
    return [$req];
    }

     
  • Lissa Valletta

    Lissa Valletta - 2013-01-25
    • status: pending --> closed
     
MongoDB Logo MongoDB