[Openmcl-devel] Weblocks-Demo Permission Denied Win32

Gary Byers gb at clozure.com
Sun Jan 10 22:44:59 UTC 2010



On Sun, 10 Jan 2010, John Federico wrote:

> I'm trying to get weblocks-stable working on a Vista 32 bit machine
> with Clozure CL (without cygwin, Clozure Common Lisp Version 1.4-
> r13372  WindowsX8632).  I was making progress, but now I am stuck.  I
> can get weblocks to run, and I can get the initial weblocks-demo page,
> but when I click on "Start Demo" I get:
>
> SIMPLE-FILE-ERROR: Permission denied :
> #P"c:/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/3472084051.tem"
>

The file in question (with a name like "nnnnnnnn.tem") is a sort of backup
file created when an existing file is opened with :IF-EXISTS :SUPERSEDE.
The original file is renamed as the temporary file and a new file with
the original name is created. If the new file is closed normally the 
backup file is deleted; if the new file is closed with :ABORT T the
new file is deleted and the temporary file's renamed to have the original
file name.

That's more-or-less how things are supposed to work, how they seem to
work on Unix-based systems, and how they seem to -usually- work on
Windows, but on Windows there's some additional constraint.  (If I
remembered exactly what that constraint was, there's a fairly good
chance that this problem would be gone, but my recollection is that
Windows doesn't like to delete or rename files that're open, but
instead schedules the file to be renamed/deleted after it's closed.
(Again, that may not be entirely accurate, but I think that it's
close to being accurate, in some handwavy sense ...)

When the file is in this state (on death row ...), it can't be opened
again or deleted or renamed, and attempts to perform these operations
will fail with a "permission error"; this has nothing to do with the
bits or other attributes associated with the file that ordinarily
control who can do what.

That generally seems to be what you're seeing, but I don't understand
the issue well enough to understand what sequence of operations causes
this (or how to make CCL's filesystem code avoid that sequence.)

The names used for temporary files aren't very well-chosen (the numeric
part is just derived from the file's write date, and the fact that
file name conflicts are likely seems to trigger the bug in your case.)
Code is trying to see if the proposed temporary file name is available
by calling CREATE-FILE ... :IF-EXISTS NIL, and rather than getting
a "file exists" error and returning NIL, we're getting some sort of
permission error that could as easily mean "you don't have the right
to create files in this directory."  I think that the real problem
is that the file has entered the realm of the undead, and we need
to better understand how zombies are created.

Some tests in the test suite that we use fail on Windows for what seem
to be similar reasons; I generally can't reproduce that behavior when
the tests are run again, so the failures seem to be sensitive to
context in some way.  I've also seen it happen very, very occasionally
outside of that test suite, but have never isolated the cause (and
the things that seem to be involved - opening/closing/renaming/deleting
files - happen all the time and seem to behave correctly.

> This one has me stumped.  Even though I am an administrator, I can't
> even look at the file 3472084051.tem.  It tells me "You do not have
> permission to view this object's security properties."  My best guess
> is that the file isn't writing correctly, or isn't being closed
> properly and that is causing the error?  I have tried manually
> changing the permissions on the file, enabling/disabling UAC, etc.
> only to be denied at every attempt.  I have also tried changing the
> permissions of the folder and it still doesn't work.  The generated
> "tem" files are the only ones with bad permissions.  All others can be
> accessed.
>
> I posted the issue over at the weblocks group, but they suggested
> posting it over here.
>
> This is the backtrace:
>
> (44DE0478) : 0 (PRINT-CALL-HISTORY :CONTEXT NIL :PROCESS NIL :ORIGIN
> NIL :DETAILED-P NIL :COUNT 536870911 :START-FRAME-NUMBER 0 :STREAM
> #<STRING-OUTPUT-STREAM  #xA165F06> :PRINT-LEVEL 2 :PRINT-LENGTH 5
> :SHOW-INTERNAL-FRAMES NIL :FORMAT :TRADITIONAL) 895
> (44DE052C) : 1 (PRINT-BACKTRACE-TO-STREAM #<STRING-OUTPUT-STREAM
> #xA165F06>) 71
> (44DE0544) : 2 (PRINT-BACKTRACE #<CCL::SIMPLE-FILE-ERROR #xA026356>
> :OUTPUT NIL :IF-EXISTS :APPEND :VERBOSE NIL) 1079
> (44DE0588) : 3 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:HANDLE-ERROR-CONDITION (WEBLOCKS:WEBLOCKS-WEBAPP T)>>
> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO #x9F92976> #<CCL::SIMPLE-FILE-ERROR
> #xA026356>) 2415
> (44DE05C8) : 4 (FUNCALL #'#<(:INTERNAL
> (WEBLOCKS:HANDLE-CLIENT-REQUEST :AROUND (WEBLOCKS:WEBLOCKS-WEBAPP)))>
> #<CCL::SIMPLE-FILE-ERROR #xA026356>) 127
> (44DE05E4) : 5 (SIGNAL #<CCL::SIMPLE-FILE-ERROR #xA026356>) 1015
> (44DE060C) : 6 (%ERROR #<CCL::SIMPLE-FILE-ERROR #xA026356> NIL 288850312) 119
> (44DE0620) : 7 (%CREATE-FILE
> #P"c:/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/3472085114.tem"
> :IF-EXISTS NIL :CREATE-DIRECTORY T) 599
> (44DE0644) : 8 (GEN-FILE-NAME
> #P"c:/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0'.css.gz")
> 191
> (44DE0658) : 9 (MAKE-FILE-STREAM
> "/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0.css.gz"
> :OUTPUT (INTEGER 0 255) :SUPERSEDE :CREATE FILE-STREAM :DEFAULT
> :PRIVATE T) 999
> (44DE06A4) : 10 (OPEN
> "/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0.css.gz"
> :DIRECTION :OUTPUT :ELEMENT-TYPE (UNSIGNED-BYTE 8) :IF-EXISTS
> :SUPERSEDE :IF-DOES-NOT-EXIST :CREATE :EXTERNAL-FORMAT :DEFAULT :CLASS
> FILE-STREAM :SHARING :PRIVATE :BASIC T) 783
> (44DE0708) : 11 (GZIP-FILE
> #P"/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0.css"
> "/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0.css.gz"
> :IF-EXISTS :SUPERSEDE :IF-DOES-NOT-EXIST :CREATE :MINIMUM-LENGTH 300)
> 551
> (44DE0774) : 12 (CREATE-GZIPED-DEPENDENCY-FILE
> #P"/usr/local/asdf-install/site/weblocks-stable/pub/stylesheets/vzn/pagination'.0.css")
> 319
> (44DE07A8) : 13 (MAKE-LOCAL-DEPENDENCY :STYLESHEET "pagination"
> :DO-NOT-PROBE NIL :MEDIA NIL :WEBAPP #<WEBLOCKS-DEMO::WEBLOCKS-DEMO
> #x9F92976> :IMPORT-P NIL) 647
> (44DE07E4) : 14 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:DEPENDENCIES
> APPEND (WEBLOCKS:DATASEQ)>> #<GRIDEDIT WEBLOCKS-DEMO::EMPLOYEES-GRID>)
> 79
> (44DE07F0) : 15 (FUNCALL #'#<(:INTERNAL
> CCL::OPTIMIZED-SHORT-EFFECTIVE-METHOD)> #<GRIDEDIT
> WEBLOCKS-DEMO::EMPLOYEES-GRID>) 143
> (44DE0818) : 16 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD
> WEBLOCKS:DEPENDENCIES NIL> #<GRIDEDIT WEBLOCKS-DEMO::EMPLOYEES-GRID>))
> 919
> (44DE0860) : 17 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:DEPENDENCIES
> :AROUND (T)>> #<GRIDEDIT WEBLOCKS-DEMO::EMPLOYEES-GRID>) 55
> (44DE0870) : 18 (%%CALL-METHOD* #<STANDARD-METHOD
> WEBLOCKS:DEPENDENCIES :AROUND (T)> (#<STANDARD-METHOD
> WEBLOCKS:DEPENDENCIES NIL>) (#<GRIDEDIT
> WEBLOCKS-DEMO::EMPLOYEES-GRID>)) 591
> (44DE08A4) : 19 (FUNCALL #'#<(:INTERNAL
> CCL::OPTIMIZED-SHORT-EFFECTIVE-METHOD)> #<GRIDEDIT
> WEBLOCKS-DEMO::EMPLOYEES-GRID>) 111
> (44DE08BC) : 20 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:RENDER-WIDGET
> (T)>> #<GRIDEDIT WEBLOCKS-DEMO::EMPLOYEES-GRID>) 351
> (44DE08D8) : 21 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:RENDER-WIDGET-CHILDREN (WEBLOCKS:WIDGET)>> #<WIDGET "dom4">)
> 247
> (44DE08F8) : 22 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:WITH-WIDGET-HEADER (T T)>> #<WIDGET "dom4">
> #<Compiled-function (:INTERNAL #) (Non-Global)  #x9C85A1E>) 2111
> (44DE092C) : 23 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:RENDER-WIDGET
> (T)>> #<WIDGET "dom4">) 991
> (44DE0954) : 24 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:RENDER-WIDGET-CHILDREN (WEBLOCKS:NAVIGATION)>> #<NAVIGATION
> "Main Menu">) 943
> (44DE0980) : 25 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:WITH-WIDGET-HEADER (T T)>> #<NAVIGATION "Main Menu">
> #<Compiled-function (:INTERNAL #) (Non-Global)  #x9C85A1E>) 2111
> (44DE09B4) : 26 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:RENDER-WIDGET
> (T)>> #<NAVIGATION "Main Menu">) 991
> (44DE09DC) : 27 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:RENDER-WIDGET-CHILDREN (WEBLOCKS:WIDGET)>> #<WIDGET "dom1">)
> 247
> (44DE09FC) : 28 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:WITH-WIDGET-HEADER (T T)>> #<WIDGET "dom1">
> #<Compiled-function (:INTERNAL #) (Non-Global)  #x9C85A1E>) 2111
> (44DE0A30) : 29 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:RENDER-WIDGET
> (T)>> #<WIDGET "dom1">) 991
> (44DE0A58) : 30 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:RENDER-WIDGET-CHILDREN (WEBLOCKS:WIDGET)>> #<WIDGET "root">)
> 247
> (44DE0A78) : 31 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:WITH-WIDGET-HEADER (T T)>> #<WIDGET "root">
> #<Compiled-function (:INTERNAL #) (Non-Global)  #x9C85A1E>) 2111
> (44DE0AAC) : 32 (FUNCALL #'#<#<STANDARD-METHOD WEBLOCKS:RENDER-WIDGET
> (T)>> #<WIDGET "root">) 991
> (44DE0AD4) : 33 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS::HANDLE-NORMAL-REQUEST (WEBLOCKS:WEBLOCKS-WEBAPP)>>
> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO #x9F92976>) 2775
> (44DE0B04) : 34 (FUNCALL #'#<(:INTERNAL
> (WEBLOCKS:HANDLE-CLIENT-REQUEST (WEBLOCKS:WEBLOCKS-WEBAPP)))>) 991
> (44DE0B10) : 35 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST (WEBLOCKS:WEBLOCKS-WEBAPP)>>
> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO #x9F92976>) 4567
> (44DE0BAC) : 36 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST #> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO
> #x9F92976>)) 919
> (44DE0BF4) : 37 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST :AROUND (T)>>
> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO #x9F92976>) 1671
> (44DE0C4C) : 38 (%CALL-NEXT-METHOD ((NIL) #<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST #> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO
> #x9F92976>)) 919
> (44DE0C94) : 39 (CALL-IN-WEBAPP #<WEBLOCKS-DEMO::WEBLOCKS-DEMO
> #x9F92976> #<COMPILED-LEXICAL-CLOSURE (:INTERNAL #) #x9FEA20E>) 231
> (44DE0CC4) : 40 (FUNCALL #'#<#<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST :AROUND (WEBLOCKS:WEBLOCKS-WEBAPP)>>
> #<WEBLOCKS-DEMO::WEBLOCKS-DEMO #x9F92976>) 599
> (44DE0CEC) : 41 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST :AROUND #> #<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST :AROUND #> #<STANDARD-METHOD
> WEBLOCKS:HANDLE-CLIENT-REQUEST #>) 288850761) 703
> (44DE0D2C) : 42 (FUNCALL #'#<#<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-REQUEST (T)>> #<HUNCHENTOOT:REQUEST #x9FE952E>)
> 1295
> (44DE0D94) : 43 (FUNCALL #'#<#<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION (HUNCHENTOOT:ACCEPTOR T)>>
> #<WEBLOCKS-ACCEPTOR (host *, port 8080)> #<USOCKET:STREAM-USOCKET
> #x9FE919E>) 2359
> (44DE0E1C) : 44 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION #> . 288850896)) 1055
> (44DE0E64) : 45 (FUNCALL #'#<#<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION (WEBLOCKS:WEBLOCKS-ACCEPTOR T)>>
> #<WEBLOCKS-ACCEPTOR (host *, port 8080)> #<USOCKET:STREAM-USOCKET
> #x9FE919E>) 111
> (44DE0E88) : 46 (%CALL-NEXT-METHOD (NIL #<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION #> . 288850896)) 1055
> (44DE0ED0) : 47 (FUNCALL #'#<#<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION :AROUND (HUNCHENTOOT:ACCEPTOR T)>>
> #<WEBLOCKS-ACCEPTOR (host *, port 8080)> #<USOCKET:STREAM-USOCKET
> #x9FE919E>) 503
> (44DE0F08) : 48 (%%STANDARD-COMBINED-METHOD-DCODE (#<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION :AROUND #> #<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION #> #<STANDARD-METHOD
> HUNCHENTOOT:PROCESS-CONNECTION #>) 288850896) 703
> (44DE0F4C) : 49 (FUNCALL #'#<(:INTERNAL
> BORDEAUX-THREADS::BINDING-DEFAULT-SPECIALS)>) 783
> (44DE0F60) : 50 (RUN-PROCESS-INITIAL-FORM #<PROCESS Hunchentoot
> worker (client: 127.0.0.1:50103)(13) [Active] #x9FE8CDE>
> (#<COMPILED-LEXICAL-CLOSURE # #x9FE8B9E>)) 735
> (44DE0FA4) : 51 (FUNCALL #'#<(:INTERNAL
> (CCL::%PROCESS-PRESET-INTERNAL (PROCESS)))> #<PROCESS Hunchentoot
> worker (client: 127.0.0.1:50103)(13) [Active] #x9FE8CDE>
> (#<COMPILED-LEXICAL-CLOSURE # #x9FE8B9E>)) 335
> (44DE0FCC) : 52 (FUNCALL #'#<(:INTERNAL
> CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 279
>
> Any help would be appreciated.
>
> -John
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>


More information about the Openmcl-devel mailing list