MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001401Orfeo Toolbox (OTB)Generalpublic2017-05-16 15:302017-09-27 16:40
Reporterrashadkm 
Assigned Togpasero 
PriorityurgentSeveritymajorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Summary0001401: ktrace reports too many file open for any otbapplication
Descriptionotb image classifier application

"/home/rashad/projects/otb/build/bin/otbApplicationLauncherCommandLine" "ImageClassifier" "/home/rashad/projects/otb/build/lib/otb/applications" "-in" "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif" "-imstat" "/home/rashad/data/otb-data/Input/Classification/clImageStatisticsQB1.xml" "-model" "/home/rashad/data/otb-data/Input/Classification/clsvmModelQB1.svm" "-out" "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"

I run ktrace on this application and output is interesting to look

I did a grep for NAMI: grep grep NAMI imageclassifier.log > imageclassifier_ktrace_nami. see attached output

Total 2864 file opens!!. For running an application that takes one input image, one output file, one xml and one model file.

Loading all those .so files make sense because they are needed. But why it opens all those files in otb-data?

anyway seems something to be looked at.
Steps To Reproducerun the above application with ktrace.

Additional Informationobsd amd64.

The bug report only show for otbimageclassifer application but it seems same for any otb application.

If you need more information, let me know
TagsNo tags attached.
Attached Files? file icon imageclassifier_ktrace_nami [^] (246,020 bytes) 2017-05-16 15:30 [Show Content]

- Relationships

-  Notes
(0004164)
rashadkm (developer)
2017-05-16 15:31

total size of imageclassifier.log is 996M
(0004165)
rashadkm (developer)
2017-05-16 15:43

btw, I don't have OTB_LARGEINPUT_ROOT set. so that doesn't goes to largeinput data. I could enable it and re-run. But i don't want to..
(0004305)
gpasero (administrator)
2017-09-18 17:26

Found the root of this issue : ossimTerraSarModel.cpp:2420

This can be analysed on Linux with the following steps:
* run : gdb --args bin/otbApplicationLauncherCommandLine ReadImageInfo lib/otb/applications -in my_image.tif
* setup a break on system call 'stat' : catch syscall 4
* setup a break in otbImageFileReader.txx:254
* disable breakpoint 1
* run
* after you reach the GenerateOutputInformation() in the reader, enable breakpoint 1
* you will find several legitimate calls to 'stat', then there will be calls that look in the parent folder. Here, show the backtrace.

I will seek an alternative for this XML file search.
(0004307)
gpasero (administrator)
2017-09-19 11:29

Fixed in develop :
https://git.orfeo-toolbox.org/otb.git/commit/80639983d887a83069956ae7bca2c347ccff006d [^]
(0004308)
grizonnetm (administrator)
2017-09-19 11:33

Nice catch Guillaume! Thanks a lot.
(0004333)
rashadkm (developer)
2017-09-25 15:34

below is the updated output!

opening "all" files have been fixed.

57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/lib"
 57149 otbApplicationLa NAMI "/home/rashad/local/lib"
 57149 otbApplicationLa NAMI "/home/rashad/local/lib/libmuparser.so.2"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/lib"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/lib/libOTBFuzzy-6.3.so"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/lib"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/lib/libOTBStatistics-6.3.so"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/local/lib/gdalplugins/2.2"
 57149 otbApplicationLa NAMI "/home/rashad/local/lib/gdalplugins"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif.ovr"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif.OVR"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.aux"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.AUX"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif.aux"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif.AUX"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/gcs.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/gcs.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/gcs.override.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/gcs.override.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/pcs.override.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/pcs.override.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/pcs.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/pcs.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/ellipsoid.csv"
 57149 otbApplicationLa NAMI "/home/rashad/local/share/gdal/ellipsoid.csv"
 57149 otbApplicationLa NAMI "/home"
 57149 otbApplicationLa NAMI "/home/rashad"
 57149 otbApplicationLa NAMI "/home/rashad/data"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/product.xml"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/PHRDIMAP.XML"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.TIL"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.til"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.omd"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho_e0.omd"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.ovr"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho_e0.ovr"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif.ovr"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho_vertices.kwl"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.tif"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/QB_2_ortho.geom"
 57149 otbApplicationLa NAMI "/etc/localtime"
 57149 otbApplicationLa NAMI "/usr/share/zoneinfo/posixrules"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/clsvmModelQB1.svm"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/clsvmModelQB1.svm"
 57149 otbApplicationLa NAMI "/home/rashad/data/otb-data/Input/Classification/clImageStatisticsQB1.xml"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif.xml"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.tif"
 57149 otbApplicationLa NAMI "/home/rashad/projects/otb/build/Testing/Temporary/clLabeledImageQB2.geom"

- Issue History
Date Modified Username Field Change
2017-05-16 15:30 rashadkm New Issue
2017-05-16 15:30 rashadkm File Added: imageclassifier_ktrace_nami
2017-05-16 15:31 rashadkm Note Added: 0004164
2017-05-16 15:43 rashadkm Note Added: 0004165
2017-05-16 16:06 rashadkm Description Updated View Revisions
2017-09-18 17:26 gpasero Assigned To => gpasero
2017-09-18 17:26 gpasero Status new => assigned
2017-09-18 17:26 gpasero Note Added: 0004305
2017-09-19 11:29 gpasero Note Added: 0004307
2017-09-19 11:29 gpasero Status assigned => resolved
2017-09-19 11:29 gpasero Resolution open => fixed
2017-09-19 11:33 grizonnetm Note Added: 0004308
2017-09-25 15:34 rashadkm Note Added: 0004333
2017-09-25 15:34 rashadkm Status resolved => feedback
2017-09-25 15:34 rashadkm Resolution fixed => reopened
2017-09-27 16:40 rashadkm Status feedback => closed
2017-09-27 16:40 rashadkm Resolution reopened => fixed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker