Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#6306 closed defect (fixed)

Random (unfrequent) failure on perl tests on Ubuntu Trusty

Reported by: Even Rouault Owned by: Ari Jolma
Priority: normal Milestone:
Component: PerlBindings Version: unspecified
Severity: normal Keywords:
Cc:

Description

Since I've added a Trusty target to our Travis-CI targets, I've noticed that the Perl tests fail from time to time (perhaps 5% of the builds ?), and specifically on that platform (Precise is fine)

Here's an example of such a failure : https://api.travis-ci.org/jobs/102071765/log.txt?deansi=true

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.t ......... ok
t/01.t ......... ok
t/02.t ......... ok
t/03.t ......... All 10 subtests passed 
t/alg.t ........ ok
t/callback.t ... ok
t/error.t ...... ok
t/gcp.t ........ ok
t/gdal.t ....... ok
t/nodata.t ..... ok
t/ogr.t ........ ok
t/open.t ....... ok
t/osr.t ........ ok
t/parenting.t .. ok
t/utf8.t ....... ok
t/util.t ....... ok

Test Summary Report
-------------------
t/03.t       (Wstat: 139 Tests: 10 Failed: 0)
  Non-zero wait status: 139
  Parse errors: No plan found in TAP output
Files=16, Tests=1674,  7 wallclock secs ( 0.23 usr  0.02 sys +  2.16 cusr  0.20 csys =  2.61 CPU)
Result: FAIL
Failed 1/16 test programs. 0/1674 subtests failed.
make[1]: *** [test_dynamic] Error 255
make[1]: Leaving directory `/home/travis/build/rouault/gdal_coverage/gdal/swig/perl'
make: *** [test] Error 2

whereas correct runs (e.g https://api.travis-ci.org/jobs/102065636/log.txt?deansi=true) output :

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00.t ......... ok
t/01.t ......... ok
t/02.t ......... ok
t/03.t ......... ok
t/alg.t ........ ok
t/callback.t ... ok
t/error.t ...... ok
t/gcp.t ........ ok
t/gdal.t ....... ok
t/nodata.t ..... ok
t/ogr.t ........ ok
t/open.t ....... ok
t/osr.t ........ ok
t/parenting.t .. ok
t/utf8.t ....... ok
t/util.t ....... ok
All tests successful.
Files=16, Tests=1713,  2 wallclock secs ( 0.26 usr  0.01 sys +  2.36 cusr  0.28 csys =  2.91 CPU)
Result: PASS

I've a Trusty system and ran

PERL_DL_NONLAZY=1 valgrind --trace-children=yes /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t"

but it didn't emit any warning/error (other than memory leaks, but that's a different issue)

Change History (3)

comment:1 Changed 6 years ago by Ari Jolma

Well. The test 03.t is composed in a way which adds randomness to it (not very good). Basically the test, which causes the core dump is

"set the colorinterpretation of the band of a one band geotiff to 'RedBand?'"

this leads to core dump in geotiff.cpp:4288 since there is no rasterband 2.

comment:2 Changed 6 years ago by Ari Jolma

Resolution: fixed
Status: newclosed

Fixed in r32965 for the test case but perhaps the possibility for a core dump in geotiff.cpp should also be fixed.

comment:3 Changed 6 years ago by Even Rouault

Thanks for the analysis Ari. Was indeed a recent regression of the GTiff driver (not sure why randomness favored the Trusty target)

Fixed with r32966 "GTiff: avoid crash when setting GCI_RedBand color interpretation on a single-band dataset (trunk only, fixes #6306, follow up to #6272 changes)"

Note: See TracTickets for help on using tickets.