2002-01-09 16:51:26

by David Balazic

[permalink] [raw]
Subject: Simple local DOS


log in on some virtual terminal, then run the following line
in a bourne type shell, like bash :

X 2>&1 | less

A reboot "fixes" it. We want to reach windows level quality on desktop
after all, don't we ?

--
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


2002-01-09 21:51:18

by Matthias Andree

[permalink] [raw]
Subject: Re: Simple local DOS

On Wed, 09 Jan 2002, David Balazic wrote:

>
> log in on some virtual terminal, then run the following line
> in a bourne type shell, like bash :
>
> X 2>&1 | less
>
> A reboot "fixes" it. We want to reach windows level quality on desktop
> after all, don't we ?

You can also fix that by a remote login, chvt, or by just not piping X
output into interactive programs. tail -f is a viable workaround -- and
all this is off-topic on linux-kernel, it's your own dumbness that makes
you do these things. Better run kdm, gdm or xdm or something and you're
not having this problem.

2002-01-10 13:46:44

by David Balazic

[permalink] [raw]
Subject: Re: Simple local DOS

Matthias Andree ([email protected]) wrote :

> On Wed, 09 Jan 2002, David Balazic wrote:
>
> >
> > log in on some virtual terminal, then run the following line
> > in a bourne type shell, like bash :
> >
> > X 2>&1 | less
> >
> > A reboot "fixes" it. We want to reach windows level quality on desktop
> > after all, don't we ?
>
> You can also fix that by a remote login,

How do I pull a network connection and a terminal out of a hat ?
Where do I get the hat ?
read : it is a sandalone system.

> chvt,

how do I start chvt if I have a locked up console system ?

> or by just not piping X

I didn't do it on purpose to lock up my system and risk FS corruption
durin unclean reboot. I was interested in the server output and " 2>&1 | less"
is the logical way to do that.

I could also "solve" this problem by not running linux. And I can "solve" all
gcc bugs by not using gcc. Those are not solutions. Not to me at least.

> output into interactive programs. tail -f is a viable workaround -- and

tail -f ? what is the difference between :
$ X 2>&1 | tail -f
and
$ X
?

> all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel.
it is a kernel topic.

> it's your own dumbness that makes
> you do these things. Better run kdm, gdm or xdm or something and you're
> not having this problem.

My own dumbness ? Did you also say that ping-of-death is not a problem ?
After all it is just the dumbness of people who send out broken ping packets,
no ? And if a computer crashes , businesses lose time and money, you pop up and
explain "no it is not really lost money/time, because it was caused by dumbness !".

--
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2002-01-10 14:04:34

by David Balazic

[permalink] [raw]
Subject: Re: Simple local DOS

Xavier Bestel wrote:
>
> On Thu, 2002-01-10 at 14:46, David Balazic wrote:
> > > chvt,
> >
> > how do I start chvt if I have a locked up console system ?
>
> Ctrl-Alt-F1 ?

Which part of "locked up console system" you don't understand ? :-)

( There is a smiley on that line. It was ment to be funny. No need
to get mad at me and send me suspicios white powder over snail mail ! )

Maybe I did not describe the problem detailed enough. I thought everybody
can check it for themselves :-)

After running "X 2>&1 | less" you get a black screen and it does not respond to
any keypresses any more.

I will take this to the xfree people as David S. Miler suggested.

--
David Balazic
--------------
"Be excellent to each other." - Bill S. Preston, Esq., & "Ted" Theodore Logan
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

2002-01-10 13:58:14

by David Miller

[permalink] [raw]
Subject: Re: Simple local DOS

From: David Balazic <[email protected]>
Date: Thu, 10 Jan 2002 14:46:19 +0100

> all this is off-topic on linux-kernel,

non-root user locked up the console code. console code is part of kernel.
it is a kernel topic.

The real issue is that X has the console in an indeterminate state (it
probably just saved the VGA state and is outputting probing
information) but now it is blocked on terminal output due to the
"less".

There is nothing the kernel can do about what X is up to. The suid
wrapper for X can check if stdout/stderr is a pipe and refuse to run
if it is.

So really, it is in fact off topic for linux-kernel. Please take this
to the xfree86 lists, I'm sure they'll be more than happy to fix it.

Franks a lot,
David S. Miller
[email protected]

2002-01-10 13:58:14

by Xavier Bestel

[permalink] [raw]
Subject: Re: Simple local DOS

On Thu, 2002-01-10 at 14:46, David Balazic wrote:
> > chvt,
>
> how do I start chvt if I have a locked up console system ?

Ctrl-Alt-F1 ?

Xav


2002-01-10 14:06:34

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Simple local DOS

On Thu, 10 Jan 2002, David Balazic wrote:

> Matthias Andree ([email protected]) wrote :
>
> > On Wed, 09 Jan 2002, David Balazic wrote:
> >
> > >
> > > log in on some virtual terminal, then run the following line
> > > in a bourne type shell, like bash :
> > >
> > > X 2>&1 | less
> > >
> > > A reboot "fixes" it. We want to reach windows level quality on desktop
> > > after all, don't we ?
> >
> > You can also fix that by a remote login,
>

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
to the first VT, ALT-F2, next, etc.
No problem at all.


Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

I was going to compile a list of innovations that could be
attributed to Microsoft. Once I realized that Ctrl-Alt-Del
was handled in the BIOS, I found that there aren't any.


2002-01-10 14:08:34

by Matthias Andree

[permalink] [raw]
Subject: Re: Simple local DOS

On Thu, 10 Jan 2002, David Balazic wrote:

> I didn't do it on purpose to lock up my system and risk FS corruption
> durin unclean reboot. I was interested in the server output and " 2>&1 | less"
> is the logical way to do that.
>
> I could also "solve" this problem by not running linux. And I can "solve" all
> gcc bugs by not using gcc. Those are not solutions. Not to me at least.

It's not Linux-specific, but will ALWAYS happen when you use one program
that eats all your input and pipe its output into another program that
waits for your input.

What and when do you think you will eat when you feed your dog the
sausage you want to eat yourself?

> > output into interactive programs. tail -f is a viable workaround -- and
>
> tail -f ? what is the difference between :
> $ X 2>&1 | tail -f
> and
> $ X

That you're clueless.

You'd do:

X >/my/safe/tmp/dir/X.log 2>&1 & tail -f /my/safe/tmp/dir/X.log

> > all this is off-topic on linux-kernel,
>
> non-root user locked up the console code. console code is part of kernel.
> it is a kernel topic.

Nope. Non-root user has used setuid application and thus become root.
Drop setuid privileges and use xdm/kdm/gdm if you're to avoid this.

> My own dumbness ? Did you also say that ping-of-death is not a problem ?

Ping-of-death is a kernel bug or correctness issue or whatever you call
it. This is not. root gave away the privilege to redirect console input
by installing a setuid-application, X, XFree86, Xwrapper, whatever it
may be called.

And now please take this off the list.

2002-01-10 14:13:14

by Wakko Warner

[permalink] [raw]
Subject: Re: Simple local DOS

> > > log in on some virtual terminal, then run the following line
> > > in a bourne type shell, like bash :
> > >
> > > X 2>&1 | less
>
> > or by just not piping X

into less or more.

> I didn't do it on purpose to lock up my system and risk FS corruption
> durin unclean reboot. I was interested in the server output and " 2>&1 | less"
> is the logical way to do that.
>
> I could also "solve" this problem by not running linux. And I can "solve" all
> gcc bugs by not using gcc. Those are not solutions. Not to me at least.

You could also solve all your computer problems by not using a computer.

> > output into interactive programs. tail -f is a viable workaround -- and
>
> tail -f ? what is the difference between :
> $ X 2>&1 | tail -f
> and
> $ X
> ?
>
> > all this is off-topic on linux-kernel,
>
> non-root user locked up the console code. console code is part of kernel.
> it is a kernel topic.

This is not the problem. It's not the kernel's fault, it's less's fault.
When you pipe to less, it only reads enough to display on the screen. X is
sending tons more information than less is willing to read therefor X will
block (stop) until less reads more. I've done this myself. my work around
is to press END as soon as I hit enter. That way less will go to the end
and not block.

You're better off doing:
X > somefile 2>&1
then lessing "somefile". this won't block the X server.

I agree with matt that this is off-topic as it's not a kernel issue, it's
userland.

--
Lab tests show that use of micro$oft causes cancer in lab animals

2002-01-10 14:22:54

by Jasper Spaans

[permalink] [raw]
Subject: Re: Simple local DOS

On Thu, Jan 10, 2002 at 03:04:05PM +0100, David Balazic wrote:
> > > how do I start chvt if I have a locked up console system ?
> > Ctrl-Alt-F1 ?
> Which part of "locked up console system" you don't understand ? :-)

