avoid several instances running simultaneously

Bug #119614 reported by Tormod Volden
6
Affects Status Importance Assigned to Milestone
scrollkeeper (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: scrollkeeper

Often when I do an apt-get upgrade, scrollkeeper-update is running a number of times, which takes quite some time. But I have seen several times that it just gets stuck seemingly forever. Checking with "ps" I see I have 2 separately running scrollkeeper-updates running. I guess one is from package updating, and the other is from cron. You would think this coincidence would not happen very often, but the utter slowness of the scrollkeeper-update gives a higher probability that it is running at any time.

Shouldn't there be a lock file that keeps it from running in double?

Tags: bitesize
Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
Tormod Volden (tormodvolden) wrote :

This is still happening in Ubuntu 7.10.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

This is strictly not a duplicate of bug #44535, since that deals with running it several times _after_ each other. This would help, but the bigger problem is when several processes are running _simultaneously_ and they block each other to crawl.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

You're right, my mistake. Furthermore, the scrollkeeper-rebuilddb script deletes the scrollkeeper database before running the update. Hence running the process twice is totally useless. The case shouldn't happen so often as the cron job runs only once a month.

Thanks for reporting this bug. Since this bug has enough information provided for a developer to begin work, I'm going to mark it as confirmed and let them handle it from here. Thanks for taking the time to make Ubuntu better!

Changed in scrollkeeper:
status: New → Confirmed
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

A quick patch against scrollkeeper-rebuilddb.in to avoid scrollkeeper-rebuilddb run more than one at a time.
Needs review & testing.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for the patch. Tried it, but lockfile-create is not included in Hardy.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

What about this patch? I thought it might be clever to use a lock directory, since mkdir is a pretty atomic function so there'll be no race condition (which could happen between file checking and file creation).

Revision history for this message
Tormod Volden (tormodvolden) wrote :
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Scrollkeeper has been deprecated in Intrepid and replaced by rarian (formerly spoon) . Despite the low importance you can try to nominate it for a Hardy SRU.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

That's good news. I hope rarian is less of a nuisance.

Revision history for this message
David Stansby (dstansby-deactivatedaccount) wrote :

If anyone would like to try and get this fix released as a SRU, please could you follow the guidelines shown here https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

Changed in scrollkeeper (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.