NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


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

[LDM #DAM-692844]: LDM 6.8.0 Bug - plotMetrics in Perl v5.6.1



Eric,

> Thank you for the wonderful workshop, it was a blast.

You're most welcome.

> Hate to have some bad news but we found something.
> 
> In Perl 5.6.1, it appears the close() command improperly triggers the
> die when you run the "top -b -n 1 |". I've tested and it appears to be a
> bug with the filehandle.

That does sound like a bug.  The Perl documentation explicitly gives that 
construction as an example for when you don't want to read all the input.

> Through testing in 5.6.1 I found you are required to complete the read
> of the handle, at least thats what my tests have shown. The line:
> 
> last if ($haveMem && $haveSwap);
> 
> breaks the loop. Since the filehandle still has data in it the close()
> seems to return a value. A second loop that just cycles through the
> remaining handle should do the trick. That is what we plan to implement.
> ie:
> 
> 
> I've tried to SEEK_END with no success. So it appears to be an issue
> with the the Perl IOLayer. We began receiving errors through the cron
> when we added the 'ldmadmin addmetrics' and investigation into it found
> this to be an issue.
> 
> Not that we SHOULD be using Perl 5.6.1 and we plan to upgrade. But this
> should be good for you to know if it comes up.

I'd upgrade the Perl installation (e.g., "yum install perl" as root).

> I've attached our patch if you'd want it.

Thanks.

> Thanks again!
> 
> --
> Eric M. Hudish
> Cell: +1.724.977.3314
> 359 Toftrees Avenue Apt. 302
> State College, PA 16803
> 
> PGP Security Available
> Search http://keyserver.pgp.com


Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: DAM-692844
Department: Support LDM
Priority: Normal
Status: Closed