Hide Forgot
Description of problem: When one calls '/usr/libexec/qemu-kvm -spice tls-port=<port>' in directory without x509_cert_file, x509_key_file or x509_cacert_file (names of variables in qemu-kvm sources), qemu-kvm gets sigabrt Version-Release number of selected component (if applicable): qemu-kvm-0.12.1.2-2.222.el6.x86_64 How reproducible: always Steps to Reproduce: 1. make sure there are no valid certificates/keys in ca-cert.pem, server-cert.pem and server-key.pem in current directory 2. run strace /usr/libexec/qemu-kvm -spice tls-port=1234 3. Actual results: qemu-kvm gets sigabrt open("./server-cert.pem", O_RDONLY) = -1 ENOENT (No such file or directory) write(1, "reds_init_ssl: Could not load ce"..., 66reds_init_ssl: Could not load certificates from ./server-cert.pem ) = 66 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 tgkill(10112, 10112, SIGABRT) = 0 --- SIGABRT (Aborted) @ 0 (0) --- Expected results: qemu-kvm exits cleanly with non-zero exit code Additional info:
the exception is raised in spice code so moving to spice-server: ================================================ Program received signal SIGABRT, Aborted. 0x00007ffff57788a5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) t a a bt Thread 1 (Thread 0x7ffff7d47940 (LWP 16819)): #0 0x00007ffff57788a5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff577a085 in abort () at abort.c:92 #2 0x00007ffff5fade89 in reds_init_ssl (s=<value optimized out>, core=<value optimized out>) at reds.c:3067 #3 do_spice_init (s=<value optimized out>, core=<value optimized out>) at reds.c:3660 #4 spice_server_init (s=<value optimized out>, core=<value optimized out>) at reds.c:3702 #5 0x00007ffff7e72e4c in qemu_spice_init () at ui/spice-core.c:731 ================================================ the problem seems to be general to any command-line checks in reds.c: ================================================ (gdb) run -spice port=5800,addr=fe80::f2de:f1ff:fe04:c0fa\\%eth0 Starting program: /usr/libexec/qemu-kvm -spice port=5800,addr=fe80::f2de:f1ff:fe04:c0fa\\%eth0 [Thread debugging using libthread_db enabled] do_spice_init: starting 0.10.1 reds_init_socket: getaddrinfo(fe80::f2de:f1ff:fe04:c0fa\%eth0,5800): Name or service not known Program received signal SIGABRT, Aborted. 0x00007ffff57788a5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) t a a bt Thread 1 (Thread 0x7ffff7d47940 (LWP 16839)): #0 0x00007ffff57788a5 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00007ffff577a085 in abort () at abort.c:92 #2 0x00007ffff5fac0eb in reds_init_socket (portnr=5800, family=<value optimized out>, addr=0x7ffff6263f00 "fe80::f2de:f1ff:fe04:c0fa\\%eth0") at reds.c:2896 ================================================ Behavior like this floods systems with meaningless core dumps.
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Behaviour has changed in newer SPICE versions, the error is no longer detected and qemu no longer exits in these cases, so there is no longer a crash ;) However, the series at http://lists.freedesktop.org/archives/spice-devel/2012-September/010892.html (more specifically "[PATCH 3/7] reds: report SSL initialization errors" and "PATCH 4/7] reds: Check reds_init_ssl errors") should fix this. With these patches, QEMU reports an error and exits gracefully on invalid arguments.
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/RHBA-2013-0529.html