Bug 628855 - [abrt] qemu-system-x86-2:0.12.5-1.fc13: raise: Process /usr/bin/qemu-kvm was killed by signal 6 (SIGABRT)
[abrt] qemu-system-x86-2:0.12.5-1.fc13: raise: Process /usr/bin/qemu-kvm was ...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: qemu (Show other bugs)
13
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Justin M. Forbes
Fedora Extras Quality Assurance
abrt_hash:4289796d9772ed31732becbddf2...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-31 04:23 EDT by Niels de Vos
Modified: 2013-01-09 06:39 EST (History)
14 users (show)

See Also:
Fixed In Version: qemu-system-x86-0.13.0-1.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-05 16:23:35 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
File: backtrace (12.06 KB, text/plain)
2010-08-31 04:23 EDT, Niels de Vos
no flags Details

  None (edit)
Description Niels de Vos 2010-08-31 04:23:19 EDT
abrt version: 1.1.13
architecture: x86_64
Attached file: backtrace
cmdline: qemu-kvm -kernel /boot/vmlinuz-2.6.33.8-149.fc13.x86_64 -initrd file-that-does-not-exist -hda disk.img
component: qemu
crash_function: raise
executable: /usr/bin/qemu-kvm
kernel: 2.6.33.8-149.fc13.x86_64
package: qemu-system-x86-2:0.12.5-1.fc13
rating: 4
reason: Process /usr/bin/qemu-kvm was killed by signal 6 (SIGABRT)
release: Fedora release 13 (Goddard)
time: 1283241054
uid: 501

comment
-----
Attributing to Nigel Jones who pointed this issue out to me.

Fixed upstream:

$ git format-patch --stdout -n1 d6fa4b77
From d6fa4b77fb8f27ac84cf23fb1e15016673d98a47 Mon Sep 17 00:00:00 2001
From: M. Mohan Kumar <mohan@in.ibm.com>
Date: Mon, 12 Apr 2010 10:01:33 +0530
Subject: [PATCH 1/1] Check for invalid initrd file

When qemu is invoked with an invalid initrd file, it crashes. Following
patch prints a error message and exits if an invalid initrd is
specified. Includes changes suggested by JV.

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/pc.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/pc.c b/hw/pc.c
index 69e597f..b797f21 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -658,6 +658,12 @@ static void load_linux(void *fw_cfg,
 	}
 
 	initrd_size = get_image_size(initrd_filename);
+        if (initrd_size < 0) {
+            fprintf(stderr, "qemu: error reading initrd %s\n",
+                    initrd_filename);
+            exit(1);
+        }
+
         initrd_addr = (initrd_max-initrd_size) & ~4095;
 
         initrd_data = qemu_malloc(initrd_size);
-- 
1.7.2.2


How to reproduce
-----
1. qemu-img create disk.img 1G
2. kvm -kernel /boot/vmlinuz-2.6.33.8-149.fc13.x86_64 -initrd file-that-does-not-exist -hda disk.img
Comment 1 Niels de Vos 2010-08-31 04:23:23 EDT
Created an attachment (id=442131)
File: backtrace
Comment 2 Niels de Vos 2010-11-05 16:23:35 EDT
Tested under Fedora 14 and seems to be fixed.

$ qemu-kvm -kernel /boot/vmlinuz-2.6.35.6-48.fc14.x86_64 -initrd /path/to/non/existing/file -hda disk.img 
qemu: error reading initrd /path/to/non/existing/file

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