Re: [CDBI] Bizarre problem,semi-reproducable
[prev]
[thread]
[next]
[Date index for 2006/01/18]
On Tue, Jan 17, 2006 at 06:12:41PM -0800, Dylan Vanderhoof wrote:
> Hello all,
> I'm not sure the best way to describe this issue, but I'll do what I can. I don't know if this is a problem with Class-DBI, or Catalyst, or something else, but I'm wondering if anybody has seen anything resembling this at all.
>
> The very short summary: I'm retrieving some values from a Class::DBI object (via a couple lookup tables as well), and pushing it in a string with some static text into two different arrays. This process is then repeated n number of times. On a later iteration, during one of the lookup instructions, the text in one of the already populated arrays is changed. (A couple characters are missing, specifically). Its more or less the same characters every time. (About 3 different places I've seen it, but its pretty consistant) It does not happen every time this is run, maybe 1 in 4 times. There are no errors, just missing text. Its not a thread issue or anything like that, as I've tried it with apache in single-thread mode and nothing else accessing the DB and it still shows this issue.
>
> Below is a debug log of what's happening:
>
> [Tue Jan 17 17:58:01 2006] [catalyst] [debug] Pre-dbi defs:
> DEF:ifOutDiscards=/srv/torrus/collector_snr/2/2/15.2.2.fakedomain.com_Fa9_17_if-mib.rrd:ifOutDiscards:AVERAGE
> [Tue Jan 17 17:58:01 2006] [catalyst] [debug] Post-dbi defs:
> DEF:ifOutDiscards=/srv/torrus/collector_snr/2/2/15.2.2.fakedomain.com_Fa9_17_if-mib.rrd:ifOutDiscards:AVERAGE
> [Tue Jan 17 17:58:01 2006] [catalyst] [debug] Post-path defs:
> DEF:ifOutDiscards=/srv/torrus/collector_snr/2/2.2.fakedomain.com_Fa9_17_if-mib.rrd:ifOutDiscards:AVERAGE
> [Tue Jan 17 17:58:01 2006] [catalyst] [debug] Pre-push defs:
> DEF:ifOutDiscards=/srv/torrus/collector_snr/2/2.2.fakedomain.com_Fa9_17_if-mib.rrd:ifOutDiscards:AVERAGE
>
> This is the second iteration through the loop. The data being called "defs" here is from the first iteration. You can see in what I'm calling the post-path line, the characters "2/15" were pulled from the string.
>
> Below is the code that's causing this, with debug messages.
>
> my @vnames;
> my @lines;
>
> foreach my $graph (@graphs)
> {
> # Spin through the graphs and put together the last few arguments for the RRDs::graph function
>
> $c->log->debug("Pre-dbi defs:\n@vnames");
>
> my $rra = NetResponse::Model::CDBI::Rras->retrieve( $graph ) || die "Unable to retrieve rra";
> $c->log->debug("Post-dbi defs:\n@vnames");
$DB::single = 1; # and load your app under the perl debugger
> my $rrd_path = $rra->rrd_path_id->rrd_path;
> $c->log->debug("Post-path defs:\n@vnames");
> my $rra_cf = $rra->cf;
> my $rra_name = $rra->rra_name_id->name;
>
> $c->log->debug("Pre-push defs:\n@vnames");
> push(@vnames,"DEF:$rra_name=$rrd_path:$rra_name:$rra_cf");
> push(@lines,"LINE1:$rra_name\#00FF00:$rra_name\\c");
> $c->log->debug("DEF:$rra_name=$rrd_path:$rra_name:$rra_cf");
> $c->log->debug("defs:\n@vnames");
> }
>
>
>
> You can see from the debugging that the change to the array is happening during the line "my $rrd_path = $rra->rrd_path_id->rrd_path;"
> $rra is an instance of NetResponse::Model::CDBI::Rras, which has a base class of NetResponse::Model::CDBI, which has a base class of Catalyst::Model::CDBI and uses Catalyst::Model::CDBI::Sweet.
>
> Has anybody seen anything like this before, or have even the slightest idea what might be going on? I have tried to troubleshoot this in every way I know how, but I am at a total loss, since during the line where the array is changed, the array should not even be being accessed.
>
> Thanks,
> Dylan
>
> _______________________________________________
> ClassDBI mailing list
> ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
> http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
|
Re: [CDBI] Bizarre problem,semi-reproducable
Matt S Trout 02:29 on 18 Jan 2006
|