sporadic testsuite error

Reported by Andreas Metzler on 2011-03-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panotools
High
Unassigned

Bug Description

Hello,

there is a heisenbug hidden somewhere in the testsuite. Occassionally it fails to run:
=======================================================
perl ../panoAutomateTest.pl simple.txt
Processing 2 images
To perform all tests: tiff_m tiff_m_cropped tiff_m_uncropped

tiff_m => Output : TIFF_m
Removing old images: 2
output0000.tif -> tests/tiff_m0000.tif
output0001.tif -> tests/tiff_m0001.tif
Creating panorama.. please wait
PTmender Version 2.9.18 , originally written by Helmut Dersch, rewritten by Daniel German
Feathering is ignored. Use PTmasker
Feathering is ignored. Use PTmasker
Feathering is ignored. Use PTmasker
TIFFOpen: #/_PTStitcher_tmp_000003: Cannot open.

Converting Image 1 / 2 Filename 051221_6054_750.jpg
-------------------------------------------
Unable to create output file [ #/_PTStitcher_tmp_000003]
Could not open #/_PTStitcher_tmp_000003 for writing
=======================================================

I am getting the bug on the Debian autobuilder (e.g. 2.9.18rc2 failed on s390 and amd64) but I have also gotten it once on my production system. I do not know how to reproduce it though.

https://buildd.debian.org/build.php?&pkg=libpano13&arch=amd64
https://buildd.debian.org/build.php?&pkg=libpano13&arch=s390

This seems to be reproducible in a brute force way. Running tar xzf ; build; make check in a loop (with ccache, to speed things up) yields at least one failed build in 30. It looks like a race condition. find does not show any suspicious files and running make check on the same build-tree immediately afterwards succeeds.

I think I have found the reason: panoFileMakeTemp() is invoked with incorrect arguments twice.
panoFileMakeTemp() uses functions like strrchr, strlen and sprintf on its input. These fail horribly when the input is not a proper string.

-------------------
TIFFOpen: -äÿ/_PTStitcher_tmp_000003: Cannot open.
-------------------

* panoTiffCrop() invokes the function on an uninitialized variable.
* panoCreatePanorama() uses an incorrect memcpy to setup input for panoFileMakeTemp()

Patch attached, please doublecheck. I think fixing this bug should be part of 2.9.18.

Changed in panotools:
importance: Undecided → High
tmodes (tmodes) wrote :

Thanks for debugging. Committed to default branch.

Changed in panotools:
status: New → Fix Committed
tmodes (tmodes) on 2014-01-01
Changed in panotools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers