Bug 1457634 - libvirt: "internal error: Unable to parse sched info value"
Summary: libvirt: "internal error: Unable to parse sched info value"
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
: 1457481 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-01 05:42 UTC by Markus Stockhausen
Modified: 2017-06-22 09:41 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1457481
Environment:
Last Closed: 2017-06-22 09:41:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Markus Stockhausen 2017-06-01 05:42:31 UTC
+++ This bug was initially created as a clone of Bug #1457481 +++

For testing purposes we installed elrepo 4.4 linux kernel on one of our CentOs OVirt virtualization hosts. This gives the following software package:

vdsm: 4.19.15-1.el7.centos
libvirt: 2.0.0-10.el7_3.9
kernel-lt: 4.4.69-1.el7.elrepo

every 15 seconds we get the following error into /var/log/messages

hh:mm:ss journal: internal error: Unable to parse sched info value '1915.542002'

After some analysis this error is written for each running VM and libvirt should be the initiator. I guess it came with the commit: https://www.redhat.com/archives/libvir-list/2015-December/msg00408.html

I could narrow down the error and reproduce it with the following command:

virsh domstats --vcpu domain
Domain: 'domain'
  vcpu.current=2
  vcpu.maximum=32

Can this mitigated my fixing vdsm -> libvirt calls or should this be fixed inside libvirt? Nevertheless there should be a bugfix to support future kernel versions.

--- Additional comment from Markus Stockhausen on 2017-05-31 15:36:40 EDT ---

An additional test gives:

1) ask libvirt/qemu about CPU stats
# virsh domstats --vcpu domain
...
internal error: Unable to parse sched info value '1917.404197'

2) directly check process stats
# cat /proc/31034/task/*/sched | grep 1917
se.statistics.exec_max                       :             1.020191
se.statistics.wait_sum                       :          1917.460097

Looking at the code we either have a buggy virStrToDouble function or maybe we have some invalid language settigns (e.g. German that expects "," as decimal separator)

   if (virStrToDouble(line, NULL, &val) < 0) {
     virReportError(VIR_ERR_INTERNAL_ERROR,
                    _("Unable to parse sched info value '%s'"),
                       line);
     goto cleanup;
   }

I would say that the bug should be kernel independant.

--- Additional comment from Markus Stockhausen on 2017-06-01 01:39:40 EDT ---

The system has german locale set:

# localectl status
   System Locale: LANG=de_DE.UTF-8
       VC Keymap: de-nodeadkeys
      X11 Layout: de
     X11 Variant: nodeadkeys

With that setting the decimal separator is "," but the kernel /proc filesystem ignores those settings. It always reports values with decimal separator "." Thus we need a libvirt fix to always switch to a kernel-matching locale.

Comment 1 Yaniv Kaul 2017-06-01 06:30:14 UTC
*** Bug 1457481 has been marked as a duplicate of this bug. ***

Comment 2 Martin Kletzander 2017-06-22 09:41:24 UTC
This should be now fixed since commit v3.4.0-160-g96a9b9a7f0b6:

commit 96a9b9a7f0b6aad3a3696a17c92389ed7d7d0dd0
Author: Julio Faracco <jcfaracco>
Date:   2017-06-21 14:08:29 -0300

    util: fix locale problem with virStrToDouble().


Note You need to log in before you can comment on or make changes to this bug.