From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:54635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTDIU-0005Cz-5y for qemu-devel@nongnu.org; Fri, 19 Apr 2013 11:32:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UTDIN-0002W7-62 for qemu-devel@nongnu.org; Fri, 19 Apr 2013 11:32:22 -0400 Received: from mail-ea0-x229.google.com ([2a00:1450:4013:c01::229]:34599) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UTDIN-0002W2-0G for qemu-devel@nongnu.org; Fri, 19 Apr 2013 11:32:15 -0400 Received: by mail-ea0-f169.google.com with SMTP id n15so1884214ead.0 for ; Fri, 19 Apr 2013 08:32:14 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Fri, 19 Apr 2013 17:32:05 +0200 Message-Id: <1366385529-10329-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/4] another round of qemu-char fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, aliguori@us.ibm.com, kraxel@redhat.com These three patches fix the bugs that Gerd reported. The first patches try to make the code consistent (which should avoid that half of the drivers bark with CRITICAL messages from glib) and also fix detection of pty connections so that they do not go berserk with polling. This is likely the same failure reported by Michael Hines, but I couldn't reproduce it with "-serial pty", only with the monitor. The last patch works around a glib bug that happens on RHEL6 and Wheezy, where destroying a source from a finalize callback can deadlock the GMainLoop. This bug locks up QEMU when a socket chardev's client disconnects. I tested the pty fix on F18 and Gerd tested it on RHEL6. I tested the socket fix on RHEL6. I believe these patches let us revert commit 893986f (main-loop: drop the BQL if the I/O appears to be spinning, 2013-04-05). Paolo Paolo Bonzini (4): qemu-char: use consistent idiom for removing sources qemu-char: simplify pty polling qemu-char: correct return value from chr_read functions qemu-char: do not operate on sources from finalize callbacks qemu-char.c | 134 ++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 88 insertions(+), 46 deletions(-)