🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

5 total messages Started by Guido van Rooij Wed, 27 Jan 1993 21:01
[386bsd] X broken with new patchkit ?
#5757
Author: Guido van Rooij
Date: Wed, 27 Jan 1993 21:01
9 lines
901 bytes
I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
installed. This used to work fine, but now that I've installed the new
patchkit, the keyboard isn't functioning quite well anymore when using X.
Symptoms are that after pressing a key you have to wiat several seconds
for the key to become visible on your xterm UNLESS you move your mouse..
then the char immediately shows up. Anyone having the same behaviour?


-Guido
Re: [386bsd] X broken with new patchkit ?
#5711
Author: Martin BIRGMEIER
Date: Thu, 28 Jan 1993 08:13
128 lines
4200 bytes
In article <4374@wzv.win.tue.nl> guido@gvr.win.tue.nl (Guido van Rooij) writes:
>I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
>installed. This used to work fine, but now that I've installed the new
>patchkit, the keyboard isn't functioning quite well anymore when using X.
>Symptoms are that after pressing a key you have to wiat several seconds
>for the key to become visible on your xterm UNLESS you move your mouse..
>then the char immediately shows up. Anyone having the same behaviour?
>
>
>-Guido

Ok I had the same problems (plus a discussion with Nate Williams about it)
until I finally fixed it (at least it seems so :-)). Here is the patch:

------------------------------ cut here ------------------------------
*** /usr/src/sys.386bsd/i386/isa/co_kbd.c.CODRVP_ORIG	Thu Nov  5 09:39:50 1992
--- /usr/src/sys.386bsd/i386/isa/co_kbd.c	Wed Jan 27 09:37:59 1993
***************
*** 138,144 ****
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
--- 138,144 ----
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = (pid_t) 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
***************
*** 156,162 ****
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
--- 156,162 ----
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = (pid_t) 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
***************
*** 279,285 ****
  		return;
  	if (consoftc.cs_selp) {
  		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
--- 279,285 ----
  		return;
  	if (consoftc.cs_selp) {
  		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = (pid_t) 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
***************
*** 306,312 ****
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p;
  	}
  	splx(s);
  	return 0;
--- 306,312 ----
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p->p_pid;
  	}
  	splx(s);
  	return 0;
***************
*** 1182,1188 ****
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = 0;
  		break;
  	case KBDRESET8042:
  		doreset();
--- 1182,1188 ----
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = (pid_t) 0;
  		break;
  	case KBDRESET8042:
  		doreset();
*** /usr/src/sys.386bsd/i386/isa/co_hdr.h.CODRVP_ORIG	Wed Nov  4 04:15:59 1992
--- /usr/src/sys.386bsd/i386/isa/co_hdr.h	Wed Jan 27 09:35:27 1993
***************
*** 122,128 ****
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	struct proc *cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
--- 122,128 ----
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	pid_t	cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
------------------------------ cut here ------------------------------

Cheers,

Martin

Technical University of Vienna/Dept of Comm. Engr.
Re: [386bsd] X broken with new patchkit ?
#5778
Author: Holger Veit
Date: Thu, 28 Jan 1993 09:16
158 lines
5669 bytes
In article <4374@wzv.win.tue.nl>, guido@gvr.win.tue.nl (Guido van Rooij) writes:
|> I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
|> installed. This used to work fine, but now that I've installed the new
|> patchkit, the keyboard isn't functioning quite well anymore when using X.
|> Symptoms are that after pressing a key you have to wiat several seconds
|> for the key to become visible on your xterm UNLESS you move your mouse..
|> then the char immediately shows up. Anyone having the same behaviour?
|> 
|> 
|> -Guido

I already replied to you by email, but this seems to be a more general issue.
The patchkit has (at least one) builtin incompatibility regarding the behaviour
of select(2). In the patchkit there is a change in the kernel that lets select
wait on a process's pid rather than a pointer to its struct proc. This is
actually a patch which should be 386bsd-0.2 stuff, and shouldn't have gone
into the patchkit. Anyway, since codrv aka keycap has a select stub, there are
necessary changes (see below). Andrew Chernov (ache@astral.msk.su) was so kind
to prepare a fix for this, before I did, and sent it to me; the following patch
should fix the problem (ONLY IF YOU HAVE PATCHKIT-2 INSTALLED!!!) The below patch
is the only fix added to the last BUGLIST.151292 at /usr/src/sys.extras/veit-console
at ref.tfs.com, the actual version is BUGLIST.270193.

Holger

----CUT HERE---
BUG 15: There are problems with the new patchkit-0.2.

FIX 15:	The latest patchkit-0.2 introduces an incompatibility regarding
	the interpretation of the wait argument for selections.
	It does no longer use struct *proc, but the pid_t instead.
	The following patch kindly prepared by Andrew A. Chernow
	(ache@astral.msk.su) will fix this. This will be default in
	the next version of codrv.
	DON'T APPLY THIS PATCH IF YOU DON'T HAVE THE NEW PATCHKIT!!!

*** co_hdr.h.sel	Sun Nov 22 18:35:19 1992
--- co_hdr.h	Wed Jan 27 16:21:51 1993
***************
*** 122,128 ****
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	struct proc *cs_selp;	/* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
--- 122,128 ----
  	int	cs_timo;	/* timeouts since interrupt (unused) */
  	u_long	cs_wedgecnt;	/* times restarted (unused)*/
  	u_long	cs_ovfl;	/* buffer overflows */
