stuck when processing batch of images; never completes

Bugs & Suggestions
Post Reply
kd5bwt
Posts: 4
Joined: Sat Sep 20, 2014 12:57 pm
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel I7-2600k not overclocked
ram: 16GB
Video Card: GeForce GTX 460 SE
Hard_Drive_Capacity: plenty
Monitor/Display Make & Model: HP ZR24w

stuck when processing batch of images; never completes

Post by kd5bwt »

I've been struggling for a while with a problem with AfterShotPro2X64 and am about to give up in frustration. Basically, I can't reliably batch process images -- after some (semi-correlated but not entirely reliable) number of images have been processed, no further work is done, and the program consumes CPU at a high rate. UI is still responsive and quitting still (eventually) works without killing app, but it is clearly stuck on processing. I can add additional items to the batch, but they are just at the end of a FIFO that never consumes any more items.

Any thoughts?

Things I have tried:
* searching the forum
* upgrading nvidia driver to latest
* downgrading nvidia driver to 304
* setting all "performance" options to 1 (and restarting the application afterwards)
* using the default "performance" options
* using OpenCL (crashes / makes corrupted output images)
* not using OpenCL
* manually pinning the task to a single core (to minimize chance of deadlocks)
* running the task in a debugger
* looking at the logfile (nothing interesting, just adding items to batch, and processing raw file...)


Application vers.: 2.0.3.25
Product Name: AfterShot Pro 2 Registered
Built on: Tue Jul 15 2014
Platform: Linux
Language: en
App Path: /opt/AfterShotPro2(64-bit)/bin/AfterShotPro
System Home: /opt/AfterShotPro2(64-bit)/supportfiles
User Home: /home/user/.AfterShotPro
Prefs Home: /home/user/.config/Corel/AfterShot Pro.conf
Processors: 8
CPU Threads: 1
I/O Threads: 1
B. In-flight: 1
RAM: 16029 MB
SIMD Version: SSE2
Build Mode: Release
Issue: Ubuntu 14.04.1 LTS \n \l
Kernel: Linux version 3.13.0-36-generic (buildd@toyol) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014


Script to gather thread backtraces from running app:
sudo gdb --pid=$(pgrep After) -x dump_backtraces.gdb -batch > $(date +%s).gdb.txt

dump_backtraces.gdb contains:
set pagination off
#set logging file backtraces.txt
#set logging on

thread apply all backtrace
bt


So, if I get the program stuck in this state where it isn't doing anything, here is an example of the only thread that has any meaningful difference -- it's clearly not a classic thread deadlock, but something is stuck. (Each trace is of the same thread in the same running context, gathered a few seconds apart while the program is stuck.)

Thread 4 (Thread 0x7f94abfff700 (LWP 18751)):
#0 0x0000000000d08573 in void Labby::matrixRgbToRgbPlanar16SIMD<1, 1>(BImage*, FMatrixType const&, unsigned short const*, unsigned short const*, int, int, int, int) ()
#1 0x0000000000b1fe1c in BibbleIccTransform::Apply(BImage*, bool volatile&, int, int, bool, int) ()
#2 0x00000000006fd82c in CameraRgbToWsFilter::runLegacy(ProcessingSettings const&, PipeSettings const&, StackTile&, QSharedPointer<ICCProfile>) ()
#3 0x00000000006fe807 in CameraRgbToWsFilter::run(ProcessingSettings const&, PipeSettings const&, StackTile&) ()
#4 0x0000000000755fad in StackTile::run() ()
#5 0x000000000084c398 in TMThread::run() ()
#6 0x00007f9520f43c46 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#7 0x00007f9520ca6182 in start_thread (arg=0x7f94abfff700) at pthread_create.c:312
#8 0x00007f95201b2fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f94abfff700 (LWP 18751)):
#0 0x0000000000a7bc35 in BImage::copy(BImage*) ()
#1 0x0000000000737ce0 in MipFilter::run(ProcessingSettings const&, PipeSettings const&, StackTile&) ()
#2 0x0000000000755fad in StackTile::run() ()
#3 0x000000000084c398 in TMThread::run() ()
#4 0x00007f9520f43c46 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#5 0x00007f9520ca6182 in start_thread (arg=0x7f94abfff700) at pthread_create.c:312
#6 0x00007f95201b2fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f94abfff700 (LWP 18751)):
#0 0x00007f952013ba58 in __GI___libc_realloc (oldmem=0x7f94a55a1460, bytes=352) at malloc.c:3031
#1 0x00007f95215ca431 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtGui.so.4
#2 0x00007f9521711772 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtGui.so.4
#3 0x00007f9521711f27 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtGui.so.4
#4 0x00007f95217146a0 in QRegion::QRegion(QRect const&, QRegion::RegionType) () from /opt/AfterShotPro2(64-bit)/lib/libQtGui.so.4
#5 0x00007f9521714ad6 in QRegion::QRegion(int, int, int, int, QRegion::RegionType) () from /opt/AfterShotPro2(64-bit)/lib/libQtGui.so.4
#6 0x00000000007f81a8 in CircularSettingsRegion::alphaInTile(StackTile&, SettingsLayer*, PipeSettings const&) ()
#7 0x000000000071258d in HealingRenderer::run() ()
#8 0x000000000084c398 in TMThread::run() ()
#9 0x00007f9520f43c46 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#10 0x00007f9520ca6182 in start_thread (arg=0x7f94abfff700) at pthread_create.c:312
#11 0x00007f95201b2fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f94abfff700 (LWP 18751)):
#0 0x00000000004efb04 in HealTileAsset::copyToBuf(T2DBuffer<unsigned short, 2, 2, 2, 2, 16u>&, QMap<QPair<int, int>, AssetPtr<HealTileAsset> >&, int, int, int, int, QSize&, int) ()
#1 0x00000000004f0b3f in HealTileAsset::runIteration() ()
#2 0x00000000004f27d0 in HealTileAsset::run() ()
#3 0x000000000084c398 in TMThread::run() ()
#4 0x00007f9520f43c46 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#5 0x00007f9520ca6182 in start_thread (arg=0x7f94abfff700) at pthread_create.c:312
#6 0x00007f95201b2fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111

Thread 4 (Thread 0x7f94abfff700 (LWP 18751)):
#0 0x00007f9520f3ded1 in QMutex::unlock() () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#1 0x0000000000710bd0 in HealingRenderer::run() ()
#2 0x000000000084c398 in TMThread::run() ()
#3 0x00007f9520f43c46 in ?? () from /opt/AfterShotPro2(64-bit)/lib/libQtCore.so.4
#4 0x00007f9520ca6182 in start_thread (arg=0x7f94abfff700) at pthread_create.c:312
#5 0x00007f95201b2fbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


Details of batch job:
[batch]
dstdir=..
dstdirflatten=false
dstdirmode=relative
filterstring=All files
forcemip=2
hotkey=Shift+D
ignorecrop=false
name-de=diff.net
name-en=diff.net
name-fr=diff.net
name-it=diff.net
name-ja=diff.net
name-nl=diff.net
preservecrop=true
preserverotation=true
promptonce=false
settingsfile=
settingsmode=current
srcdir=
srcdirmode=ask
srcdirrecursive=false

[output1]
allowoverwrite=true
askForJob=false
dontenlarge=true
dpi=150
enabled=true
externalviewer=
externalviewerArgs=%1
fileformat=jpeg
height1=3000
m_embedCopyright=true
m_embedExif=true
m_embedIPTC=true
m_embedProfile=true
m_embedXMP=true
m_outputSharpOn=false
mipQuality=0
newscalemode=2
openexternal=false
outputProfileName=sRGB
outputProfilePath=srgb.icm
outputSharpRad=0.8
outputSharpThresh=0
outputSharpenAmt=100
presets=\0
quality=94
rename=[vname][ext]
saveprofile=true
scalemode=reduce
subdir=
type=file
width1=3000

[output2]
allowoverwrite=true
askForJob=false
dontenlarge=false
dpi=300
enabled=true
externalviewer=
externalviewerArgs=%1
fileformat=jpeg
height1=230
m_embedCopyright=false
m_embedExif=true
m_embedIPTC=true
m_embedProfile=true
m_embedXMP=false
m_outputSharpOn=true
mipQuality=0
newscalemode=2
openexternal=false
outputProfileName=sRGB
outputProfilePath=srgb.icm
outputSharpRad=0.8
outputSharpThresh=0
outputSharpenAmt=53
presets=\0
quality=90
rename=[vname]_thm[ext]
saveprofile=true
scalemode=reduce
subdir=HTML
type=file
width1=230

