Monitorix icon indicating copy to clipboard operation
Monitorix copied to clipboard

Use of uninitialized value in multiplication in int.pm

Open atika opened this issue 10 years ago • 19 comments
trafficstars

I just updated Monitorix and I have a new message in the logs :

Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/int.pm line 1175.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/int.pm line 1176.
1174                 if($version eq "new") {
1175                     $picz_width = $picz->{image_width} * $config->{global_zoom};
1176                     $picz_height = $picz->{image_height} * $config->{global_zoom};
1177                 } else {
1178                     $picz_width = $width + 115;
1179                     $picz_height = $height + 100;
1180                 }

If it can help, since the beginning the graph int1.1day.png works but the image for in2.1day.png is not generated without errors messages (not found).

atika avatar Feb 17 '15 22:02 atika

Please, make sure you have defined the option global_zoom in your configuration file. If not, then it means its time to update that configuration file.

mikaku avatar Feb 18 '15 08:02 mikaku

Also, what RRDtool version do you have there?

mikaku avatar Feb 18 '15 08:02 mikaku

The version of RRDtool is RRDtool 1.4.7 and I have this options defined:

enable_zoom = y
global_zoom = 1.2

atika avatar Feb 18 '15 10:02 atika

OK, thanks, I'm using 1.3.8 here, I've not tested it in 1.4 branch.

Those error messages Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/int.pm line 1175. also appear in the rest of graphs or only in this one (the Interrupts graph)?

mikaku avatar Feb 18 '15 10:02 mikaku

I have only this error message after updated all files, and since the beginning the graph int1 is working but int2 not appear (without error log message). There is a way to test only int.pm from the command line ?

atika avatar Feb 18 '15 10:02 atika

I've just download the ZIP file of the master code at Github and tested it on a CentOS 7 x86_64 with RRDtool v1.4.7 and it works finely and without any error message.

Make sure int2 already not appeared before you upgraded to the current master code at Github. Interrupts graph is an old code (still pending to a complete rewrite) that might not easily understand all architectures and it could fail when trying to show all device interrupts.

There is a way to test only int.pm from the command line ?

No, that's not possible.

Please, make sure you installed all the Monitorix components correctly in your system.

mikaku avatar Feb 18 '15 10:02 mikaku

I've noticed this isssue on a fresh Debain 7 x32 install using the apt repo from izzysoft. These errors are only seen in the log file. Graph appears to render correctly. RRDtool 1.4.7, Monitorix version 3.7.0 (12-Mar-2015).

/etc/monitorix/monitorix.conf

enable_zoom = y
global_zoom = 1

/var/log/monitorix

HTTPServer: You can connect to your server at http://localhost:8080/
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/int.pm line 1175.
Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/int.pm line 1176.

PMaynard avatar Apr 18 '15 21:04 PMaynard

Hi PMaynard,

I think that by any reason your second interrupt graph is not rendering, returning uninitialized values from the RRDtool function and ending up showing error messages when trying to multiply them for any value.

As I told in one of my previous posts, the interrupt graph has old code (still pending to a complete rewrite) that might not easily understand all architectures and it could fail when trying to show all device interrupts.

If you don't mind, you may paste the output of cat /proc/interrupts and I'll see what can I do. Thanks.

mikaku avatar Apr 20 '15 14:04 mikaku

Hi Jordi,

If it can help for future improvments, this is my output of cat /proc/interrupts. The system is Ubuntu Trusty on a XenServer virtual machine. Thanks.

           CPU0       CPU1       CPU2       CPU3
 16:  837307248          0          0          0  xen-percpu-virq      timer0
 17:       1744          0          0          0  xen-percpu-ipi       spinlock0
 18:    9330690          0          0          0  xen-percpu-ipi       resched0
 19:       2940          0          0          0  xen-percpu-ipi       callfunc0
 20:          0          0          0          0  xen-percpu-virq      debug0
 21:     588030          0          0          0  xen-percpu-ipi       callfuncsingle0
 22:    1336152          0          0          0  xen-percpu-ipi       irqwork0
 23:          0  221059732          0          0  xen-percpu-virq      timer1
 24:          0       9715          0          0  xen-percpu-ipi       spinlock1
 25:          0   13404923          0          0  xen-percpu-ipi       resched1
 26:          0       2859          0          0  xen-percpu-ipi       callfunc1
 27:          0          0          0          0  xen-percpu-virq      debug1
 28:          0     564311          0          0  xen-percpu-ipi       callfuncsingle1
 29:          0     838455          0          0  xen-percpu-ipi       irqwork1
 30:          0          0  285493562          0  xen-percpu-virq      timer2
 31:          0          0       9782          0  xen-percpu-ipi       spinlock2
 32:          0          0   11308637          0  xen-percpu-ipi       resched2
 33:          0          0       2742          0  xen-percpu-ipi       callfunc2
 34:          0          0          0          0  xen-percpu-virq      debug2
 35:          0          0     638590          0  xen-percpu-ipi       callfuncsingle2
 36:          0          0     395541          0  xen-percpu-ipi       irqwork2
 37:          0          0          0  259746856  xen-percpu-virq      timer3
 38:          0          0          0       9241  xen-percpu-ipi       spinlock3
 39:          0          0          0   11054251  xen-percpu-ipi       resched3
 40:          0          0          0       2295  xen-percpu-ipi       callfunc3
 41:          0          0          0          0  xen-percpu-virq      debug3
 42:          0          0          0     550374  xen-percpu-ipi       callfuncsingle3
 43:          0          0          0     360597  xen-percpu-ipi       irqwork3
 44:     424128          0          0          0   xen-dyn-event     xenbus
 45:         49          0          0          0   xen-dyn-event     hvc_console
 46:    3087279          0          0          0   xen-dyn-event     blkif
 47:    5510585          0          0          0   xen-dyn-event     eth0
NMI:          0          0          0          0   Non-maskable interrupts
LOC:          0          0          0          0   Local timer interrupts
SPU:          0          0          0          0   Spurious interrupts
PMI:          0          0          0          0   Performance monitoring interrupts
IWI:    1336152     838455     395541     360597   IRQ work interrupts
RTR:          0          0          0          0   APIC ICR read retries
RES:    9330690   13404923   11308637   11054251   Rescheduling interrupts
CAL:     590970     567170     641332     552669   Function call interrupts
TLB:          0          0          0          0   TLB shootdowns
TRM:          0          0          0          0   Thermal event interrupts
THR:          0          0          0          0   Threshold APIC interrupts
MCE:          0          0          0          0   Machine check exceptions
MCP:          0          0          0          0   Machine check polls
ERR:          0
MIS:          0

atika avatar Apr 20 '15 15:04 atika

Dominique,

Thanks for sharing this information, it indeed will be useful when rewriting the new Interrupt graph which I plan to start it soon.

I'll keep you informed of my progressions here in. Thanks again.

mikaku avatar Apr 21 '15 12:04 mikaku

@mikaku You are correct I was missing a second interrupt graph, didn't see it fail. Virtual machine running on a xen server, Debain 7 x32.

/proc/interrupts

           CPU0       CPU1       CPU2       
 16:      20540          0          0  xen-percpu-virq      timer0
 17:       8665          0          0  xen-percpu-ipi       resched0
 18:        237          0          0  xen-percpu-ipi       callfunc0
 19:          0          0          0  xen-percpu-virq      debug0
 20:        624          0          0  xen-percpu-ipi       callfuncsingle0
 21:          0      18212          0  xen-percpu-virq      timer1
 22:          0      12042          0  xen-percpu-ipi       resched1
 23:          0        396          0  xen-percpu-ipi       callfunc1
 24:          0          0          0  xen-percpu-virq      debug1
 25:          0        817          0  xen-percpu-ipi       callfuncsingle1
 26:          0          0      22310  xen-percpu-virq      timer2
 27:          0          0       9622  xen-percpu-ipi       resched2
 28:          0          0        433  xen-percpu-ipi       callfunc2
 29:          0          0          0  xen-percpu-virq      debug2
 30:          0          0        855  xen-percpu-ipi       callfuncsingle2
 31:       9863          0          0   xen-dyn-event     vfb
 33:          0          0          0   xen-dyn-event     vkbd
 34:      17110          0          0   xen-dyn-event     blkif
 35:        168          0          0   xen-dyn-event     blkif
 36:       8350          0          0   xen-dyn-event     eth0
176:        800          0          0   xen-dyn-event     xenbus
NMI:          0          0          0   Non-maskable interrupts
LOC:          0          0          0   Local timer interrupts
SPU:          0          0          0   Spurious interrupts
PMI:          0          0          0   Performance monitoring interrupts
IWI:          0          0          0   IRQ work interrupts
RES:       8665      12042       9622   Rescheduling interrupts
CAL:        861       1213       1288   Function call interrupts
TLB:          0          0          0   TLB shootdowns
TRM:          0          0          0   Thermal event interrupts
THR:          0          0          0   Threshold APIC interrupts
MCE:          0          0          0   Machine check exceptions
MCP:          0          0          0   Machine check polls
ERR:          0
MIS:          0

P.S Great work with Monitorix.

PMaynard avatar Apr 22 '15 08:04 PMaynard

PMaynard,

Thanks for your contribution. It looks pretty similar to Dominique output so that's probably why you both are experiencing similar problems. It will be indeed useful when writing the new Interrupts graph.

Thanks again and glad to know you are enjoying Monitorix.

mikaku avatar Apr 22 '15 13:04 mikaku

@mikaku hi, if got the same error on actuall archlinux. Installed monitorix 3.7.0 with yaourt monitorix

1 aur/monitorix 3.7.0-1 [installed] (74)
    A lightweight system monitoring tool that uses rrd databases.

My output of: cat /proc/interrupts cat /proc/interrupts

            CPU0       CPU1       
  0:         22          0   IO-APIC-edge      timer
  1:          3          0   IO-APIC-edge      i8042
  8:          1          0   IO-APIC-edge      rtc0
  9:          3          0   IO-APIC-fasteoi   acpi
 12:          4          0   IO-APIC-edge      i8042
 16:         49         23   IO-APIC  16-fasteoi   ehci_hcd:usb1
 23:         37         32   IO-APIC  23-fasteoi   ehci_hcd:usb4
 24:          0          0   PCI-MSI-edge      xhci_hcd
 25:          0          0   PCI-MSI-edge      xhci_hcd
 26:          0          0   PCI-MSI-edge      xhci_hcd
 27:      36174       6511   PCI-MSI-edge      0000:00:1f.2
 28:         15          0   PCI-MSI-edge      mei_me
 29:     147856      20376   PCI-MSI-edge      extern0
 30:          9          0   PCI-MSI-edge      intern0
 31:        990          2   PCI-MSI-edge      snd_hda_intel
 32:       1488        903   PCI-MSI-edge      i915
NMI:         43         43   Non-maskable interrupts
LOC:     820836     805319   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         43         43   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RTR:          0          0   APIC ICR read retries
RES:      23137      34211   Rescheduling interrupts
CAL:       3014        458   Function call interrupts
TLB:       9162       8427   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         29         29   Machine check polls
HYP:          0          0   Hypervisor callback interrupts
ERR:          0
MIS:          0

No graph pictures are generated but a lot of apache error logs messages:

[Wed Apr 22 20:58:45.822692 2015] [cgi:error] [pid 5675] [client 10.3.x.x:54329] AH01215: Use of uninitialized value in multiplication (*) at /usr/lib/monitorix/user.pm line 425.: /srv/http/monitorix/cgi/monitorix.cgi

markusstepins avatar Apr 22 '15 19:04 markusstepins

@mugnox,

Thank you for sharing this information, this indeed puts more pressure on me to fix all these issues in the Interrupts graph :)

Regards.

mikaku avatar Apr 24 '15 08:04 mikaku

@mikaku Hi Jordi,I encounter this error too it seems.

Monitorix 1.7 on Ubuntu mate 15.04 for Raspberry pi 2 rrdtool 1.4.8 /etc/monitorix/monitorix.conf enable_zoom = y global_zoom = 1

tail /varlog/monitorix
Argument "IPI0" isn't numeric in numeric lt (<) at /usr/lib/monitorix/int.pm line 1015.
Argument "IPI0" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 15.
Argument "IPI1" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 16.
Argument "IPI2" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 17.
Argument "IPI3" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 18.
Argument "IPI4" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 19.
Argument "IPI5" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 20.
Argument "IPI6" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 21.
Argument "IPI7" isn't numeric in numeric gt (>) at /usr/lib/monitorix/int.pm line 873, <IN> line 22.
Argument "IPI0" isn't numeric in numeric lt (<) at /usr/lib/monitorix/int.pm line 1015.
cat /proc/interrupts
           CPU0       CPU1       CPU2       CPU3       
 16:          0          0          0          0   ARMCTRL  bcm2708_fb dma
 24:          0          0          0          0   ARMCTRL  DMA IRQ
 25:        717          0          0          0   ARMCTRL  DMA IRQ
 32:     753299          0          0          0   ARMCTRL  dwc_otg, dwc_otg_pcd, dwc_otg_hcd:usb1
 52:          0          0          0          0   ARMCTRL  BCM2708 GPIO catchall handler
 65:        536          0          0          0   ARMCTRL  ARM Mailbox IRQ
 66:       4371          0          0          0   ARMCTRL  VCHIQ doorbell
 75:          1          0          0          0   ARMCTRL
 79:          0          0          0          0   ARMCTRL  bcm2708_i2c.1
 80:          0          0          0          0   ARMCTRL  bcm2708_spi.0
 84:       3551          0          0          0   ARMCTRL  mmc0
 99:      99040      74462      65476      52507   ARMCTRL  arch_timer
FIQ:              usb_fiq
IPI0:          0          0          0          0  CPU wakeup interrupts
IPI1:          0          0          0          0  Timer broadcast interrupts
IPI2:      47229      55686      51337      41427  Rescheduling interrupts
IPI3:          8         73         73         74  Function call interrupts
IPI4:       1922       3089       2411       2642  Single function call interrupts
IPI5:          0          0          0          0  CPU stop interrupts
IPI6:         16          0          0          0  IRQ work interrupts
IPI7:          0          0          0          0  completion interrupts
Err:          0

I hope this helps. Thanks for all your efforts. Bénoît

BenoitSvB avatar Jun 09 '15 13:06 BenoitSvB

@BenoitSvB

Thanks for your feedback, I'll put hands to work as soon as possible. Regards.

mikaku avatar Jun 10 '15 07:06 mikaku

@mikaku, Thanks for making such a great monitoring tool. I am facing the same issue on my Raspberry Pi, running Ubuntu Mate 16.04, with kernel 4.4.14-v7+. Because of the huge amount of logging, I guess that this will reduce the life of my SD.... Could you please give it a higher prio, please? Regards, Jacco

Haringstad avatar Jul 11 '16 08:07 Haringstad

@Haringstad,

Yeah, I know I'm a bit disconnected but I'm pretty busy at work lately.

I have in mind to change the way how Monitorix shows the interrupt graph, and instead of trying to detect architectures automatically (which resulted pretty difficult) I'd like to include a new option like arch=.

Possible values could be: pc-standard, xen, rpi, or even rpv3, etc. This way, Monitorix can have a predefined set of different architectures and the graph layout should have better results.

I'm doing my best to have enough time for Monitorix, believe me. Thanks for your patience.

mikaku avatar Jul 26 '16 11:07 mikaku

You are most welcome! For now, I only let it run when I suspect that something is going on. So, for now, I do have a working solution!

You make sure that you take care of yourself!

And, it seems like a great plan you have, to use the arch= option!

Regards,

Jacco van Koll

On Tue, Jul 26, 2016 at 1:12 PM, Jordi Sanfeliu [email protected] wrote:

@Haringstad https://github.com/Haringstad,

Yeah, I know I'm a bit disconnected but I'm pretty busy at work lately.

I have in mind to change the way how Monitorix shows the interrupt graph, and instead of trying to detect architectures automatically (which resulted pretty difficult) I'd like to include a new option like arch=.

Possible values could be: pc-standard, xen, rpi, or even rpv3, etc. This way, Monitorix can have a predefined set of different architectures and the graph layout should have better results.

I'm doing my best to have enough time for Monitorix, believe me. Thanks for your patience.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikaku/Monitorix/issues/77#issuecomment-235238453, or mute the thread https://github.com/notifications/unsubscribe-auth/AHeCZo_iDDB0F4qK01RgwukKf8UEOFibks5qZeuxgaJpZM4Dhxfx .

Haringstad avatar Jul 29 '16 20:07 Haringstad