Closed Bug 1687185 Opened 5 years ago Closed 5 years ago

release1 indexing error 2021-01-17 `umount: /index: target is busy.` on `sudo umount /index` at indexing completion likely due to `updatedb.mlocate`

Categories

(Webtools :: Searchfox, defect)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asuth, Assigned: asuth)

Details

Attachments

(1 file)

Log Excerpt

+ date
Sun Jan 17 06:25:47 UTC 2021
+ '[' -n /index ']'
+ mv /mnt/index-scratch/mozilla-mobile /index/mozilla-mobile
+ ln -s /index/mozilla-mobile /mnt/index-scratch/mozilla-mobile
+ date
Sun Jan 17 06:26:00 UTC 2021
+ echo 'Indexing complete'
Indexing complete
+ cp /home/ubuntu/index-log /index/index-log
+ sudo umount /index
umount: /index: target is busy.
++ handle_error
++ '[' -d /index ']'

Theories

The locate (via mlocate) database clearly knows about the contents of the /index so it seems possible it or some other daemon was being a busybody on the partition.

It's run from crontab from the daily group which has the crontab trigger of:

25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

From the timestamps above, we can see that we were attempting to unmount things at roughly 06:26 UTC and the cron job start is 06:25 UTC so this lines up pretty precisely.

Options

mlocate and cron specific:

Things we could do if we didn't strongly suspect it was updatedb at work here:

  • For error handling, we could add a call to fuser -vm /index.
  • We can use fuser's -k command (which can also take a signal like -9 to terminate any processes that are using the mount.
  • We could add a sleep try loop as a grace period. There's also umount -l for lazy but I don't think that's sufficient for our purposes.
  • We could use umount -f to try and force the unmount.

I think disabling the other cron jobs seems reasonable.

Attached file GitHub Pull Request
Assignee: nobody → bugmail
Status: NEW → ASSIGNED

(Landed same day, Jan 17th, 2021.)

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: