RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 682227 - qemu-kvm doesn't exit when binding to specified port fails
Summary: qemu-kvm doesn't exit when binding to specified port fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.1
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Gerd Hoffmann
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 602153 (view as bug list)
Depends On:
Blocks: 580953 649196
TreeView+ depends on / blocked
 
Reported: 2011-03-04 14:22 UTC by David Jaša
Modified: 2013-01-09 23:37 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.182.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 15:44:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1531 0 normal SHIPPED_LIVE Moderate: qemu-kvm security, bug fix, and enhancement update 2011-12-06 01:23:30 UTC

Description David Jaša 2011-03-04 14:22:51 UTC
Description of problem:
Qemu-kvm doesn't exit with error when it is told to run spice server on already-occupied port. 

Version-Release number of selected component (if applicable):
qemu-kvm-0.12.1.2-2.148.el6.x86_64
spice-server-0.7.3-2.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. run one qemu-kvm with parameter -spice port=3000
2. run another qemu-kvm with parameter -spice port=3000
  
Actual results:
second qemu-kvm should exit with error

Expected results:
qemu-kvm continues running and starts VM

Additional info: 
qemu-kvm CLI output:

do_spice_init: starting 0.7.3
reds_init_socket: reds_init_socket: binding socket to :3000 failed

spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
Using CPU model "cpu64-rhel6"
Using CPU model "cpu64-rhel6"
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
spice_server_add_interface: SPICE_INTERFACE_RECORD
spice_server_add_interface: SPICE_INTERFACE_PLAYBACK
handle_dev_destroy_surfaces: 
handle_dev_input: start
handle_dev_destroy_surfaces: 
handle_dev_destroy_surfaces: 
handle_dev_input: oom current 18 pipe 0
^C

Comment 4 Gerd Hoffmann 2011-06-06 06:35:11 UTC
devel-acked

Comment 5 juzhang 2011-06-14 12:56:01 UTC
Reproduced with qemu-kvm-0.12.1.2-2.163.el6.x86_64, marked qa_ack+

guest 1
spice port=5930,disable-ticketing -vga qxl

guest 2
spice port=5930,disable-ticketing -vga qxl

Results:
reds_init_socket: reds_init_socket: binding socket to :5930 failed.

Comment 6 Gerd Hoffmann 2011-07-20 13:32:37 UTC
fix committed upstream, backport posted.

Comment 10 Qunfang Zhang 2011-08-26 05:08:54 UTC
Verified on qemu-kvm-0.12.1.2-2.184.el6, passed.

1. Boot guest A on host with -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864

do_spice_init: starting 0.8.2
spice_server_add_interface: SPICE_INTERFACE_KEYBOARD
spice_server_add_interface: SPICE_INTERFACE_MOUSE
spice_server_add_interface: SPICE_INTERFACE_QXL
red_worker_main: begin
QEMU 0.12.1 monitor - type 'help' for more information
(qemu) 

2. Boot guest B on the same host still with -spice port=5930,disable-ticketing -vga qxl -global qxl-vga.vram_size=67108864

do_spice_init: starting 0.8.2
reds_init_socket: reds_init_socket: binding socket to :5930 failed
failed to initialize spice server
[root@localhost mnt]# 

So, this issue is fixed.

Comment 12 Alon Levy 2011-09-20 08:56:50 UTC
*** Bug 602153 has been marked as a duplicate of this bug. ***

Comment 13 Xiaoqing Wei 2011-11-16 06:45:29 UTC
Hi, 

This bug  exists on 6.1.z too, 
qemu-kvm-0.12.1.2-2.160.el6_1.9.x86_64

any plan to fix it on rhel6.1.z ?

Sincerely,
Xiaoqing Wei.

Comment 14 Gerd Hoffmann 2011-11-16 09:01:09 UTC
Minor issue, no plans to fix this in 6.1.z.

Comment 15 errata-xmlrpc 2011-12-06 15:44:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2011-1531.html


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