Skip to content

Server exception not caught is lock file is not writable #1397

Open

Description

@timbl
Mon, 27 Jan 2020 22:26:29 GMT solid:get GET -- Error: undefined EACCES: permission denied, mkdir '/Library/WebServer/Documents/profile/card$.ttl.lock'
(node:1964) UnhandledPromiseRejectionWarning: TypeError: releaseLock is not a function
    at Promise (/devel/github.com/solid/node-solid-server/lib/lock.js:25:13)
    at <anonymous>
(node:1964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 105274)
Mon, 27 Jan 2020 22:26:30 GMT solid:get GET -- Error: undefined EACCES: permission denied, mkdir '/Library/WebServer/Documents/timbl/Public/Archive/linkeddata/chat/2019/08/23/chat.ttl.lock'
(node:1964) UnhandledPromiseRejectionWarning: TypeError: releaseLock is not a function
    at Promise (/devel/github.com/solid/node-solid-server/lib/lock.js:25:13)
    at <anonymous>
(node:1964) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 105275)

Activity

  1. timbl commented on Jan 27, 2020

    @timbl
    ContributorAuthor

    When a file is read in an area where the lock file cannot be created, the server -- from the logs above -- seems to fail ungracefully. Tries to call the unlock function which is not in fact a function.

  2. timbl commented on Jan 27, 2020

    @timbl
    ContributorAuthor

    See also related #1372

  3. jaxoncreed commented on Jan 28, 2020

    @jaxoncreed
    Contributor

    Ah I see this is a bug.

    For future reference when I get back around to this issue, could you give more information on how I would create an "area where the lock file cannot be created"

  4. timbl commented on Jul 26, 2020

    @timbl
    ContributorAuthor

    Just use the unix file protection to make the directory unwritable by the user the server runs on (or for that matter by anyone).
    Also you can plug in a write-protected drive and link it into the solid file system.

  5. timbl commented on Jul 26, 2020

    @timbl
    ContributorAuthor

    Note there are three bugs

    • not reacting well when the lock file creation fails, and say leaving a dummy unlock function
    • the call to the unlock function which fails later as there isn't one
    • the fact that the latter isn't caught in some try-catch, and so it crashes the server
  6. timbl commented on Jul 26, 2020

    @timbl
    ContributorAuthor

    ((I was seeing this often as mashlib currently always guesses that there is a /profile/card file for the owner of the pod, and that for me is no a writable space. I have change that directory to be file-writable to the server, and so the server doesn't crash when you get profile/card now.)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions