From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JdQ73-0006nv-Ax for qemu-devel@nongnu.org; Sun, 23 Mar 2008 09:19:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JdQ6y-0006mw-6B for qemu-devel@nongnu.org; Sun, 23 Mar 2008 09:19:48 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JdQ6y-0006mp-0p for qemu-devel@nongnu.org; Sun, 23 Mar 2008 09:19:44 -0400 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194] helo=il.qumranet.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JdQ6x-0007Kd-J8 for qemu-devel@nongnu.org; Sun, 23 Mar 2008 09:19:43 -0400 Message-ID: <47E658D1.3000606@qumranet.com> Date: Sun, 23 Mar 2008 15:19:13 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] Coredump from qemu References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kvm-devel@lists.sourceforge.net Zdenek Kabelac wrote: > Hi > > During execution of qemu I've got this crash: > > #0 0x0000000000407a29 in qemu_mod_timer (ts=0x2e8cf90, > expire_time=130685351465) at /usr/src/debug/kvm-63/qemu/vl.c:1073 > #1 0x0000000000425590 in pcnet_ioport_writew (opaque=0x0, > addr=1836332585, val=8090216) > at /usr/src/debug/kvm-63/qemu/hw/pcnet.c:1617 > #2 0x0000000000501cf1 in kvm_outw (opaque=, > addr=13865, data=29288) > at /usr/src/debug/kvm-63/qemu/qemu-kvm.c:457 > #3 0x000000000051e2a0 in kvm_run (kvm=0x2dbb030, vcpu=1) at libkvm.c:719 > #4 0x0000000000501646 in kvm_cpu_exec (env=) at > /usr/src/debug/kvm-63/qemu/qemu-kvm.c:127 > #5 0x00000000005021a5 in kvm_main_loop_cpu (env=0x2e8f010) at > /usr/src/debug/kvm-63/qemu/qemu-kvm.c:307 > #6 0x0000000000502302 in ap_main_loop (_env=) at > /usr/src/debug/kvm-63/qemu/qemu-kvm.c:338 > #7 0x000000353420740a in start_thread () from /lib64/libpthread.so.0 > #8 0x00000035336e5d1d in clone () from /lib64/libc.so.6 > > (gdb) print alarm_timer > $1 = (struct qemu_alarm_timer *) 0x0 > > > It happend during detach of gdb and quit of the qemu itsell - I assume > no all timers were probably stoped when quit_timers was executed ? > > Looks like. > Maybe check for non NULL pointer is enough qemu_mod_timer? > > I think the correct solution is to allow devices to register a shutdown function, which would be called after main_loop() (but before quit_timers) , which would execute qemu_del_timer() in the case of pcnet. It's also necessary for device hotremove. -- error compiling committee.c: too many arguments to function