[26902] in Athena Bugs

home help back first fref pref prev next nref lref last post

9.5.27 linux: firefox lockfile problems

daemon@ATHENA.MIT.EDU (John Hawkinson)
Wed Jul 26 15:27:38 2006

Date: Wed, 26 Jul 2006 15:27:19 -0400
From: John Hawkinson <jhawk@mit.edu>
To: bugs@mit.edu
Message-ID: <20060726192719.GK661@multics.mit.edu>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Spam-Score: 3.548
X-Spam-Level: *** (3.548)
X-Spam-Flag: NO
Cc: samira@mit.edu
Errors-To: bugs-bounces@mit.edu

Hi.

    User samira came by SIPB reporting problems with Firefox and
lockfiles. She seems to get the firefox lockfile dialog at startup
(refusing to continue and only allowing her to exit), requiring
removing the lockfile by hand. Furthermore, these problems seem to
happen repeatedly.

    I removed a lockfile (found from "find .mozilla -name lock"),
firefox still started fine; I suggested she should let us know if the
problem happened again, and within a few minutes, the problem had
recurred.

    Running find returned:

.mozilla/firefox/3nob9mk6.default/lock

    The output of "sh -x `which firefox`" follows... I didn't feel
inclined to delve into whether/where/how testlock is failing, but
looks like it's looking for a .parentlock when it should be looking
for "lock" (?).

    Also, there doesn't seem to be a manpage for testlock.  I realize
it's a 51-line C program, but it's frustrating to have to go to the
source to figure out what it is doing. Similarly, the comment in
firefox.sh isn't very insightful ("testlock is used to test whether
the profile directory's lock file is actually locked.") -- something
more helpful, like "testlock opens the specified file and checks for
an fcntl lock with fcntl(, F_GETLK,)" would have saved me some time.
Also, is there a good reason why the file is opened
O_RDWR instead of O_RDONLY?

--jhawk

----- Forwarded message from samira@MIT.EDU -----

Date: Wed, 26 Jul 2006 15:02:16 -0400
From: samira@MIT.EDU
Message-Id: <200607261902.k6QJ2GE1015707@w20-575-56.mit.edu>
To: jhawk@MIT.EDU

+ moz_progname=firefox
+ prof_parent=/afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox
+ lockers='infoagents acro'
+ case `uname` in
++ uname
+ firefox_libdir=/usr/lib/firefox
+ java_plugin_dir=/usr/java/jdk/jre/plugin/i386/ns7
+ moz_remote=/usr/lib/firefox/mozilla-xremote-client
+ testlock=/usr/athena/bin/testlock
+ '[' '' = set ']'
+ plugin_path=/usr/java/jdk/jre/plugin/i386/ns7:/mit/infoagents/arch/@sys/lib/mozilla/plugins
+ MOZ_PLUGIN_PATH=/usr/java/jdk/jre/plugin/i386/ns7:/mit/infoagents/arch/@sys/lib/mozilla/plugins
+ export MOZ_PLUGIN_PATH
+ '[' -x /etc/athena/dialuptype ']'
+ for locker in '$lockers'
+ /bin/athena/attach -h -n -q infoagents
+ for locker in '$lockers'
+ /bin/athena/attach -h -n -q acro
+ '[' -z '' ']'
+ FONTCONFIG_FILE=/mit/infoagents/share/fonts/fonts.conf
+ export FONTCONFIG_FILE
+ '[' '!' -d /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox ']'
+ case "$1" in
+ '[' '' = set ']'
+ user='-u samira'
+ /usr/lib/firefox/mozilla-xremote-client -u samira -a firefox 'ping()'
+ case $? in
+ found_running=error
+ '[' error '!=' true ']'
++ get_profdir
++ case `uname` in
+++ uname
++ awk=awk
++ inifile=/afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/profiles.ini
++ '[' '!' -s /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/profiles.ini ']'
++ awk -F= -v parent=/afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox '
    BEGIN {
      nprofiles = 0;
      use_default = 1;
    }
  
    $1 ~ /^\[.*\]$/ {
      section = substr($1, 2, length($1) - 2);
      if (section ~ /^Profile[0-9]*$/) {
        id = section;
        nprofiles++;
      }
    }
    $1 == "StartWithLastProfile" {
      if (section == "General")
        use_default = int($2);
    }
    $1 == "Name"       { a[id, "name"] = $2; }
    $1 == "IsRelative" { a[id, "isrelative"] = $2; }
    $1 == "Path"       { a[id, "path"] = $2; }
    $1 == "Default"    { a[id, "default"] = $2; }
  
    END {
      count = 0;
      default = "";
      for (i = 0; i < nprofiles; i++) {
        id = "Profile" i;
        if (a[id, "name"] != "" && a[id, "isrelative"] != "" &&
            a[id, "path"] != "") {
          count++;
          if (int(a[id, "default"]) != 0)
            default = id;
        }
      }
      if (use_default != 0 && default != "")
        id = default;
      else if (nprofiles == 1 && count == 1)
        id = "Profile0";
      else
        id = "";
      if (id != "") {
        if (int(a[id, "isrelative"]) == 0)
          print a[id, "path"];
        else
          print parent "/" a[id, "path"];
      }
    }' /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/profiles.ini
+ profdir=/afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/3nob9mk6.default
+ '[' -n /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/3nob9mk6.default ']'
+ lockfile=/afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/3nob9mk6.default/.parentlock
+ '[' -h /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/3nob9mk6.default/lock ']'
++ /usr/athena/bin/testlock /afs/athena.mit.edu/user/s/a/samira/.mozilla/firefox/3nob9mk6.default/.parentlock
+ lock_pid=15304
+ '[' 2 -eq 2 ']'
+ '[' 15304 -eq 0 ']'
+ kill -0 15304
+ :
+ exec /usr/lib/firefox/firefox

----- End forwarded message -----

home help back first fref pref prev next nref lref last post