Gulden,
I am sure that, it's not generating STDERR (very few may be), I have already tried redirecting STDERR as per the bug report. About, the query ... query takes almost 7 minutes to complete in sql console. I am sure that, due to this long running query only it's getting expired.
Thanks