Skip to content

Default server leaves dangling locks on PATCH #367

Closed

Description

@RubenVerborgh

Below are the logs of the default server receiving a PATCH on any path.

$ npm start

> @solid/[email protected] start /Users/ruben/Documents/UGent/Solid/solid-community-server
> node ./bin/server.js -p 3000

2020-11-29T09:55:11.934Z [CliRunner] info: Running at http://localhost:3000/
2020-11-29T09:55:13.027Z [ExpressHttpServerFactory] info: Received request for /
2020-11-29T09:55:13.044Z [RepresentationConvertingStore] info: Convert http://localhost:3000/.acl from text/turtle to internal/quads;q=1
2020-11-29T09:55:13.047Z [WebAclAuthorizer] info: Reading ACL statements from http://localhost:3000/.acl
2020-11-29T09:55:13.053Z [RepresentationConvertingStore] info: Convert http://localhost:3000/ from internal/quads to text/turtle;q=1
2020-11-29T09:55:16.057Z [WrappedExpiringLock] warn: Lock expired after 3000ms

Since this went undetected, I have bumped the log level of lock expiry, which should be a rare event: 1d08f46

Activity

  1. added
    🐛 bug
    on Nov 29, 2020
  2. jvherweg commented on Nov 30, 2020

    @jvherweg
    Member

    Can you post the exact requests you used? Because I seem to be unable to reproduce this.

  3. RubenVerborgh commented on Nov 30, 2020

    @RubenVerborgh
    MemberAuthor
    curl 'http://localhost:3000/' -X PATCH -H 'Content-Type: application/sparql-update' --data-raw 'DELETE DATA { <urn:x> <urn:y> <urn:z>. }'
    
  4. removed their assignment
    on Nov 30, 2020
  5. jvherweg commented on Nov 30, 2020

    @jvherweg
    Member

    Ah yea, if there is an error in the patch handler (because the resource doesn't exist) it just throws the error. There should be a try/finally there.

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

    🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions