Bug 569743

Summary: Change vnc password caused 'Segmentation fault'
Product: Red Hat Enterprise Linux 5 Reporter: Amos Kong <akong>
Component: kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: ailan, llim, tburke, virt-maint, ykaul, zamsden
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kvm-83-192.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-13 23:34:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 580948    

Description Amos Kong 2010-03-02 09:24:23 UTC
Description of problem:
Boot up a VM and execute monitor command "change vnc password", got "Segmentation fault" on terminal which strat guest.

Version-Release number of selected component (if applicable):
(host)# rpm -qa |grep kvm
etherboot-zroms-kvm-5.4.4-13.el5
kvm-83-160.el5
kvm-qemu-img-83-160.el5
kmod-kvm-83-160.el5
kvm-tools-83-160.el5
kvm-debuginfo-83-160.el5

(host)# rpm -qa |grep vnc
vnc-4.1.2-14.el5_3.1
vnc-server-4.1.2-14.el5_3.1

How reproducible:
reproduce 100%

Steps to Reproduce:
1. boot up a VM with " -vnc :1"
2. run # vncviewer localhost:1
3. press Ctrl+Alt+2 to switch to qemu-monitor on vnc window
4. input "change vnc password" and "Enter" on qemu-monitor

Actual results:
got "Segmentation fault" on terminal which strat guest

Expected results:
Should not got "Segmentation fault" on terminal which strat guest

Additional info:
(host)# uname -a
Linux intel-q9400-4-3.englab.nay.redhat.com 2.6.18-189.el5 #1 SMP Tue Feb 16 11:10:22 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

Command line:
# qemu-kvm -vnc :1 -net nic,vlan=0,model=e1000,macaddr=00:AE:8F:93:9D:02 -net tap,vlan=0,ifname=e1000_0_8001,script=/etc/qemu-ifup-switch -m 2G  -smp 1 -drive file=./win2008-64.raw,if=ide,boot=on
Segmentation fault

Comment 1 Yaniv Kaul 2010-03-02 09:35:43 UTC
Amos, what's the stack? There should be a core dump. Get it and provide the stack.
Alternatively, attach GDB to the QEMU process before you go to its monitor.
Lastly, is it a regression?

Comment 4 Gerd Hoffmann 2010-05-26 14:39:39 UTC
Upstream fixed it in a different way, by zapping the main_loop_wait() call from the monitor code.

http://git.qemu.org/qemu.git/commit/?id=bb5fc20f7c1c65e95030da3629dd0d7a0cce38cd

Comment 5 Gerd Hoffmann 2010-06-08 15:10:05 UTC
Hmm, upstream fix doesn't backport easily.  Depends on other patches, which in turn change qemu behavior with password-protected block devices.  I'd rather not backport them to 5.x.  Looking into using Zach's fix instead.

Comment 10 Amos Kong 2010-09-17 03:31:02 UTC
Bug could not be reproduced with kvm-83-193.el5
Move to VERIFIED.

Comment 12 errata-xmlrpc 2011-01-13 23:34:03 UTC
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/RHSA-2011-0028.html