FAQ Search Today's Posts Mark Forums Read

» Linux Archive
Home
New Posts
Search
FAQ


Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 04-28-2008, 08:15 AM
Yang Zhiguo
 
Default a strange thing

hi, all

When i used crash in a bash script file, a strange thing happened.

step 1:
I created a bash script file: test.sh and put the following line to the
file.

crash -i inputfile > stdout

[root@rhel51rc2 gid]# echo "crash -i inputfile > stdout" > test.sh

step 2:
I ran the bash script file.
But i forgot to create the inputfile, so the tesh.sh process hanguped.

[root@rhel51rc2 gid]# chmod 777 test.sh
[root@rhel51rc2 gid]# ./test.sh


step 3:
I killed the process in another terminal.

[root@rhel51rc2 gid]# ps aux | grep crash
root 2290 1.3 2.6 156064 89648 pts/3 S+ 16:53 0:03 crash
-i inputfile

root 2310 0.0 0.0 61280 1792 pts/4 S+ 16:56 0:00 grep crash
[root@rhel51rc2 gid]# kill -9 2290
[root@rhel51rc2 gid]#

step 4:
I continued to use the first terminal. The strange thing happend, that I
could not see
the command(ex. ls) I inputed, but when I pressed Enter, It was
executed. what's wrong?


[root@rhel51rc2 gid]# ./test.sh
./test.sh: line 1: 2290 Killed crash -i inputfile >stdout
[root@rhel51rc2 gid]# a.out CVS gid.c gid.stp Makefile run.sh
stdout test.sh

[root@rhel51rc2 gid]#

Best Regards,
yang


--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-28-2008, 12:45 PM
Dave Anderson
 
Default a strange thing

Yang Zhiguo wrote:

hi, all

When i used crash in a bash script file, a strange thing happened.

step 1:
I created a bash script file: test.sh and put the following line to the
file.

crash -i inputfile > stdout

[root@rhel51rc2 gid]# echo "crash -i inputfile > stdout" > test.sh

step 2:
I ran the bash script file.
But i forgot to create the inputfile, so the tesh.sh process hanguped.

[root@rhel51rc2 gid]# chmod 777 test.sh
[root@rhel51rc2 gid]# ./test.sh


step 3:
I killed the process in another terminal.

[root@rhel51rc2 gid]# ps aux | grep crash
root 2290 1.3 2.6 156064 89648 pts/3 S+ 16:53 0:03 crash
-i inputfile

root 2310 0.0 0.0 61280 1792 pts/4 S+ 16:56 0:00 grep crash
[root@rhel51rc2 gid]# kill -9 2290
[root@rhel51rc2 gid]#

step 4:
I continued to use the first terminal. The strange thing happend, that I
could not see
the command(ex. ls) I inputed, but when I pressed Enter, It was
executed. what's wrong?


[root@rhel51rc2 gid]# ./test.sh
./test.sh: line 1: 2290 Killed crash -i inputfile >stdout
[root@rhel51rc2 gid]# a.out CVS gid.c gid.stp Makefile run.sh
stdout test.sh

[root@rhel51rc2 gid]#


I'm not sure, but try entering "reset" in that window. It probably is
due to the killed crash utility leaving the tty in a raw mode.

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-29-2008, 12:40 AM
"Yang Zhiguo"
 
Default a strange thing

----- Original Message -----
From: "Dave Anderson" <anderson@redhat.com>
To: "Discussion list for crash utility usage,maintenance and development" <crash-utility@redhat.com>
Sent: Monday, April 28, 2008 8:45 PM
Subject: Re: [Crash-utility] a strange thing


> Yang Zhiguo wrote:
>> hi, all
>>
>> When i used crash in a bash script file, a strange thing happened.
>>
>> step 1:
>> I created a bash script file: test.sh and put the following line to the
>> file.
>> crash -i inputfile > stdout
>>
>> [root@rhel51rc2 gid]# echo "crash -i inputfile > stdout" > test.sh
>>
>> step 2:
>> I ran the bash script file.
>> But i forgot to create the inputfile, so the tesh.sh process hanguped.
>>
>> [root@rhel51rc2 gid]# chmod 777 test.sh
>> [root@rhel51rc2 gid]# ./test.sh
>>
>>
>> step 3:
>> I killed the process in another terminal.
>>
>> [root@rhel51rc2 gid]# ps aux | grep crash
>> root 2290 1.3 2.6 156064 89648 pts/3 S+ 16:53 0:03 crash
>> -i inputfile
>> root 2310 0.0 0.0 61280 1792 pts/4 S+ 16:56 0:00 grep crash
>> [root@rhel51rc2 gid]# kill -9 2290
>> [root@rhel51rc2 gid]#
>>
>> step 4:
>> I continued to use the first terminal. The strange thing happend, that I
>> could not see
>> the command(ex. ls) I inputed, but when I pressed Enter, It was
>> executed. what's wrong?
>>
>> [root@rhel51rc2 gid]# ./test.sh
>> ./test.sh: line 1: 2290 Killed crash -i inputfile >stdout
>> [root@rhel51rc2 gid]# a.out CVS gid.c gid.stp Makefile run.sh
>> stdout test.sh
>> [root@rhel51rc2 gid]#
>
> I'm not sure, but try entering "reset" in that window. It probably is
> due to the killed crash utility leaving the tty in a raw mode.

Yes, it is OK after the "reset" inputted.
But, can we avoid this by patching the crash utility?

Best Regards,
yang


>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 04-29-2008, 12:56 PM
Dave Anderson
 
Default a strange thing

Yang Zhiguo wrote:
----- Original Message -----
From: "Dave Anderson" <anderson@redhat.com>

To: "Discussion list for crash utility usage,maintenance and development" <crash-utility@redhat.com>
Sent: Monday, April 28, 2008 8:45 PM
Subject: Re: [Crash-utility] a strange thing



Yang Zhiguo wrote:

hi, all

When i used crash in a bash script file, a strange thing happened.

step 1:
I created a bash script file: test.sh and put the following line to the
file.

crash -i inputfile > stdout

[root@rhel51rc2 gid]# echo "crash -i inputfile > stdout" > test.sh

step 2:
I ran the bash script file.
But i forgot to create the inputfile, so the tesh.sh process hanguped.

[root@rhel51rc2 gid]# chmod 777 test.sh
[root@rhel51rc2 gid]# ./test.sh


step 3:
I killed the process in another terminal.

[root@rhel51rc2 gid]# ps aux | grep crash
root 2290 1.3 2.6 156064 89648 pts/3 S+ 16:53 0:03 crash
-i inputfile

root 2310 0.0 0.0 61280 1792 pts/4 S+ 16:56 0:00 grep crash
[root@rhel51rc2 gid]# kill -9 2290
[root@rhel51rc2 gid]#

step 4:
I continued to use the first terminal. The strange thing happend, that I
could not see
the command(ex. ls) I inputed, but when I pressed Enter, It was
executed. what's wrong?


[root@rhel51rc2 gid]# ./test.sh
./test.sh: line 1: 2290 Killed crash -i inputfile >stdout
[root@rhel51rc2 gid]# a.out CVS gid.c gid.stp Makefile run.sh
stdout test.sh

[root@rhel51rc2 gid]#

I'm not sure, but try entering "reset" in that window. It probably is
due to the killed crash utility leaving the tty in a raw mode.


Yes, it is OK after the "reset" inputted.
But, can we avoid this by patching the crash utility?

Best Regards,
yang


Perhaps, but since you can't catch a SIGKILL, I don't know how.

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 05:29 AM.

VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org