[output3]
allowoverwrite=true
askForJob=false
dontenlarge=false
dpi=300
enabled=true
externalviewer=
externalviewerArgs=%1
fileformat=jpeg
height1=900
m_embedCopyright=false
m_embedExif=true
m_embedIPTC=true
m_embedProfile=true
m_embedXMP=false
m_outputSharpOn=true
mipQuality=0
newscalemode=2
openexternal=false
outputProfileName=sRGB
outputProfilePath=srgb.icm
outputSharpRad=0.8
outputSharpThresh=0
outputSharpenAmt=100
presets=\0
quality=90
rename=[vname]_std[ext]
saveprofile=true
scalemode=reduce
subdir=HTML
type=file
width1=900
Tadjio
Posts: 1202
Joined: Fri Mar 28, 2008 3:23 pm
operating_system: Windows 8 Pro
System_Drive: C
32bit or 64bit: 64 Bit
motherboard: Gigabyte
processor: Core i7 2.8GHz 860
ram: 8GB
Video Card: ATI HD5570
sound_card: Sound
Hard_Drive_Capacity: 2.5TB
Location: UK

Re: stuck when processing batch of images; never completes

Post by Tadjio »

I found Preferences / Performances / Batches in Flight / Images to process at once for batch operations SET to ONE
solved this problem for me (and not using OpenCL).
Tadjio
PSP X7.2 Ultimate user
AfterShot Pro 2.1 ASPirant
Windows 8.1 64-bit Pro
Canon EOS 100D, Olympus E-PM1 & iPhone 6
kd5bwt
Posts: 4
Joined: Sat Sep 20, 2014 12:57 pm
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel I7-2600k not overclocked
ram: 16GB
Video Card: GeForce GTX 460 SE
Hard_Drive_Capacity: plenty
Monitor/Display Make & Model: HP ZR24w

Re: stuck when processing batch of images; never completes

Post by kd5bwt »

Thanks, but I have tried (and am currently using) the 1 batch items in flight setting. That said, your post got me thinking, and I tried another experiment, splitting out my batch processing from a single batch with three outputs to three separate batches with a single output each, on the chance that this triple-output batch was somehow messing up the batch processing in flight settings. However, I experienced the same problem.

I've gathered together an image and the associated XMP settings and batch file which are necessary to reproduce this bug.

Also, please note that the image is totally not worth loading unless you're going to try to reproduce this bug, it's just a bad photo in to the light of a train coming over a bridge :)

http://test.diff.net/3private/asp64_linux_bug_report/

-Peter
afx
Posts: 1675
Joined: Thu Jan 12, 2012 1:38 pm
operating_system: Linux
System_Drive: N/A
32bit or 64bit: 64 Bit
Video Card: FirePro 4900
Monitor/Display Make & Model: NEC PA301w, ColorMunki
Location: München
Contact:

Re: stuck when processing batch of images; never completes

Post by afx »

Perfectly reproducible with the current 32bit beta on Linux and Windows.
I've sent Josepha pointer.

cheers
afx
Send bugs to the Monkey // AfterShot Kickstart Guide // sRGB clipping sucks and Adobe RGB is just as bad
Bibble since 2005 // W7 64 on quad Phenom // Ubuntu 14.4 on quad i7 and dualcore AMD // Images
kd5bwt
Posts: 4
Joined: Sat Sep 20, 2014 12:57 pm
operating_system: Linux
System_Drive: C
32bit or 64bit: 64 Bit
processor: Intel I7-2600k not overclocked
ram: 16GB
Video Card: GeForce GTX 460 SE
Hard_Drive_Capacity: plenty
Monitor/Display Make & Model: HP ZR24w

Re: stuck when processing batch of images; never completes

Post by kd5bwt »

For what it's worth, this bug appears to be unfixed in 2.1.0.40 x64.

-Peter
Post Reply