LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-12-2006, 06:08 PM   #1
Sabinou
Member
 
Registered: Jan 2006
Location: France
Distribution: Debian Squeeze, Webmin + Virtualmin (remote dedi)
Posts: 212

Rep: Reputation: 30
Bloody instance already running


Hello folks

I have a weird problem with a program that I cannot run, because the sytem thinks it's already running - while this is not the case.

Code:
[sabin@mdv ~]$ amule
Initialising aMule
Checking if there is an instance already running...
There is an instance of aMule already running
Raising current running instance.
[sabin@mdv ~]$
I'm running Mandriva 2006 with KDE 3.4.2, and amule is installed from an RPM package provided by PLF.

I tried removing and then reinstalling the program's package : that changed nothing.
I changed KDE's defaults, so that it would boot with a blank/virgin session, without any previous parameters : that changed nothing.
Of course, there is no amule program running, ksysguard (or a simple ps -A) didn't show any sign of it.

If I run amule as another user, for instance, this time the program will run.

So well, would you have any idea how I could solve that problem and be finally able to be able to run again my program ?
Any additional info required, I'll fetch it

Thanks a lot if you can help
 
Old 07-12-2006, 06:48 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
You probably have an errant pid entry. go into /proc and look into the pid directories, you should be looking at the symlinks exe. one of these probably will be pointing a aMule, delete that entry and voila.

But PLEASE make sure that it really isn't running that pid by using kill first.
 
Old 07-12-2006, 07:58 PM   #3
Sabinou
Member
 
Registered: Jan 2006
Location: France
Distribution: Debian Squeeze, Webmin + Virtualmin (remote dedi)
Posts: 212

Original Poster
Rep: Reputation: 30
Thanks for the reply, Leonscape.
It took me quite a while for finding how to check all the exe symlinks (the list kept refreshing too fast), a search for "exe" and a quick glance of of of the columns did the trick ^^

But alas, after a search, I can tell that no exe symlink is pointing at /usr/bin/amule
Isn't it weird, after all, since another user can run the program perfectly ?

Thanks again, even if it didn't work
Would you have an other idea, perhaps ?
 
Old 07-13-2006, 07:20 PM   #4
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Try looking in the temp directories, maybe its left something behind something its checking, failing and throwing up an unrelated error. check also any config files in the users local directory . directories and files are common, maybe one of them is corrupt.
 
Old 07-13-2006, 09:21 PM   #5
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Check for a lock file in the .amule directory of your home directory.
 
Old 07-14-2006, 06:13 AM   #6
Sabinou
Member
 
Registered: Jan 2006
Location: France
Distribution: Debian Squeeze, Webmin + Virtualmin (remote dedi)
Posts: 212

Original Poster
Rep: Reputation: 30
Erm, I have indeed a lock file "muleLock" in the .amule directory, and though it's a binary file, the file contains 4910, which could be a PID.
And, I just tested, that was REALLY the cause of the problem.

How weird ?? Why such a file's presence would induce the program into already believing an instance was already running ? o_O

Thanks a great lot, Jtshaw :-)
 
Old 07-14-2006, 08:10 AM   #7
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by Sabinou
How weird ?? Why such a file's presence would induce the program into already believing an instance was already running ? o_O
This is a method programs use to determine if there is an instance already running. On execution the first thing they do is check for the existence of a file (usually called lock or something like that). If the file is there, they assume another instance and won't execute. If it isn't they write the file and move on. I for one hate this method and find it antiquated.. but a lot of people still use it.
 
Old 07-14-2006, 08:39 AM   #8
Sabinou
Member
 
Registered: Jan 2006
Location: France
Distribution: Debian Squeeze, Webmin + Virtualmin (remote dedi)
Posts: 212

Original Poster
Rep: Reputation: 30
Thanks again for the info, then )
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
to check instance of a script running kushalkoolwal Programming 14 02-23-2006 06:51 PM
running 2 instance of apache in one box suprateemdas Linux - Networking 1 02-23-2006 08:17 AM
Sorry, there is already an instance of ifplugd for eth0 running. Maxplayer14 Mandriva 1 03-30-2005 11:21 AM
Passing parameters to already running instance of a program saravkrish Programming 5 10-31-2004 03:19 PM
Running more than 1 instance of Mozilla snatale1 Linux - Newbie 6 09-14-2003 10:01 AM


All times are GMT -5. The time now is 06:52 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration