[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Bad XML choking neon? [Was: Re: Mysterious MERGE error on commit operation with status 200]

From: David.Trombley <David.Trombley_at_noaa.gov>
Date: 2007-05-01 16:03:47 CEST

  Ah, progress with this issue...

  It appears as if when a post-commit hook fails (in this case it
segfaults), some produced error output is being inserted into an XML
document without having entities escaped properly, and this is causing
the strange behavior I mentioned earlier. With all neon debug mask bits
set, output contains:

Got 975 bytes.
Read block (975 bytes):
[<?xml version="1.0" encoding="utf-8"?>
<D:merge-response xmlns:D="DAV:" xmlns:S="svn:">
<D:updated-set>
<D:response>
<D:href>/usr/!svn/vcc/default</D:href>
<D:propstat><D:prop>
<D:resourcetype><D:baseline/></D:resourcetype>
<S:post-commit-err>'post-commit' hook failed with error output:
/usr/global/people/svn/svn_repositories/usr/hooks/post-commit: line 4:
32310 Segmentation fault python $1/hooks/post-commit.py $1 $2
>&/tmp/post-commit.last.log
</S:post-commit-err>
<D:version-name>27</D:version-name>
<D:creationdate>2007-05-01T13:49:47.523241Z</D:creationdate>
<D:creator-displayname>svn</D:creator-displayname>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
<D:response>
<D:href>/usr/svn/.NEWS/foo</D:href>
<D:propstat><D:prop>
<D:resourcetype/>
<D:checked-in><D:href>/usr/!svn/ver/27/svn/.NEWS/foo</D:href></D:checked-in>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:updated-set>
</D:merge-response>
]
...
XML: Parse error: XML parse error at line 9: not well-formed (invalid token)
...

There are actually a few issues here. First, the python bindings to
some of the svn.fs module functions are segfaulting, that shouldn't ever
happen in an ideal world. I'll try to track that down seperately
however, and this may be related to my using them incorrectly
(documentation on these is scant at best)

Second is the issue that the output from the hook scripts should have
HTML entities escaped properly if it is inserted into an XML document.
In this case the '&' in my stream redirect looks to the XML parser like
a non-terminated entity.

Third, when a commit is reported as failing, it should actually have
failed. In this case ne_request_dispatch() is returning NE_ERROR (1),
but the error message of "200 OK" and the commit actually happens
properly.

  Could a developer please let me know how to best proceed with some of
this (ie. give me a goahead to report one or more of these as bugs?)

  Since I now see that my python script is segfaulting, that would be my
workaround...

  -David

 (version 1.4.3 (r23084), ra_dav /w neon 0.25.5)

> I've seen two previous recent posts about this problem - the symptom
> is that a commit succeeds in the backend,
> however the client returns the following error:
>
> Transmitting file data .svn: Commit failed (details follow):
> svn: MERGE request failed on '/usr/svn/.NEWS'
> svn: MERGE of '/usr/svn/.NEWS': 200 OK (http:/[redacted])
>
> And then the local copy must be updated to reflect the new
> revision. I couldn't find any successful workaround here,
> it appears the repository gets into this state and this behavior
> continues reliably. I can't find any outstanding tracked issues
> that seem to relate to this.
>
> Has anybody else seen this? What diagnostics can I do to determine
> if this is a bug?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue May 1 16:04:11 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.