LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-07-2013, 01:48 AM   #1
sunil80
Member
 
Registered: Jan 2013
Posts: 44

Rep: Reputation: Disabled
to find dead lock


Hello everyone,

I am running a script in my linux system, but after some times it do not respond and gives no error. I think there is a dead lock.
Can you plz help me how to find the deadlock and then to remove it.
 
Old 03-07-2013, 02:03 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
1. post the script using code tags https://www.linuxquestions.org/quest...do=bbcode#code

2. to remove it
Code:
ps -ef|grep script_name_here
which should return a line like
Code:
chris     3860     1  5 08:38 ?        00:33:26 /usr/lib64/firefox/firefox
use the kill cmd on the process id, which is the first number eg
Code:
kill 3860
If it still won't die, try
Code:
kill -9 3860
 
Old 03-07-2013, 02:42 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,849

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
if it was a bash script you can simply insert set -vx at the beginning and look at the output. You will see the last statement...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
deian yum lock [ ERR] Reading state information E: Could not get lock /var/lock/aptit jayakumar01 Linux - Server 1 12-05-2011 11:26 AM
[SOLVED] CVS lock file -- I can't find it to remove it! dwhitney67 Programming 1 05-09-2011 12:35 PM
Looking for place where I can find dead projects clintonsk Linux - Software 2 10-25-2008 09:11 PM
CPU or Mainboard dead.. how to find out? DeNayGo General 20 09-18-2008 03:27 PM
How to find out whether a process is dead or alive from within a shell script file walwali Linux - Software 2 12-24-2005 01:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration