-=| Alex Peshkoff, 20.09.2011 12:32:22 +0400 |=-
> This does look like firebird bug. When isc_dsql_fetch() API call is
> used, user has no access to message internals.
> What is the best way to reproduce this bug?

Now this is a tough question :)

In case you're willing to build/install IBPerl, I have attached 
a short Perl script that repeatedly selects from rdb$database, while 
using alarm().

If you want to rule IBPerl out, then a C program is needed that does 
the same, and with that my help can be limited (although if you say 
I can try diving there).

IBPerl sources are available via anonymous subversion checkout:

 svn co http:/svn.openfmi.net/ibperl/trunk ibperl && cd ibperl

Then follow the usual Perl module installation procedure:

 perl Makefile.PL   # may have trouble finding Firebird, but should
                    # give instructions
 make
 sudo make install  # will install in /usr/local

The attached script, to be run as "perl alarm.pl db.fdb" reproduces 
the problem here. It can be used as an example for writing a similar 
program in C, I guess :)

Thank you for the quick response!

-- dam
#!/usr/bin/perl

use warnings;
use strict;
use IBPerl;

$| = 1;     # flush STDOUT after each print

$ARGV[0] or die "Usage: alarm.pl <database>\n";

my $db = IBPerl::Connection->new(Path => $ARGV[0]);
my $tr = IBPerl::Transaction->new( Database => $db );
my $st = IBPerl::Statement->new( Database => $db, Transaction => $tr, SQL => 'SELECT 1 FROM rdb$database' );

my $counter = 0;

sub status {
    print "\r$counter";
}

$SIG{ALRM} = sub { status(); alarm(1) };
alarm(1);

while(1) {
    $st->execute();
    $st->fetch();
    $st->close();
    $counter++;
}

# code never reached
$tr->commit;
$db->disconnect;
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to