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 852642 - qemu process should exit when a invaild value set for "-smp"
Summary: qemu process should exit when a invaild value set for "-smp"
Keywords:
Status: CLOSED DUPLICATE of bug 745047
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Markus Armbruster
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 08:11 UTC by Xu Tian
Modified: 2012-09-07 20:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-09-07 20:29:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xu Tian 2012-08-29 08:11:19 UTC
Description of problem:

A guest can start up by command "qemu-kvm -smp a,cores=0 -hda /tmp/test.qcow2" , but as we know values of "smp","cores","sockets","threads" and "maxcpus" should be an integer greater than zero;
although, qemu-kvm has instead the invaild values to "1" and startup the guest, and in fact the value of "-smp" option is a invaid value;

And I found "-m" not speicaled , system will use a default value , but if a invaild setted, qemu will exit with error message;
[root@localhost ~]# qemu-kvm -m a
qemu: invalid ram size: a

I hope "-smp" option do same action like "-m" do;

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create a image with : qemu-img create -f qcow2  /tmp/test.qcow2 1G
2. boot up guest with a invaild value "a" set to -smp option
  
Actual results:

guest boot up without any warning or error messgae about invaid value detected

Expected results:

qemu exit and with error message print out

Additional info:

Comment 1 Markus Armbruster 2012-09-07 10:19:14 UTC
Yes, parsing of -smp's argument is sloppy.  Same upstream.

-help claims number of CPUs is mandatory, but the code treats it as optional.

Additional funnies:

* -smp ""
  Since all parameters are optional, this has no effect

* -smp 0
  Code interprets 0 as "use default", and the default is 1.

  Same for all the named parameter values.

* -smp 4294967296

  Argument is silently truncated to int, in this case to zero.

* -smp 1,sockets=

  Named parameter with empty value is silently ignored.

* -smp 1,sockets=maybe

  Named parameter value is parsed just as sloppily as the number of CPUs, in this case as zero.

* -smp 1,silly
  -smp 1,qemu=moron

  Unknown parameters are silently ignored.

Comment 2 Ademar Reis 2012-09-07 20:29:05 UTC

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


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