Subject: Re: [sup-talk] Can't start Sup, allegedly because of a locked index.

From: Shadowfirebird <[email-masked]>
Date: Thu, 2 Dec 2010 12:36:21 +0000

Well, I'm not seeing any errors.  But the log file does explain what is
going on, I think.   Sup says the other process that it is trying to kill
.... is itself; the process that is doing the killing.

I can still try and upload the log file if anyone is interested; not sure
where right now.  Would a public folder on Dropbox be okay?

Relevant last few lines pasted below.   Note, three from the bottom,
"kill(18723, SIGTERM)".   18723 is the *current* process number, so if I'm
reading this right, it's self-destructing.

write(2, "Error: the index is locked by another process! User '' on\nhost ''
is running  with pid .\nThe process was alive as of at least 4365 minutes
ago.\n\n"..., 145) = 145
write(2, "Should I ask that process to kill itself (y/n)? "..., 48) = 48
fstat(0, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7f7d384bc000
read(0, "y\n"..., 1024)                 = 2
write(2, "Ok, trying to kill process..."..., 29) = 29
write(2, "\n"..., 1)                    = 1
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
kill(0, SIGTERM)                        = 0
--- SIGTERM (Terminated) @ 0 (0) ---
rt_sigreturn(0xf)                       = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigaction(SIGINT, {SIG_DFL}, {0x7f7d380483e0, [INT],
SA_RESTORER|SA_RESTART, 0x7f7d37391040}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL}, {0x7f7d380483e0, [], SA_RESTORER,
0x7f7d37da0080}, 8) = 0
kill(18723, SIGTERM)                    = 0
--- SIGTERM (Terminated) @ 0 (0) ---
+++ killed by SIGTERM +++
<<<<
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Iain <[email-masked]>
Date: Thu, 02 Dec 2010 12:54:11 +0000

> Anyone got any ideas how I get out of this?
> 
> >>>>
> $ sup
> Error: the index is locked by another process! User '' on
> host '' is running  with pid .
> The process was alive as of at least 4216 minutes ago.
> Should I ask that process to kill itself (y/n)? n
> Sorry, couldn't unlock the index.

Something similar happened to me once. I just did "rm ~/.sup/lock", then
started sup as normal. Does that work for you?
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Shadowfirebird <[email-masked]>
Date: Thu, 2 Dec 2010 10:06:16 +0000

$ sup
Error: the index is locked by another process! User '' on
host '' is running  with pid .
The process was alive as of at least 4216 minutes ago.
Should I ask that process to kill itself (y/n)? n
Sorry, couldn't unlock the index.
$
$ sup
Error: the index is locked by another process! User '' on
host '' is running  with pid .
The process was alive as of at least 4216 minutes ago.
Should I ask that process to kill itself (y/n)? y
Ok, trying to kill process...
Terminated
$
$ sup
Error: the index is locked by another process! User '' on
host '' is running  with pid .
The process was alive as of at least 4217 minutes ago.
Should I ask that process to kill itself (y/n)?
<<<<

-- 
What a tangled web we weave / Go 'round with circumstance / Someone show me
how to tell / The dancer from the dance...
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Paul Grove <[email-masked]>
Date: Thu, 02 Dec 2010 12:56:28 +0000

I had this problem myself, exactly as described by Shadowfirebird.

I cant 100% recall the steps it took to resolve it, but I know I had to
delete the ~/.sup/lock file, and then I manually killed all instances of
sup just to be sure.  Maybe I did something else as well - maybe I didn't,
It was only a few weeks ago but I got such a bad memory.

Hope this helps,

Paul Grove

---

From: Michael Stapelberg <[email-masked]>
Date: Thu, 02 Dec 2010 14:00:01 +0100

Hi Shadowfirebird,

> reading this right, it's self-destructing.
Heh, right. Passing 0 as pid to kill() is not such a good idea.

In your case, I would suggest deleting the lock files manually (use ls -la
.sup/xapian to find them)

Best regards,
Michael

---

From: David Rysdam <[email-masked]>
Date: Thu, 02 Dec 2010 08:13:35 -0500

> Sorry, couldn't unlock the index.

I don't have this exact problem, but I have had problems where sup has
claimed to be unable to kill another instance because of a lock
problem.  I get a different message, but I'm running an old version.

I find that sometimes Xapian has left a lockfile.  If I delete
.sup/xapian/flintlock then I can start sup just fine.
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Michael Stapelberg <[email-masked]>
Date: Thu, 02 Dec 2010 11:53:35 +0100

Hi Shadowfirebird,

> Anyone got any ideas how I get out of this?
Do an 'strace -fF -s2048 -o /tmp/sup.log sup' and check the resulting
/tmp/sup.log for errors (searching from the very bottom), like -EPERM or
something. If that doesn’t help, bzip2 that file, upload it somewhere, and send
us/me a link to it.

Best regards,
Michael

---

From: Shadowfirebird <[email-masked]>
Date: Thu, 2 Dec 2010 13:07:44 +0000

Yes!! Thank you!

On Thu, Dec 2, 2010 at 12:54 PM, Iain
<[email-masked]<[email-masked]>
> wrote: