Title:
[ANeff] Bug for: imageRead("s3://bucket/image.png") hangs thread after 20th read and requires CF restart
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/Fixed
Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)
Created: 10/29/2015
Components: File Management, VFS-S3
Versions: 11.0
Failure Type:
Found In Build/Fixed In Build: CF11_Final / latest build
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win XP All
Vote Count: 0
When reading .png files using s3:// paths, imageRead() and <cfimage action="read"> hangs the thread after the 20th read. A CF restart is required before imageRead()/<cfimage action="read"> and directoryList() can be used again for S3.
Repro:
1) Specify accessKeyID and awsSecretKey, then run index.cfm (which creates 100 images to S3 and then tries to read them)
2) Run check.cfm and press F5 until the dump stops displaying additional rows
3) See only 20 rows were displayed (only 20 images were read) and see index.cfm does not stop running
4) See directoryList("s3://..") also became broken
5) Restart CF
6) Comment-out the imageRead() line and uncomment the fileReadBinary() line
7) Run check.cfm and press F5 until the dump stops displaying additional rows
8) See last row in dump says "read image 100 of 100" (good)
Application.cfc
---------------
component {
THIS.name = "imageReadPNGBreaksS3";
THIS.s3.accessKeyID = "the-access-key-ID";
THIS.s3.awsSecretKey = "the-secret-key";
}
index.cfm
---------
<cfscript>
SERVER.s3Foo=[];
directoryPath = "s3://mybucketimageread";//works for ram:// and system path but fails for s3:// after 20th imageRead()/<cfimage action="read"> (bug)
if(directoryExists(directoryPath)) {
directoryDelete(directoryPath, true);
}
directoryCreate(directoryPath);
for(i=1; i<=100; i++) {//create a bunch of images
imageWrite(imageNew("", 640, 640, "argb"), directoryPath & '/image' & i & '.png');//works for .jpg but fails after 20th imageRead()/<cfimage action="read" for rgb .png and argb .png (bug)
}
s3Paths = directoryList(directoryPath, true, "path");//directoryList("s3://..") also becomes broken after 20th s3:// image read
s3Paths.each(function(item, index, array) {
if(index > 35) {//start loop anywhere
//myImage = fileReadBinary(item);//works (as does <cffile action="readbinary"..>
myImage = imageRead(item);//fails (as does <cfimage action="read"..>
SERVER.s3Foo.append('read image ' & index & ' of ' & array.len());
}
});
</cfscript>
check.cfm
---------
<cfset writeDump(SERVER.keyExists("s3Foo")?SERVER.s3Foo:'')>
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 4081499
External Customer Info:
External Company:
External Customer Name: Aaron Neff
External Customer Email:
External Test Config: Confirmed in CF11 Update 5 (build 11,0,05,293506). However, the issue does not occur in build 11,0,0,296013 - but this issue should still be fixed for CF11.
Attachments:
Comments: