FAQ
Hi atom,
after applying the latest patch set (20), and update to rev
7ea16cd2859c,
encoding/xml fails with strange errors on darwin/amd64 (I suspect
linux/amd64
will also fail). Also note that ./all.bash passes on darwin/386 and
darwin/arm
on that revision.
the patch works quite well before that rev.
Do you have any ideas why?

https://codereview.appspot.com/6114046/

Search Discussions

  • 0xe2 0x9a 0x9b at Dec 23, 2012 at 8:08 pm

    On 2012/12/23 19:26:27, minux wrote:
    Hi atom,
    after applying the latest patch set (20), and update to rev
    7ea16cd2859c,
    encoding/xml fails with strange errors on darwin/amd64 (I suspect
    linux/amd64
    will also fail). Also note that ./all.bash passes on darwin/386 and
    darwin/arm
    on that revision.
    the patch works quite well before that rev.
    Do you have any ideas why?
    Hi. I am unable to reproduce the issue on linux/amd64, rev 87f67aadaed6.

    If it also fails with rev 87f67aadaed6 on your machine: Does the failure
    occur randomly, or every time you test encoding/xml?

    https://codereview.appspot.com/6114046/
  • Minux at Dec 25, 2012 at 7:17 am

    On Mon, Dec 24, 2012 at 4:08 AM, wrote:

    If it also fails with rev 87f67aadaed6 on your machine: Does the failure
    occur randomly, or every time you test encoding/xml?
    randomly but with a high probability of failure (all about the same
    test TestUnmarshalFeed).

    for example:
    --- FAIL: TestUnmarshalFeed (0.00 seconds)
    read_test.go:21: have xml.Feed{XMLName:xml.Name{Space:"
    http://www.w3.org/2005/Atom", Local:"feed"}, Title:"Code Review - My
    issues", Id:"http://codereview.appspot.com/",
    Link:[]xml.Link{xml.Link{Rel:"alternate", Href:"
    http://codereview.appspot.com/"}, xml.Link{Rel:"self", Href:"
    http://codereview.appspot.com/rss/mine/rsc"}},
    Updated:time.Time{sec:63390216958, nsec:0,
    loc:(*time.Location)(0xc2000f4180)}, Author:xml.Person{Name:"rietveld<>",
    URI:"", Email:"", InnerXML:"<name>rietveld&lt;&gt;</name>"},
    Entry:[]xml.Entry{xml.Entry{Title:"rietveld: an attempt at pubsubhubbub\n",
    Id:"urn:md5:134d9179c41f806be79b3a5f7877d19a",
    Link:[]xml.Link{xml.Link{Rel:"alternate", Href:"
    http://codereview.appspot.com/126085"}}, Updated:time.Time{sec:63390216958,
    nsec:0, loc:(*time.Location)(0xc2000f41e0)},
    Author:xml.Person{Name:"email-address-removed", URI:"", Email:"",
    InnerXML:"<name>email-address-removed</name>"},
    Summary:xml.Text{Type:"html", Body:"\n An attempt at adding pubsubhubbub
    support to Rietveld.\nhttp://
    code.google.com/p/pubsubhubbub\nhttp://code.google.com/p/rietveld/issues/detail?id=155\n\nTheserver
    side of the protocol is trivial:\n 1. add a &lt;link
    rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all\n feeds
    that will be pubsubhubbubbed.\n 2. every time one of those feeds changes,
    tell the hub\n with a simple POST request.\n\nI have tested this by
    adding debug prints to a local hub\nserver and checking that the server got
    the right publish\nrequests.\n\nI can&#39;t quite get the server to work,
    but I think the bug\nis not in my code. I think that the server expects to
    be\nable to grab the feed and see the feed&#39;s actual URL in\nthe link
    rel=&quot;self&quot;, but the default value for that drops\nthe :port from
    the URL, and I cannot for the life of me\nfigure out how to get the Atom
    generator deep inside\ndjango not to do that, or even where it is doing
    that,\nor even what code is running to generate the Atom feed.\n(I thought
    I knew but I added some assert False statements\nand it kept
    running!)\n\nIgnoring that particular problem, I would appreciate\nfeedback
    on the right way to get the two values at\nthe top of feeds.py marked
    NOTE(rsc).\n\n\n"}}, xml.Entry{Title:"rietveld: correct tab handling\n",
    Id:"urn:md5:0a2a4f19bb815101f0ba2904aed7c35a",
    Link:[]xml.Link{xml.Link{Rel:"\x00\x18\x0f\x00\xc2\x00\x00\x00\x01",
    Href:"\x00f\x0f\x00\xc2\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\
    x00w.appspot.com/124106"}}, Updated:time.Time{sec:63390207737, nsec:0,
    loc:(*time.Location)(0xc2000f4240)},
    Author:xml.Person{Name:"email-address-removed", URI:"", Email:"",
    InnerXML:"<name>email-address-removed</name>"},
    Summary:xml.Text{Type:"html", Body:"\n This fixes the buggy tab rendering
    that can be seen
    at\nhttp://codereview.appspot.com/116075/diff/1/2\n\nThefundamental
    problem was that the tab code was\nnot being told what column
    the text began in, so it\ndidn&#39;t know where to put the tab stops.
    Another problem\nwas that some of the code assumed that string
    byte\noffsets were the same as column offsets, which is only\ntrue if there
    are no tabs.\n\nIn the process of fixing this, I cleaned up the
    arguments\nto Fold and ExpandTabs and renamed them Break and\n_ExpandTabs
    so that I could be sure that I found all the\ncall sites. I also wanted to
    verify that ExpandTabs was\nnot being used from outside
    intra_region_diff.py.\n\n\n"}}}}
    want xml.Feed{XMLName:xml.Name{Space:"http://www.w3.org/2005/Atom",
    Local:"feed"}, Title:"Code Review - My issues", Id:"
    http://codereview.appspot.com/", Link:[]xml.Link{xml.Link{Rel:"alternate",
    Href:"http://codereview.appspot.com/"}, xml.Link{Rel:"self", Href:"
    http://codereview.appspot.com/rss/mine/rsc"}},
    Updated:time.Time{sec:63390216958, nsec:0,
    loc:(*time.Location)(0xc2000881e0)}, Author:xml.Person{Name:"rietveld<>",
    URI:"", Email:"", InnerXML:"<name>rietveld&lt;&gt;</name>"},
    Entry:[]xml.Entry{xml.Entry{Title:"rietveld: an attempt at pubsubhubbub\n",
    Id:"urn:md5:134d9179c41f806be79b3a5f7877d19a",
    Link:[]xml.Link{xml.Link{Rel:"alternate", Href:"
    http://codereview.appspot.com/126085"}}, Updated:time.Time{sec:63390216958,
    nsec:0, loc:(*time.Location)(0xc200088240)},
    Author:xml.Person{Name:"email-address-removed", URI:"", Email:"",
    InnerXML:"<name>email-address-removed</name>"},
    Summary:xml.Text{Type:"html", Body:"\n An attempt at adding pubsubhubbub
    support to Rietveld.\nhttp://
    code.google.com/p/pubsubhubbub\nhttp://code.google.com/p/rietveld/issues/detail?id=155\n\nTheserver
    side of the protocol is trivial:\n 1. add a &lt;link
    rel=&quot;hub&quot; href=&quot;hub-server&quot;&gt; tag to all\n feeds
    that will be pubsubhubbubbed.\n 2. every time one of those feeds changes,
    tell the hub\n with a simple POST request.\n\nI have tested this by
    adding debug prints to a local hub\nserver and checking that the server got
    the right publish\nrequests.\n\nI can&#39;t quite get the server to work,
    but I think the bug\nis not in my code. I think that the server expects to
    be\nable to grab the feed and see the feed&#39;s actual URL in\nthe link
    rel=&quot;self&quot;, but the default value for that drops\nthe :port from
    the URL, and I cannot for the life of me\nfigure out how to get the Atom
    generator deep inside\ndjango not to do that, or even where it is doing
    that,\nor even what code is running to generate the Atom feed.\n(I thought
    I knew but I added some assert False statements\nand it kept
    running!)\n\nIgnoring that particular problem, I would appreciate\nfeedback
    on the right way to get the two values at\nthe top of feeds.py marked
    NOTE(rsc).\n\n\n"}}, xml.Entry{Title:"rietveld: correct tab handling\n",
    Id:"urn:md5:0a2a4f19bb815101f0ba2904aed7c35a",
    Link:[]xml.Link{xml.Link{Rel:"alternate", Href:"
    http://codereview.appspot.com/124106"}}, Updated:time.Time{sec:63390207737,
    nsec:0, loc:(*time.Location)(0xc2000882a0)},
    Author:xml.Person{Name:"email-address-removed", URI:"", Email:"",
    InnerXML:"<name>email-address-removed</name>"},
    Summary:xml.Text{Type:"html", Body:"\n This fixes the buggy tab rendering
    that can be seen
    at\nhttp://codereview.appspot.com/116075/diff/1/2\n\nThefundamental
    problem was that the tab code was\nnot being told what column
    the text began in, so it\ndidn&#39;t know where to put the tab stops.
    Another problem\nwas that some of the code assumed that string
    byte\noffsets were the same as column offsets, which is only\ntrue if there
    are no tabs.\n\nIn the process of fixing this, I cleaned up the
    arguments\nto Fold and ExpandTabs and renamed them Break and\n_ExpandTabs
    so that I could be sure that I found all the\ncall sites. I also wanted to
    verify that ExpandTabs was\nnot being used from outside
    intra_region_diff.py.\n\n\n"}}}}
    FAIL
    FAIL encoding/xml 0.051s

    maybe you can upload a newer version of your patch here and I can verify if
    I've made any errors in merging.
  • 0xe2 0x9a 0x9b at Dec 25, 2012 at 8:14 am

    On 2012/12/25 07:17:16, minux wrote:
    On Mon, Dec 24, 2012 at 4:08 AM,
    wrote:
    If it also fails with rev 87f67aadaed6 on your machine: Does the
    failure
    occur randomly, or every time you test encoding/xml?
    randomly but with a high probability of failure (all about the same
    test TestUnmarshalFeed).
    for example:
    --- FAIL: TestUnmarshalFeed (0.00 seconds)
    read_test.go:21: have xml.Feed{XMLName:xml.Name{Space:"
    [cut]
    intra_region_diff.py.\n\n\n"}}}}
    FAIL
    FAIL encoding/xml 0.051s
    You are right, the test does fail. I am getting the same results when
    running from command line like this:

    while true; do ./xml.test; done
    maybe you can upload a newer version of your patch here and I can verify if
    I've made any errors in merging.

    https://codereview.appspot.com/6114046/
  • 0xe2 0x9a 0x9b at Dec 26, 2012 at 12:19 pm

    On 2012/12/23 19:26:27, minux wrote:
    Hi atom,
    after applying the latest patch set (20), and update to rev
    7ea16cd2859c,
    encoding/xml fails with strange errors on darwin/amd64 (I suspect
    linux/amd64
    will also fail). Also note that ./all.bash passes on darwin/386 and
    darwin/arm
    on that revision.
    the patch works quite well before that rev.
    Do you have any ideas why?
    The cause of the problem is in package "reflect":

    http://code.google.com/p/go/source/browse/src/pkg/reflect/value.go?r=2c8a88c1efce4e4d78d75b5229d27e4c04031ff7#1494
    http://code.google.com/p/go/source/browse/src/pkg/reflect/value.go?r=2c8a88c1efce4e4d78d75b5229d27e4c04031ff7#1902

    The garbage collector found the *[]byte and interpreted its contents as
    bytes instead of []xml.Link.

    Fix: https://codereview.appspot.com/7000059/

    https://codereview.appspot.com/6114046/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedDec 23, '12 at 7:26p
activeDec 26, '12 at 12:19p
posts5
users2
websitegolang.org

2 users in discussion

0xe2 0x9a 0x9b: 3 posts Minux: 2 posts

People

Translate

site design / logo © 2023 Grokbase