Bug 1457481

Summary: libvirt: "internal error: Unable to parse sched info value"
Product: [oVirt] vdsm Reporter: Markus Stockhausen <mst>
Component: GeneralAssignee: Dan Kenigsberg <danken>
Status: CLOSED DUPLICATE QA Contact: Raz Tamir <ratamir>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.19.15CC: bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1457634 (view as bug list) Environment:
Last Closed: 2017-06-01 06:30:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Markus Stockhausen 2017-05-31 19:19:08 UTC
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.

Comment 1 Markus Stockhausen 2017-05-31 19:36:40 UTC
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.

Comment 2 Markus Stockhausen 2017-06-01 05:39:40 UTC
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 3 Markus Stockhausen 2017-06-01 05:44:31 UTC
Definetly a libvirt bug. Tracked in BZ1457634

Comment 4 Yaniv Kaul 2017-06-01 06:30:14 UTC

*** This bug has been marked as a duplicate of bug 1457634 ***