Hello, we have an application that does a lot of cfexecutes. With OpenBD we're getting IOException: bad file descriptor from time to time. You can reproduce this issue reloading various times this simple page:
<cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> <cfexecute name="ls" arguments="-l" variable="foo" timeout="20" /> After researching a bit i've found that in src/com/naryx/tagfusion/cfm/tag/cfEXECUTECommandRunner.java you close stdout and stderr twice, first in the finally of StreamConsumer.run() and second in the finally of cfEXECUTECommandRunner.run(). Theorically the worst thing that should happen is that one of them will just fail, but seems to be a bug in sun's JVM that in some operating systems if you double close a file descriptor, and the close operation fails, in the second close it will close a valid file descriptor. You can find more information about this bug here: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6593729 We fixed it commenting the closes of cfEXECUTECommandRunner.run(). OS: FreeBSD 7.0 OpenBD version: Release as of 2008/09/17 JDK version: java version "1.6.0_07" Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02) Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode) Even if sun's bug report shouldn't affect this version, we're having problems with double close(). This is also failing on our Linux test system. I hope with this information you can fix the bug. More info about JDK's bug: http://256.com/gray/docs/misc/java_bad_file_descriptor_close_bug.shtml Regards. --~--~---------~--~----~------------~-------~--~----~ Open BlueDragon Public Mailing List http://groups.google.com/group/openbd?hl=en official blog @ http://blog.openbluedragon.org/ !! save a network - trim replies before posting !! -~----------~----~----~----~------~----~------~--~---