! 	pid_t   cs_rsel;        /* Process waiting for select call */
  	int	cs_pgid;	/* Process group for ASYNC I/O */
  /*XXX*/	struct tty *cs_constty;	/* used to restore constty if */
  				/* anyone dares to steal CONSOLE during raw open */
*** co_kbd.c.sel	Wed Jan 27 15:23:03 1993
--- co_kbd.c	Wed Jan 27 16:31:57 1993
***************
*** 138,144 ****
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
--- 138,144 ----
  	initrb(&co_buf);
  
  	/* signal opening process only */
! 	consoftc.cs_rsel = 0;
  	consoftc.cs_pgid = p->p_pid;
  
  	return 0;
***************
*** 156,162 ****
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_selp = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
--- 156,162 ----
  	if (minor(dev)==0x80) return 0;
  
  	consoftc.cs_flags &= ~(CO_OPENRAW|CO_ASYNC);
! 	consoftc.cs_rsel = 0;
  	consoftc.cs_pgid = 0;
  
  	/* do we need to restore console?
***************
*** 277,285 ****
  
  	if (!(consoftc.cs_flags & CO_OPENRAW))
  		return;
! 	if (consoftc.cs_selp) {
! 		selwakeup(consoftc.cs_selp,0);
! 		consoftc.cs_selp = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
--- 277,285 ----
  
  	if (!(consoftc.cs_flags & CO_OPENRAW))
  		return;
! 	if (consoftc.cs_rsel) {
! 		selwakeup(consoftc.cs_rsel,0);
! 		consoftc.cs_rsel = 0;
  	}
  	if (consoftc.cs_flags & CO_ASYNC) {
  		if (consoftc.cs_pgid < 0)
***************
*** 306,312 ****
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_selp = p;
  	}
  	splx(s);
  	return 0;
--- 306,312 ----
  			splx(s);
  			return 1;
  		}
! 		consoftc.cs_rsel = p->p_pid;
  	}
  	splx(s);
  	return 0;
***************
*** 1182,1188 ****
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_selp = 0;
  		break;
  	case KBDRESET8042:
  		doreset();
--- 1182,1188 ----
  				consoftc.cs_flags |= CO_OPENRAW;
  			ofl = 0;
  		}
! 		consoftc.cs_rsel = 0;
  		break;
  	case KBDRESET8042:
  		doreset();

---CUT HERE---



-- 
         Dr. Holger Veit                   | INTERNET: veit@fanoe.gmd.de
|  |   / GMD-SET German National Research  | Phone: (+49) 2241 14 2448
|__|  /  Center for Computer Science       | Fax:   (+49) 2241 14 2342
|  | /   P.O. Box 13 16                    |    Three lines Signature space
|  |/    Schloss Birlinghoven              |    available for rent. Nearly
         DW-5205 St. Augustin, Germany     |    unused, good conditions
Re: [386bsd] X broken with new patchkit ?
#5777
Author: Nate Williams
Date: Thu, 28 Jan 1993 16:29
25 lines
1854 bytes
>The patchkit has (at least one) builtin incompatibility regarding the behaviour
>of select(2). In the patchkit there is a change in the kernel that lets select
>wait on a process's pid rather than a pointer to its struct proc. This is
>actually a patch which should be 386bsd-0.2 stuff, and shouldn't have gone
>into the patchkit. 

According to the comments sent by Bill, this fixed a problem where telnet
was walking on top of another data structure
I quote (with slight modification for politeness sake)

To fix obscure telnet bug (it "messes up" another data structure in the process,
because it's using a "freed" process e.g. free()):

Unfortunately, for lack of time and lack of familiarity with the code, I
didn't know what would be affected by the fix.  As far as the original
distribution, (this is what the patchkit is for), the only routine
that still needs to be fixed is the com driver.  (If X is hogging all
the resources with the new patchkit, get Chris's new com driver, since
it contains the fixed select stuff)

Nate
-- 
osynw@terra.oscs.montana.edu |  A hacker w/out a home. 
work: (406) 994-5991         |  Keeper of the Unofficial 386BSD Bug Report
home: (406) 586-0579         |  Please send bugs and/or fixes you find.
Re: [386bsd] X broken with new patchkit ?
#5762
Author: A Wizard of Earth C
Date: Thu, 28 Jan 1993 17:56
27 lines
1777 bytes
In article <4374@wzv.win.tue.nl> guido@gvr.win.tue.nl (Guido van Rooij) writes:
>I installed the new patchkit a few days ago. I also had keycap-0.1.1 (codrv)
>installed. This used to work fine, but now that I've installed the new
>patchkit, the keyboard isn't functioning quite well anymore when using X.
>Symptoms are that after pressing a key you have to wiat several seconds
>for the key to become visible on your xterm UNLESS you move your mouse..
>then the char immediately shows up. Anyone having the same behaviour?

Obvious select() problem -- make sure the right device is selected in the
com driver (0 instead of 1 or 1 instead of 2.  This was in the previous
patch kit, and I don't think it was removed.

Until this is fixed by you, you will find your X server eating inordinate
amounts of CPU most of the time.


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads