another curious bug

Lenny Tropiano lenny at icus.UUCP
Wed Jun 29 02:16:30 AEST 1988


In article <378 at manta.UUCP> brant at manta.UUCP (Brant Cheikes) writes:
|>I've encountered this odd bug that I have so far been unable to find
|>an explanation for.  It's pretty innocuous, doesn't happen very often,
|>and is cured by a reboot.  The problem: the first shell spawned from
|>the user agent (e.g., using "Full-screen UNIX" in 3.51) is attached to
|>/dev/syscon instead of a /dev/wn.  Subsequent shells get the usual
|>window device.  You can detect this problem by running either tty or
|>ps.  This hasn't caused me any problems so far, I've checked utmp and
|>wtmp and the /dev/w* entries, everthing looks normal.  Still,
|>*something* must be wrong somewhere.  Is there some way to cure this
|>without rebooting?  And is there anything wrong with just using
|>/dev/syscon?  The UNIXpc kernel continues to work [sic] in strange
|>and wondrous ways.

Yes, UNIX for the UNIX pc is sick...  Who knows if AT&T will ever fix the
bugs.  My friend Gil Kloepfer, Jr. (gil at limbic.UUCP) had noticed this
problem and was trying to figure out a pattern.  It seemed that the
machine would boot and the window'd devices were connected as "sys" or
(syscon) when the ps was done, and not w1 (or w2, etc..).  It seemed when
he shut his machine down it would put the "Press Return to Reboot" message
in side a window, and the /etc/killall wouldn't kill the window it was 
using.

He noticed /dev/syscon had a major/minor number of 7, 1 (or 7, 2) depending
on the window it was using, where it should be attached to /dev/window,
and not /dev/w1 as major=7, minor=0.

His temporary fix was to:
# rm /dev/syscon
# mknod /dev/syscon c 7 0

It would go away temporarily, but would creep back to the same problem
every other reboot (or so).

The problem was the /dev/window should be *LINKED* ln(1) to /dev/syscon,
as likewise to /dev/systty.  For some reason, still unknown to me
/dev/syscon would get unlinked in the first place, but /dev/syscon's link
was never recreated because he used the "rm" command and mknod(1M) to remake
the character device.

A better solution would be to:
# ln /dev/window /dev/syscon

crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 /dev/syscon 
crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 /dev/systty 
crw-rw-rw-  3 root    sys       7,  0 Jan  1  1970 /dev/window 

If any can figure why a device minor should change in the first place,
I would like to hear it.

-Lenny
-- 
Paper-net: Lenny Tropiano          | @-net:         lenny at icus.UUCP
           ICUS Software Systems   | !-net:      ...att    \
           PO Box 1                |                boulder \
           Islip Terrace, NY 11752 |                talcott  !icus!lenny
Vocal-net: (516) 582-5525 [work]   |                pacbell /
           (516) 968-8576 [home]   |                sbcs   /
Telex-net: 154232428 ICUS          | Another-net:   attmail!icus!lenny



More information about the Unix-pc.general mailing list