Hi Jeff, I have made some tests about the problem I reported below with the new 2.6.24 kernel and everything seems to work perfectly.
I have used a fresh 2.6.24 kernel with the uml-mconsole-exec patch applied. Whatever it was causing the problem, it has disappeared when updating from 2.6.18-1 to 2.6.24. So we will release a new kernel for VNUML y forget about that problem. Thanks and best regards, David -----Mensaje original----- De: David Fernández [mailto:[EMAIL PROTECTED] Enviado el: lunes, 31 de diciembre de 2007 18:06 Para: 'David Fernández'; 'FERMIN GALAN MARQUEZ' CC: user-mode-linux-user@lists.sourceforge.net Asunto: RE: [uml-user] Hanging using 'iptables -L' in UML vm booted withcon0=pts Hi Jeff, I have just discovered a similar problem that could be related to the one we reported. Symptom: After releasing a virtual machine issuing a halt command through the mconsole, a "linux" process remains alive consuming 100% of CPU. Conditions: The problem only happens with n3vlr-0.11-vnuml-0.1 rootfs (an openwrt based rootfs) and not with another rootfs based on Debian. It only happens if you have executed any command on the virtual machine through mconsole using exec patch. It happens regardless of the command you execute (a simple ls makes it fail). Besides, if you release the vm not using mconsole but executing "kill -TERM `cat ~/.uml/xxxx/pid`" the problem happens. However, if you execute a "sync" just before releasing the vm or if you release the machine executing halt directly from a shell (or issuing "exec halt" though mconsole), the problem does not happen. Any idea of what could be causing the problem? The sympton seems similar to the previous problem, as the uml process gets into an active infinite loop. Thanks in advance and happy new year to everybody, David > -----Mensaje original----- > De: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > En nombre de David Fernández > Enviado el: sábado, 29 de diciembre de 2007 10:01 > Para: 'Jeff Dike'; 'FERMIN GALAN MARQUEZ' > CC: user-mode-linux-user@lists.sourceforge.net > Asunto: Re: [uml-user] Hanging using 'iptables -L' in UML > vm booted withcon0=pts > > > Hi Jeff, > > Thanks for the patch. We have made several tests with a > 2.6.18-1 kernel compiled with your patch and all the > reported problems are gone. > > Best regards and happy christmas, > David > > > -----Mensaje original----- > > De: Jeff Dike [mailto:[EMAIL PROTECTED] > > Enviado el: martes, 27 de noviembre de 2007 20:13 > > Para: Fermín Galán Márquez > > CC: [EMAIL PROTECTED]; user-mode-linux-user@lists.sourceforge.net > > Asunto: Re: [uml-user] Hanging using 'iptables -L' in UML > > vm booted with con0=pts > > > > On Wed, Sep 12, 2007 at 11:52:32PM +0200, Fermín Galán > > Márquez wrote: > > > This is the trace (as you can see I're repeated the > > experiment twice, > > > the result is basically the same), hoping it could be > useful to > > > diagnose the problem and fix eventual bugs in the UML > kernel. See > > > below regarding the test procedure. > > > > > > (gdb) bt > > > #0 0xb7f9d7f2 in ?? () from /lib/ld-linux.so.2 > > > #1 0xb7f19ab0 in tcsetattr () from /lib/i686/cmov/libc.so.6 > > > #2 0x080610d5 in generic_console_write (fd=7, > > > buf=0x828fc13 "ip_tables: (C) 2000-2006 Netfilter > > Core Team\n", n=45) > > > at arch/um/drivers/chan_user.c:37 > > > #3 0x0806096e in console_write_chan (chans=0x82756f0, > > > buf=0x828fc13 "ip_tables: (C) 2000-2006 Netfilter > > Core Team\n", len=45) > > > at arch/um/drivers/chan_kern.c:352 > > > > My reaction to this has been that you are running UML under > > a script which isn't reading UML output correctly, > > therefore the pts device fills up, and UML hangs during > > console output because the pts device buffer is full and > > tcsetattr is waiting for it to empty. > > > > However, after looking at this, it turns up a host bug > > where, under the conditions that UML is using it, tcsetattr > > will always, guaranteed, return -EINTR. UML will then hang > > because it will loop, making the call until it returns > > something other than -EINTR. See > > http://marc.info/?l=linux-kernel&m=119618990807182&w=2 for > > my analysis. > > > > There is a workaround in UML, attached below. I basically > > block SIGIO over the block of code which is fiddling > > terminal attributes. > > > > Jeff > > > > -- > > Work email - jdike at linux dot intel dot com > > > > Index: linux-2.6.22/arch/um/drivers/chan_user.c > > > =================================================================== > > --- linux-2.6.22.orig/arch/um/drivers/chan_user.c > > 2007-11-21 11:43:50.000000000 -0500 > > +++ linux-2.6.22/arch/um/drivers/chan_user.c > > 2007-11-27 14:03:10.000000000 -0500 > > @@ -74,10 +74,16 @@ void generic_free(void *data) > > > > int generic_console_write(int fd, const char *buf, int n) { > > + sigset_t old, no_sigio; > > struct termios save, new; > > int err; > > > > if (isatty(fd)) { > > + sigemptyset(&no_sigio); > > + sigaddset(&no_sigio, SIGIO); > > + if (sigprocmask(SIG_BLOCK, &no_sigio, &old)) > > + goto error; > > + > > CATCH_EINTR(err = tcgetattr(fd, &save)); > > if (err) > > goto error; > > @@ -97,8 +103,11 @@ int generic_console_write(int fd, const > > * Restore raw mode, in any case; we *must* ignore any > > error apart > > * EINTR, except for debug. > > */ > > - if (isatty(fd)) > > + if (isatty(fd)) { > > CATCH_EINTR(tcsetattr(fd, TCSAFLUSH, &save)); > > + sigprocmask(SIG_SETMASK, &old, NULL); > > + } > > + > > return err; > > error: > > return -errno; > > > > > ------------------------------------------------------------ > ------------- > This SF.net email is sponsored by: Microsoft Defy all > challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > User-mode-linux-user mailing list > User-mode-linux-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user