In that case, log in through telnet, become root, and type 'chvt 1'.

Works like a charm here.

Regards,
--
Jasper Spaans
http://jsp.ds9a.nl/contact/
Tel/Fax: +31-84-8749842
``Got no clue? Too bad for you.''

2002-01-10 14:59:37

by David Miller

[permalink] [raw]
Subject: Re: Simple local DOS

From: "Richard B. Johnson" <[email protected]>
Date: Thu, 10 Jan 2002 09:07:51 -0500 (EST)

Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
to the first VT, ALT-F2, next, etc.
No problem at all.

Only if X services the keypress, in his case X is blocked on
stdout/stderr output so it won't.

Franks a lot,
David S. Miller
[email protected]

2002-01-10 15:15:17

by Richard B. Johnson

[permalink] [raw]
Subject: Re: Simple local DOS

On Thu, 10 Jan 2002, David S. Miller wrote:

> From: "Richard B. Johnson" <[email protected]>
> Date: Thu, 10 Jan 2002 09:07:51 -0500 (EST)
>
> Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
> to the first VT, ALT-F2, next, etc.
> No problem at all.
>
> Only if X services the keypress, in his case X is blocked on
> stdout/stderr output so it won't.
>

I tried it before I answered the query. It works fine here. The
only problem I found is the VT that X was using ended up with
strange non-usable characteristics in graphics mode. The others
are fine and X can be killed, releasing its resources. Also,
CTL-Alt-Backspace works at least 50 percent of the time when
an attempt is made to lock it up as reported.

Cheers,
Dick Johnson

Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).

I was going to compile a list of innovations that could be
attributed to Microsoft. Once I realized that Ctrl-Alt-Del
was handled in the BIOS, I found that there aren't any.


2002-01-10 21:41:53

by jjs

[permalink] [raw]
Subject: Re: Simple local DOS

Nope, if the console is hosed that won't work.

That's when I use the magic sys rq keys -

cu

jjs

Richard B. Johnson wrote:

>On Thu, 10 Jan 2002, David Balazic wrote:
>
>>Matthias Andree ([email protected]) wrote :
>>
>>>On Wed, 09 Jan 2002, David Balazic wrote:
>>>
>>>>log in on some virtual terminal, then run the following line
>>>>in a bourne type shell, like bash :
>>>>
>>>>X 2>&1 | less
>>>>
>>>>A reboot "fixes" it. We want to reach windows level quality on desktop
>>>>after all, don't we ?
>>>>
>>>You can also fix that by a remote login,
>>>
>
>Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
>to the first VT, ALT-F2, next, etc.
>No problem at all.
>
>
>Cheers,
>Dick Johnson
>
>Penguin : Linux version 2.4.1 on an i686 machine (797.90 BogoMips).
>
> I was going to compile a list of innovations that could be
> attributed to Microsoft. Once I realized that Ctrl-Alt-Del
> was handled in the BIOS, I found that there aren't any.
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>


2002-01-10 21:41:53

by jjs

[permalink] [raw]
Subject: Re: Simple local DOS

More likely <ALT><SysRq>K

if magic sysrq keys are not disabled -

cu

jjs

Xavier Bestel wrote:

>On Thu, 2002-01-10 at 14:46, David Balazic wrote:
>
>>>chvt,
>>>
>>how do I start chvt if I have a locked up console system ?
>>
>
>Ctrl-Alt-F1 ?
>
> Xav
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>


2002-01-11 13:01:08

by Zwane Mwaikambo

[permalink] [raw]
Subject: Re: Simple local DOS

>Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
>to the first VT, ALT-F2, next, etc.
>No problem at all.

X can kill the keyboard completely, only way in was via remote.

Regards,
Zwane Mwaikambo


2002-01-11 18:04:14

by jjs

[permalink] [raw]
Subject: Re: Simple local DOS

IIUC the magic sys req keys work even if the
normal keyboard handling is hosed -

More than once when quake or rtcw appear
to have hosed the console completely, and it
appears "locked up", <ALT><SysRq> k has
brought me back to the gdm login screen.

cu

jjs

Zwane Mwaikambo wrote:

>>Ctrl-ALT-F12 selects VT mode from a locked X-window, ALT-F1 gets you
>>to the first VT, ALT-F2, next, etc.
>>No problem at all.
>>
>
>X can kill the keyboard completely, only way in was via remote.
>
>Regards,
> Zwane Mwaikambo
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>