DragonFly bugs List (threaded) for 2009-03
DragonFly BSD
DragonFly bugs List (threaded) for 2009-03
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1325] ddb stops responding after resizing terminal window of vkernel


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 Mar 2009 10:30:59 -0700 (PDT)

:New submission from Stathis Kamperis <ekamperi@gmail.com>:
:
:Greetings everyone.
:
:When I resize the terminal window, while being at the ddb prompt inside a
:vkernel, the ddb stops responding. That is, I hit keys but they don't appea=
:r at
:the prompt. The vkernel is in a 'pause' state and the only way to shut it d=
:own
:is by kill'ing -9 it. Mind that this only happens if I pass >1 as the numbe=
:r of
:CPUs to emulate, so it must be some kind of SMP issue. The problem is 100%
:reproducible, but I couldn't find a pattern of resizes to trigger. Still, 3=
:-5
:vertical resizes up/down usually suffice.
:
:Cheers,
:Stathis

    So far I have not been able to reproduce the issue.  Here's a patch
    that just adds some debugging write()'s to the SIGWINCH path in the
    vkernel.

    When running normally you should see "WXYZ" appear on the console.
    If you resize while you are in DDB you should only see "W" appear,
    then when you 'cont' from DDB you should see the "XYZ".

    If while in DDB the "XYZ" or even just the "X" occurs, then pending
    interrupts are improperly being processed while in DDB mode.  The
    kernel will not block the actual SIGWINCH kernel (hence the "W"
    appears), but the interrupt made pending by signalintr() should
    not run until normal operation is resumed via 'cont'.

    So the question is, what do you get when you get the freeze?

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>

diff --git a/sys/platform/vkernel/platform/console.c b/sys/platform/vkernel/platform/console.c
index b4088ab..736325c 100644
--- a/sys/platform/vkernel/platform/console.c
+++ b/sys/platform/vkernel/platform/console.c
@@ -274,6 +274,7 @@ vconssignal(int sig)
 static void
 vconswinchsig(int __unused sig)
 {
+	write(2, "W", 1);
 	signalintr(3);
 }
 
@@ -282,6 +283,7 @@ vconswinch_intr(void *arg __unused, void *frame __unused)
 {
 	struct winsize newsize;
 
+	write(2, "X", 1);
 	if (vconsole != NULL && vconsole->cn_dev->si_tty != NULL) {
 		ioctl(0, TIOCGWINSZ, &newsize);
 		/*
@@ -292,7 +294,9 @@ vconswinch_intr(void *arg __unused, void *frame __unused)
 		if (bcmp(&newsize, &vconsole->cn_dev->si_tty->t_winsize,
 			 sizeof(newsize)) != 0) {
 			vconsole->cn_dev->si_tty->t_winsize = newsize;
+			write(2, "Y", 1);
 			pgsignal(vconsole->cn_dev->si_tty->t_pgrp, SIGWINCH, 1);
+			write(2, "Z", 1);
 		}
 	}
 }



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]