Ticket #984 (closed enhancement: invalid)

Opened 2 years ago

Last modified 2 years ago

Stale NFS file handle

Reported by: pjb@… Owned by:
Priority: minor Milestone:
Component: other Version: trunk
Keywords: Cc:

Description

This problem is low priority, but since it may occur in more pressing situations, you may be interested in having a look at it.

- /Users is a local home dir on MacOSX system (where ~/.cache/common-lisp is located).
- /home is a NFS mount from a Linux workstation (where project sources are located).
- ccl is running on MacOSX system (AppStore version).
- swank server is created in ccl on MacOSX.
- slime is used on Linux workstation to connect to ccl on MacOSX.
- project in /home is loaded via quicklisp.
- an error occurs while compiling a file.
- slime debugger is entered.
- file is edited on linux workstation.
- 1: [retry-compile-file] restart is selected in sldb.

and this produces:

Stale NFS file handle : "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp"
   [Condition of type ccl::simple-file-error]

Restarts:
 0: [retry-open] Retry opening "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp"
 1: [retry-compile-file] Retry compiling "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp"
 2: [skip-compile-file] Skip compiling "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp"
 3: [retry-load] Retry loading #P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl"
 4: [skip-load] Skip loading #P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl"
 5: [load-other] Load other file instead of #P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl"
 --more--

