Results 1 to 4 of 4

Thread: [SOLVED] "Use of uninitialized value in subtraction (-) ...&quot

  1. #1
    Join Date
    Dec 2009
    Posts
    75
    Rep Power
    5

    Default [SOLVED] "Use of uninitialized value in subtraction (-) ...&quot

    Hi

    My Zimbra Version:
    zcs-6.0.3_GA_1915.UBUNTU8_64.20091118125312

    I get the following warning in the "/opt/zimbra/zmstat/zmstat.out" file very often.
    Code:
    Use of uninitialized value in subtraction (-) at /opt/zimbra/libexec/zmstat-allprocs line 118.
    With this warning the file grows ~10MB per hour!

    Is there a way to avoid this warning?

    Yogg
    Release 7.1.2_GA_3268.UBUNTU8_64 UBUNTU8_64 NETWORK edition.

  2. #2
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Did you try searching the forums ? http://www.zimbra.com/forums/adminis...ed+subtraction

  3. #3
    Join Date
    Dec 2009
    Posts
    75
    Rep Power
    5

    Default

    Yea i have search for this and found the Bug report and there is only a solution for the 48h statistic Bug.

    The only thing that says something to avoid the warnings was this:
    Code:
    By putting an if around the variable the warnings seem to be stopped.  I'm
    really not sure if this is in any way correct but FYI, this is how I modified
    my zmstat_allproc delta_stat function:
    
    sub delta_stat($$$$) {
        my $prev_stats = shift;
        my $curr_stats = shift;
        my $pid  = shift;
        my $stat = shift;
    
        if($prev_stats->{$pid}->{$stat}) {
            $curr_stats->{$pid}->{$stat} - $prev_stats->{$pid}->{$stat};
        } else {
            0;
        }
    }
    The author says he has no idea if this is correct. Maybe this self made patch is in some way or in some environments harmful and i get other problems. There are also no comments about it if this is a good or bad solution.

    The only thing that i can say is that i have no idea about the Zimbra code and i don't would test such patches (where the author is not sure about it) on working environments.

    Can someone say something about this patch?

    I have also found out that this problem only comes up in 64 bit environments. I have some 32 bit Zimbra servers with the same version where i don't get this warnings.
    By the side the "sub delta_stat($$$$)" functions in "/opt/zimbra/libexec/zmstat-allprocs" are on 64 and 32 bit identically (line 111 - 119).
    It seems for me that the above posted patch only avoid the warning and does not solve the problem itself.
    How can it be that "$prev_stats->{$pid}->{$stat}" is uninitialized?

    And sorry i have to say that but i think the only one who should mark my posts as solved was me

    Yogg

    Edit:
    Is there a way to fix the tile of the post?
    Release 7.1.2_GA_3268.UBUNTU8_64 UBUNTU8_64 NETWORK edition.

  4. #4
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    25

    Default

    Quote Originally Posted by yogg1 View Post
    And sorry i have to say that but i think the only one who should mark my posts as solved was me
    Nope; I am marking as solved as a bug has been filed and the officially supported fix will be shown there when the Zimbra team resolve it.

Similar Threads

  1. upgrade to 6.0.2 stats and status no longer working
    By Richelieu in forum Installation
    Replies: 62
    Last Post: 02-18-2011, 04:07 AM
  2. zmstat.out has 2.8GB !?
    By gruad23 in forum Administrators
    Replies: 13
    Last Post: 07-22-2010, 10:40 AM
  3. Replies: 96
    Last Post: 01-23-2010, 06:47 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •