View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008903CMakeCTestpublic2009-04-18 07:272010-12-14 18:49
ReporterEric NOULARD 
Assigned ToZach Mullen 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in VersionCMake-2-8 
Summary0008903: CTest does not check if CDash submission is successful
DescriptionWhen submitting ctest result to a CDash public dashboard if the
[curl] submission fails then CTest does not tell you anything about it.

That's pretty nasty for nightly build because you have no log telling
you that your submissions are not working any more.
Additional Informationsee:
http://public.kitware.com/pipermail/cdash/2009-April/000428.html [^]
TagsNo tags attached.
Attached Filespatch file icon ctest-http1.0-httpError.patch [^] (484 bytes) 2009-04-20 04:04 [Show Content]

 Relationships
related to 0009262closedBill Hoffman FILE(DOWNLOAD ) creates file containing HTTP error 

  Notes
(0016052)
Bill Hoffman (manager)
2009-04-18 12:46

So, if there is an error getting to the server CTest will report a problem. However, in this case CTest posted something and the server accepted it without an error, but returned some html that explained the error. I guess this would have to be a change in both CDash and CTest, to get back some sort of expected output from CDash. I don't think CTest can just try to parse the html from the server and look for problems.
(0016069)
Eric NOULARD (developer)
2009-04-19 08:36

Yes you are right this is an HTML error.
However, in this case I think CDash is not involved.
The request shouldn't have reached the CDash server,
the proxy in between must have answered before that with
its own HTML ERROR.

I think CTest is using libcurl.
Using libcurl one should be able to make an HTTP ERROR CODE become
an actual error.
From http://curl.haxx.se/libcurl/c/libcurl-errors.html, [^]
one can read:
>>>>>>>>
CURLE_HTTP_RETURNED_ERROR (22)

This is returned if CURLOPT_FAILONERROR is set TRUE and the HTTP server returns an error code that is >= 400. (This error code was formerly known as CURLE_HTTP_NOT_FOUND.)
>>>>>>>>

thus if you setup curl to report HTML ERROR CODE as an error in CTest
you should be able to tell that the submission failed with an HTML ERROR.
(0016070)
Eric NOULARD (developer)
2009-04-19 08:53

Note that however that apparently the default behavior of curl
is to ignore HTTP ERROR, thus adding the CURLOPT_FAILONERROR
may trigger "errors" which were previously silently ignored.

If you add the feature "do not ignore HTML ERROR" to CTest
may be this shouldn't be the default CTest behavior
but it should be possible to enable it either with command line
switch or with

SET(CTEST_CHECK_HTTP_ERROR ON) or something similar?
(0016077)
Eric NOULARD (developer)
2009-04-20 03:43

Some follow-up.
My proxy was failing to send files because curl default to use
HTTP 1.1 request whereas my proxy is only relaying HTTP 1.0 request
in fact [lib]curl may be setup to use HTTP 1.0 instead of HTTP 1.1:

for the command line:
   curl -0 or curl --http1.0
for libcurl:
   curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0)
(0016078)
Eric NOULARD (developer)
2009-04-20 04:04

Here comes a patch against CMake-2-6 which

1) enforce HTTP 1.0 usage with curl when an HTTP proxy is used
2) enable curl HTTP ERROR reporting


1) makes ctest works for my HTTP 1.0 proxy
2) makes ctest fail if an HTTP error greater than 400 is received

like in:
Submit files (using http)
   Using HTTP submit method
   Drop site: http://www.cdash.org/CDashPublic/submit.php?project=CERTI [^]
   Upload file: /LOCAL/ERIC/CertiNightly/build/Testing/20090420-0801/Build.xml to http://www.cdash.org/CDashPublic/submit.php?project=CERTI&FileName=ErkAtONERA___Linux-i686-gcc-4.1.2___20090420-0801-Experimental___XML___Build.xml [^] Size: 953
   Error when uploading file: /LOCAL/ERIC/CertiNightly/build/Testing/20090420-0801/Build.xml
   Error message was: The requested URL returned error: 417
   Problems when submitting via HTTP
Errors while running CTest
(0018204)
Eric NOULARD (developer)
2009-10-23 09:42

Ping.
Is there a chance that the provided patch or a modified version of it
would be included in CMake/CTest 2.8 ?

The provided patch should:
   1) make the ignored HTTP error appear whereas it was silentely ignored before
   2) make usage of HTTP 1.0 protocol instead of HTTP 1.1 which
      should be harmless too.

Ideally 2) may be made optional with some ctest option (command line or script).
The patch is old but I may rebuild a new one against 2-8 after the 4th of november if it's not too late.
(0018814)
David Cole (manager)
2009-12-11 10:21

Some failed submissions to CDash from very large content in Test.xml files are caused by the settings on the CDash server for php and MySQL memory usage.

I suggest that after a failed submission (especially of large files) that we suggest in the error message from ctest that people raise their php.ini/memory_limit value and their MySQL/my.ini/[mysqld]/max_allowed_packet value on the CDash server.

Details (for dealing with 70M Test.xml files...):
===================================
Ok, this is a server configuration issue. I managed to have this parsed using CDash-Head. All tests show up after increasing the memory allocated for PHP and MySQL. Here's the configuration I used:

in php.ini:

 memory_limit = 500M ;

in mysql config: my.ini

[mysqld]
max_allowed_packet = 10M
(0018822)
Zach Mullen (developer)
2009-12-11 14:45
edited on: 2009-12-11 14:46

I've just added your patch into the current CMake HEAD, with the option "--http1.0" .

We are working on a robust solution for handling the large xml file errors on the CDash side and reporting it more elegantly in ctest.

(0018829)
Eric NOULARD (developer)
2009-12-11 16:55

Hi Zach,
Thank you for http1.0 it would be easier for my picky proxy.
Concerning the error on CDash server side,
reporting the error on CTest side is easy with the
curl HTTP ERROR reporting.

Then if the CDash server is using appropriate HTTP Error code
you may parse the HTTP Error message in order to forge
appropriate message, when you know that the HTTP error is
coming from a CDash server.

Client side error are in 4xx range
whereas server side are 5xx range:
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes [^]

I do not remember if some text is provided along with the error code.
If there is some CDash may transmit specific text with the error code.
(0018999)
Zach Mullen (developer)
2009-12-28 10:47

The response is now printed if it contains any errors or warnings, or if an error condition is detected by curl, as in the case of HTTP errors. This should give the user some insight as to why an upload is failing.
(0024051)
David Cole (manager)
2010-12-14 18:49

Closing bugs that have been resolved for more than 3 months without any further updates.

 Issue History
Date Modified Username Field Change
2009-04-18 07:27 Eric NOULARD New Issue
2009-04-18 12:44 Bill Hoffman Status new => assigned
2009-04-18 12:44 Bill Hoffman Assigned To => Bill Hoffman
2009-04-18 12:46 Bill Hoffman Note Added: 0016052
2009-04-19 08:36 Eric NOULARD Note Added: 0016069
2009-04-19 08:53 Eric NOULARD Note Added: 0016070
2009-04-20 03:43 Eric NOULARD Note Added: 0016077
2009-04-20 04:04 Eric NOULARD Note Added: 0016078
2009-04-20 04:04 Eric NOULARD File Added: ctest-http1.0-httpError.patch
2009-10-23 09:42 Eric NOULARD Note Added: 0018204
2009-12-11 10:00 Zach Mullen Assigned To Bill Hoffman => Zach Mullen
2009-12-11 10:21 David Cole Note Added: 0018814
2009-12-11 14:45 Zach Mullen Note Added: 0018822
2009-12-11 14:46 Zach Mullen Note Edited: 0018822
2009-12-11 16:55 Eric NOULARD Note Added: 0018829
2009-12-28 10:47 Zach Mullen Note Added: 0018999
2009-12-28 10:47 Zach Mullen Status assigned => resolved
2009-12-28 10:47 Zach Mullen Fixed in Version => CMake-2-8
2009-12-28 10:47 Zach Mullen Resolution open => fixed
2010-12-14 18:49 David Cole Note Added: 0024051
2010-12-14 18:49 David Cole Status resolved => closed
2011-02-03 18:51 David Cole Relationship added related to 0009262


Copyright © 2000 - 2018 MantisBT Team