Bug 500717 - qemu-kvm can generate invalid screendumps during reboot
qemu-kvm can generate invalid screendumps during reboot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Eduardo Habkost
Lawrence Lim
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-13 15:39 EDT by Eduardo Habkost
Modified: 2014-03-25 20:56 EDT (History)
8 users (show)

See Also:
Fixed In Version: kvm-83-80.el5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-02 05:32:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eduardo Habkost 2009-05-13 15:39:07 EDT
Created attachment 343857 [details]
invalid screendump generated by qemu-kvm

On some kvm-autotest runs, qemu-kvm is generating invalid screendump files, normally during reboot after the guest install. This is an analysis of the screendump file generated by qemu-kvm:

>>> l = open('scrdump.ppm').readlines()
>>> l[:-1]
['P6\n', '2560 400\n', '255\n']
>>> len(l[-1])
1024000
>>> 2560*400
1024000
>>>

The image has 2560*400 bytes, but should be 2560*400*3 bytes (each pixel
needs three samples).

This is an example of the kvm-autotest log when hitting this problem:

20090513-094249 RHEL.5.3.i386.install: DEBUG: send_monitor_cmd: Sending monitor command: screendump /usr/local/autotest/results/default/kvm_runtest_2.RHEL.5.3.i386.install/debug/scrdump.ppm
20090513-094249 RHEL.5.3.i386.install: ERROR: barrier_2: Barrier failed at step 29 after 3.32 seconds (got invalid screendump)
(see analysis at /usr/local/autotest/results/default/kvm_runtest_2.RHEL.5.3.i386.install/debug)
20090513-094249 RHEL.5.3.i386.install: ERROR: run_once: Test failed: Barrier failed at step 29 after 3.32 seconds (got invalid screendump)
20090513-094249 RHEL.5.3.i386.install: DEBUG: run_once: Postprocessing on error...
Comment 1 Eduardo Habkost 2009-05-25 17:23:46 EDT
Fix submitted upstream: http://marc.info/?l=qemu-devel&m=124328644120033

It solves one case of invalid images (non-zero size but invalid pixel data). It is still possible to get 0x0 PPM images generated sometimes, though.
Comment 11 lihuang 2009-07-13 09:07:55 EDT
Can not reproduce the bug in kvm-83-87.el5.


steps :
1 . start vm
/usr/libexec/qemu-kvm -no-hpet -usbdevice tablet -rtc-td-hack -drive file=/data/images/images/5u4_x86.qcow2,media=disk,if=ide,cache=off,index=0 -smp 1 -m 1024 -cpu qemu64,+sse2 -vnc :29 -monitor unix:/tmp/00:21:02:4d:9b:6e,server,nowait -net nic,vlan=0,macaddr=00:21:02:4d:9b:6e,model=rtl8139 -net tap,vlan=0,script=/etc/qemu-ifup -pidfile /tmp/00:21:02:4d:9b:6e.pid -boot c -name 29 -snapshot

2. after the vm is up, reboot & collect screendump.

echo "system_reset" | nc -U /tmp/00:21:02:4d:9b:6e
num=1
sleep 3
while [ ture ] ;
do
echo " screendump screendump-$num.ppm " | nc -U /tmp/00:21:02:4d:9b:6e
sleep 1
num=$((num+1))
done

3. verify the screendumps are valid.

for i in *.ppm
do 
sh 0.sh $i
done


0.sh:
#! /bin/sh 
if [[ $# -ne 1 ]]; then
        echo "Usage: `basename $0` [ppm]"
        exit -1
fi
PPM=$1
FORMAT=$(head -n 1 $PPM)
WIDTH=$(sed -ne '2p' $PPM | awk -F' ' '{print $1}')
HEIGHT=$(sed -ne '2p' $PPM | awk -F' ' '{print $2}')
PIXS=$(sed -ne '3p' $PPM)

if [[ 'X'$FORMAT != "XP6" ]]; then
        echo " INVALID"
        exit -1
fi

if [[ 'X'$PIXS != "X255" ]]; then
        echo " INVALID"
        exit -1
fi

SIZE=$(( $WIDTH * $HEIGHT * 3 ))
HEADER=$( head -n3 $PPM | wc -c )
SIZE=$(( $SIZE + $HEADER ))

TOTAL_SIZE=$(cat $PPM | wc -c )
if [[ ${TOTAL_SIZE} -ne $SIZE ]]; then
        echo " INVALID"
        exit -1
fi

4. repeat step1-3 for three times.
5. repeat step4 with window XP guest.


RESULT : PASS

setting to *VERIFIED*
Comment 13 errata-xmlrpc 2009-09-02 05:32:56 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1272.html

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