#979 new defect

AssertionError on DELETE when child links point to yourself

Reported by: zooko Owned by:
Priority: major Milestone: soon
Component: code-frontend-web Version: 1.6.0
Keywords: error delete cycle Cc:
Launchpad Bug:

Description

USSJoin accidentally made a directory with all of its child links pointing to itself:

[
 "dirnode",
 {
  "rw_uri": "URI:DIR2:qtotg7dsasgg367iigdmloryjy:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
  "verify_uri":
"URI:DIR2-Verifier:7adhej5azpcfstqm7hozdplqyy:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
  "ro_uri": "URI:DIR2-RO:gnc3ftwpfi2s63fmupirayl7b4:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
  "children": {
   "1": [
    "dirnode",
    {
     "mutable": true,
     "verify_uri":
"URI:DIR2-Verifier:7adhej5azpcfstqm7hozdplqyy:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
     "ro_uri": "URI:DIR2-RO:gnc3ftwpfi2s63fmupirayl7b4:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
     "rw_uri": "URI:DIR2:qtotg7dsasgg367iigdmloryjy:3iblclsl5vvuguthfgyu6r5r6fqz2eakolo5zf5dd4so7uwyqsua",
...

At some point he got an AssertionError, attached in HTML format.

Attachments (1)

error.html (6.9 KB) - added by zooko at 2010-03-04T07:24:24Z.

Download all attachments as: .zip

Change History (6)

Changed at 2010-03-04T07:24:24Z by zooko

comment:1 Changed at 2010-03-04T08:08:55Z by zooko

From the stack trace it looks like USSJoin was attempting to delete one of the child links when it goes this assertion failure.

comment:2 Changed at 2010-03-25T00:32:04Z by davidsarah

  • Component changed from code-dirnodes to code-frontend-web
  • Keywords error delete added
  • Milestone changed from undecided to 1.7.0
  • Summary changed from AssertionError when child links point to yourself to AssertionError on DELETE when child links point to yourself

Making such a directory isn't a problem in itself; this definitely looks like a bug in the webapi handling of DELETE.

comment:3 Changed at 2010-03-25T01:08:30Z by davidsarah

The assertion that failed is assert self.parentnode and self.name in DirectoryNodeHandler's render_DELETE method, i.e. either self.parentnode or self.name is falsy. Those fields are only set in the constructor, which is only called from make_handler_for, so we're looking for a call to make_handler_for with a missing or falsy parentnode or name argument. But there are quite a few calls to that, and the necessary context isn't on the reported stack trace.

I can see how you might get this error by trying to DELETE .../uri/URI:..., I think -- are we sure that USSJoin didn't attempt to do that?

The testgrid is down atm; I'll try some tests of this when it comes back up.

comment:4 Changed at 2010-06-19T01:33:50Z by zooko

  • Milestone changed from 1.7.0 to soon

comment:5 Changed at 2010-06-21T03:06:51Z by davidsarah

  • Keywords cycle added
Note: See TracTickets for help on using tickets.