LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Bloody instance already running (http://www.linuxquestions.org/questions/linux-software-2/bloody-instance-already-running-463457/)

Sabinou 07-12-2006 06:08 PM

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 :)

leonscape 07-12-2006 06:48 PM

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.

Sabinou 07-12-2006 07:58 PM

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 ? :)

leonscape 07-13-2006 07:20 PM

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.

jtshaw 07-13-2006 09:21 PM

Check for a lock file in the .amule directory of your home directory.

Sabinou 07-14-2006 06:13 AM

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 :-)

jtshaw 07-14-2006 08:10 AM

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.

Sabinou 07-14-2006 08:39 AM

Thanks again for the info, then :o)


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