Backtrace:
  0: (ccl::make-file-stream "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" :input base-char :ignored :error file-stream :default :private t)
  1: (open "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" :direction :input :element-type base-char :if-exists :error :if-does-not-exist :error :external-format :default :class file-stream :sharing :private :basic t)
  2: (ccl::fcomp-read-loop "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" 0 #<ccl::lexical-environment #x302002AB5A3D> :not-compile-time)
  3: (ccl::fcomp-file "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" 0 #<ccl::lexical-environment #x302002AB5A3D>)
  4: (ccl::%compile-file "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" "/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl" nil nil t t nil t :defer nil #<backend darwinx8664 #x3020001C427D> :default nil 0)
  5: (compile-file "/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.lisp" :output-file "/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl" :verbose nil :print nil :load nil :features nil :target :darwinx8664 :save-local-symbols t :save-doc-strings t :save-definitions nil :save-source-locations t :external-format :default :force nil :compile-file-original-truename nil :compile-file-original-buffer-offset 0 :break-on-program-errors :defer)
  6: (ccl::%load #P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl" nil nil :error :default)
  7: (load #P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl" :verbose nil :print nil :if-does-not-exist :error :external-format :default)
  8: (map nil #<Compiled-function load #x300000128B4F> (#P"/Users/pjb/.cache/common-lisp/ccl-1.8-f95-macosx-x64/home/pjb/works/patchwork/patchwork/src/pw-kernel/pw-graphics/window+menu/pw-menu.dx64fsl"))
  9: (ccl::%%before-and-after-combined-method-dcode (nil #<standard-method asdf:perform (asdf:load-op asdf:cl-source-file)> . 20824481))
 10: (ccl::%%standard-combined-method-dcode (nil (#<standard-method asdf:perform :after (asdf:operation asdf:component)>) #<standard-method asdf:perform (asdf:load-op asdf:cl-source-file)>) 20824481)
 11: (nil #<Unknown Arguments>)
 12: (ccl::%call-next-method (nil #<standard-method asdf::perform-with-restarts (t t)> . 20824550))
 13: (#<standard-method asdf::perform-with-restarts (asdf:load-op asdf:cl-source-file)> #<load-op (:verbose nil) #x3020028E2BFD> #<cl-source-file "patchwork" "pw-kernel/pw-graphics/window+menu/pw-menu">)
 14: (ccl::%call-next-method (nil #<standard-method asdf::perform-with-restarts (t t)> . 20824550))
 15: (#<standard-method asdf::perform-with-restarts :around (t t)> #<load-op (:verbose nil) #x3020028E2BFD> #<cl-source-file "patchwork" "pw-kernel/pw-graphics/window+menu/pw-menu">)
 16: (ccl::%%standard-combined-method-dcode (#<standard-method asdf::perform-with-restarts :around (t t)> #<standard-method asdf::perform-with-restarts (asdf:load-op asdf:cl-source-file)> #<standard-method asdf::perform-with-restarts (t t)>) 20824550)
 17: (nil #<Unknown Arguments>)
 18: ((:internal ccl::with-compilation-unit-body (asdf::perform-plan (list))))
 19: (ccl::call-with-compilation-unit #<ccl:compiled-lexical-closure (:internal ccl::with-compilation-unit-body (asdf::perform-plan (list))) #xA003BFF> :override nil)
 20: (#<standard-method asdf::perform-plan (list)> ((#1=#<load-op (:verbose nil) #x3020028E05DD> . #<cl-source-file #2="patchwork" "pw-kernel/environment/lelisp-macros">) (#1# . #<cl-source-file #2# "patchwork-package">) (#6=#<compile-op (:verbose nil) #x3020028D891D> . #3=#<cl-source-file #2# "pw-kernel/pw-graphics/window+menu/pw-menu">) (#<load-op (:verbose nil) #x3020028E2BFD> . #3#) (#4=#<load-op (:verbose nil) #x3020028E1F6D> . #<cl-source-file #2# "pw-kernel/environment/clpf-utils">) (#4# . #<cl-source-file #2# "pw-macosx/reader-macros">) (#4# . #<cl-source-file #2# "pw-kernel/pw-graphics/controls/pw-graphics">) (#5=#<load-op (:verbose nil) #x3020028E127D> . #<cl-source-file #2# "pw-kernel/pw-graphics/controls/pw-controls">) (#5# . #<cl-source-file #2# "pw-kernel/types/pw-type-scheme">) (#5# . #<cl-source-file #2# "pw-kernel/box-creation/resize+extend-patch">) (#5# . #<cl-source-file #2# "pw-kernel/types/pw-types">) (#5# . #<cl-source-file #2# "pw-kernel/environment/pw-symbolic-types"..
 21: (ccl::%%check-keywords #(1 #() #<ccl:method-function asdf::perform-plan (list)>) 20824593)
 22: (nil #<Unknown Arguments>)
 23: ((:internal (asdf:operate (t t))))
 24: (asdf::call-with-system-definitions #<ccl:compiled-lexical-closure (:internal (asdf:operate (t t))) #x3020028D924F>)
 25: (#<standard-method asdf:operate (t t)> asdf:load-op "patchwork" :verbose nil)
 26: (ccl::%%standard-combined-method-dcode ((#<standard-method asdf:operate :before (t t)>) nil #<standard-method asdf:operate (t t)>) 20824644)
 27: (nil #<Unknown Arguments>)
 28: ((:internal quicklisp-client::apply-load-strategy))
 29: (quicklisp-client::call-with-macroexpand-progress #<ccl:compiled-lexical-closure (:internal quicklisp-client::apply-load-strategy) #x3020028D935F>)
 30: (quicklisp-client::apply-load-strategy #<load-strategy "patchwork" (1 asdf, 0 quicklisp)>)
 31: (quicklisp-client::autoload-system-and-dependencies "patchwork" :prompt nil)
 32: ((:internal quicklisp-client::ql (quicklisp-client:quickload (t))))
 33: (#<standard-method ql-impl-util::%call-with-quiet-compilation (t t)> #<ql-impl:ccl #x302000E64D6D> #<ccl:compiled-lexical-closure (:internal quicklisp-client::ql (quicklisp-client:quickload (t))) #x30200288C92F>)
 34: (ql-impl-util:call-with-quiet-compilation #<ccl:compiled-lexical-closure (:internal quicklisp-client::ql (quicklisp-client:quickload (t))) #x30200288C92F>)
 35: (#<standard-method quicklisp-client:quickload (t)> (:patchwork) :prompt nil :verbose nil)
 36: (ccl::%call-next-method ((nil) #<standard-method quicklisp-client:quickload (t)> :patchwork))
 37: ((:internal (quicklisp-client:quickload :around (t))))
 38: (ql-dist::call-with-consistent-dists #<ccl:compiled-lexical-closure (:internal (quicklisp-client:quickload :around (t))) #x3020028711BF>)
 39: (#<standard-method quicklisp-client:quickload :around (t)> :patchwork :verbose nil :prompt nil :explain nil)
 40: (ccl::%%standard-combined-method-dcode (#<standard-method quicklisp-client:quickload :around (t)> #<standard-method quicklisp-client:quickload (t)>) 20824781)
 41: (nil #<Unknown Arguments>)
 42: (ccl::call-check-regs quicklisp-client:quickload :patchwork)
 43: (ccl::cheap-eval (quicklisp-client:quickload :patchwork))
 44: (swank::eval-region "(ql:quickload :patchwork)
     ")
 45: ((:internal swank::repl-eval))
 46: (swank::track-package #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x3020028714BF>)
 47: ((:internal swank::repl-eval))
 48: (swank::call-with-retry-restart "Retry SLIME REPL evaluation request." #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x30200287159F>)
 49: ((:internal swank::repl-eval))
 50: (#<Anonymous Function #x302001F3CB8F> #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x3020028715DF>)
 51: (swank-backend:call-with-syntax-hooks #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x3020028715DF>)
 52: (swank::call-with-buffer-syntax nil #<ccl:compiled-lexical-closure (:internal swank::repl-eval) #x3020028715DF>)
 53: (swank::repl-eval "(ql:quickload :patchwork)
     ")
 54: (swank:listener-eval "(ql:quickload :patchwork)
     ")
 55: (ccl::call-check-regs swank:listener-eval "(ql:quickload :patchwork)
     ")
 56: (ccl::cheap-eval (swank:listener-eval "(ql:quickload :patchwork)
     "))
 57: (swank:eval-for-emacs (swank:listener-eval "(ql:quickload :patchwork)
     ") "MCLGUI" 11)
 58: (swank::process-requests nil)
 59: ((:internal swank::handle-requests))
 60: ((:internal swank::handle-requests))
 61: (swank-backend:call-with-debugger-hook #<Compiled-function swank:swank-debugger-hook #x30200210B44F> #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x30200231367F>)
 62: (swank-backend:call-with-debugger-hook #<Compiled-function swank:swank-debugger-hook #x30200210B44F> #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x30200231367F>)
 63: ((:internal swank::handle-requests))
 64: (swank::call-with-bindings ((*standard-output* . #1=#<swank-backend::slime-output-stream #x302002311ACD>) (*standard-input* . #2=#<swank-backend::slime-input-stream #x302002311E3D>) (*trace-output* . #1#) (*error-output* . #1#) (*debug-io* . #3=#<two-way-stream input #2#, output #1# #x3020023099CD>) (*query-io* . #3#) (*terminal-io* . #3#)) #<ccl:compiled-lexical-closure (:internal swank::handle-requests) #x3020023135EF>)
 65: (swank::handle-requests #<multithreaded-connection  #x3020021AFE5D> nil)
 66: (swank::repl-loop #<multithreaded-connection  #x3020021AFE5D>)
 67: ((:internal swank::spawn-repl-thread))
 68: (swank::call-with-bindings ((*print-pretty*) (*print-level*) (*print-length*) (*print-circle* . t) (*print-case* . :downcase) (*print-readably*) (*print-gensym* . t) (*print-base* . 10) (*print-radix*) (*print-array* . t) (*print-lines*) (*print-escape* . t) (*print-right-margin* . 1000) (*random-state* . #.(ccl::initialize-mrg31k3p-state 1671441915 243261705 587616156 1996668199 2126887465 12325974)) (swank::*sldb-bitvector-length*) (swank::*sldb-string-length*)) #<ccl:compiled-lexical-closure (:internal swank::spawn-repl-thread) #x3020023139CF>)
 69: ((:internal swank::spawn-repl-thread))
 70: (ccl::run-process-initial-form #<process repl-thread(18) [Active] #x302002312ACD> (#<ccl:compiled-lexical-closure (:internal ccl::%process-run-function) #x30200231285F>))
 71: ((:internal (ccl::%process-preset-internal (ccl:process))) #<process repl-thread(18) [Active] #x302002312ACD> (#<ccl:compiled-lexical-closure (:internal ccl::%process-run-function) #x30200231285F>))
 72: ((:internal ccl::thread-make-startup-function))

Change History

comment:1 Changed 2 years ago by gb

  • Status changed from new to closed
  • Resolution set to invalid

It's not clear to me what you think the bug is.

If the 'open' system call didn't fail with ESTALE and CCL reported that it did, then that would certainly be a bug, but there doesn't seem to be any reason to believe that anything like that happened.

Googling for the term "stale NFS file handle" returns many thousands of hits, many of which purport to explain the causes of this problem and suggest workarounds.

CCL provides a restart which tries to restart a failed attempt to LOAD a file; it's possible (if the underlying problem has been fixed in the meantime) that this restart could save some time in some cases which involve NFS lossage. It's not likely that CCL would be able to fix NFS problems for you, so that restart is probably pretty near the limit of what CCL can reasonably do here.

comment:2 Changed 2 years ago by pjb@…

I thought the bug was in ccl keeping a handle to the file between the close and open when the recompile restart is invoked.

But indeed, it is more probable that this handle is kept in a cache in the MacOSX system, and that it doesn't renegociate the handle fast enough between the close and open.

Note: See TracTickets for help on using tickets.