sporadic testsuite error

Bug #734867 reported by Andreas Metzler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panotools
Fix Released
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

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

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.

Revision history for this message
Andreas Metzler (k-launchpad-downhill-at-eu-org) wrote :

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
Revision history for this message
tmodes (tmodes) wrote :

Thanks for debugging. Committed to default branch.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.