Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Devel

spurious error being presented to users

 

 

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded


Olly.Stephens at arm

Jan 13, 2009, 8:13 AM

Post #1 of 5 (1319 views)
Permalink
spurious error being presented to users

On our production system, we are occasionally getting the following
error presented to users on the web page:

Can't use string ("RT::User") as a HASH ref while "strict refs" in use
at /opt/perl/lib/site_perl/5.8.8/DBIx/SearchBuilder/Record.pm line 389.

It appears to be sporadic, perhaps load related. It typically happens
when someone replies to a ticket (so in Ticket/Update.html) but not
always. I can't - of course - reproduce it in our dev/test environment.

Does anyone know

a) What might be causing it (I know what the error means from a Perl
POV, I just don't know why it is happening occasionally; perhaps it's
caused by an RT::User object that isn't being properly checked for
initialisation before being used?)
b) Why it's being dumped to the screen instead of the log (because of
this, I'm not sure how to catch it to get a stack trace)

Thanks in advance,

Olly
_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


jesse at bestpractical

Jan 13, 2009, 11:25 AM

Post #2 of 5 (1270 views)
Permalink
Re: spurious error being presented to users [In reply to]

On Tue, Jan 13, 2009 at 04:13:29PM -0000, Olly Stephens wrote:
> On our production system, we are occasionally getting the following
> error presented to users on the web page:

What version of RT are you folks running?

>
> Can't use string ("RT::User") as a HASH ref while "strict refs" in use
> at /opt/perl/lib/site_perl/5.8.8/DBIx/SearchBuilder/Record.pm line 389.
>
> It appears to be sporadic, perhaps load related. It typically happens
> when someone replies to a ticket (so in Ticket/Update.html) but not
> always. I can't - of course - reproduce it in our dev/test environment.
>
> Does anyone know
>
> a) What might be causing it (I know what the error means from a Perl
> POV, I just don't know why it is happening occasionally; perhaps it's
> caused by an RT::User object that isn't being properly checked for
> initialisation before being used?)
> b) Why it's being dumped to the screen instead of the log (because of
> this, I'm not sure how to catch it to get a stack trace)
>
> Thanks in advance,
>
> Olly
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>

--
_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


Olly.Stephens at arm

Jan 13, 2009, 11:49 AM

Post #3 of 5 (1260 views)
Permalink
Re: spurious error being presented to users [In reply to]

Jesse Vincent wrote:
>
> What version of RT are you folks running?

Sorry, should have said. 3.8.1

Not yet worked out if it's custom code or stock code that's producing
the error, because not yet worked out how to trap it...

Olly

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


jesse at bestpractical

Jan 13, 2009, 12:17 PM

Post #4 of 5 (1266 views)
Permalink
Re: spurious error being presented to users [In reply to]

On Tue 13.Jan'09 at 19:49:12 -0000, Olly Stephens wrote:
> Jesse Vincent wrote:
> >
> > What version of RT are you folks running?
>
> Sorry, should have said. 3.8.1
>
> Not yet worked out if it's custom code or stock code that's producing
> the error, because not yet worked out how to trap it...

It sounds like something is working with RT user objects without
RT::User having been loaded. This sounds like a big we fixed around
3.6.5, so that's clearly not it ;)
>
> Olly
>
>

--


Olly.Stephens at arm

Jan 14, 2009, 6:00 AM

Post #5 of 5 (1263 views)
Permalink
Re: spurious error being presented to users [In reply to]

Olly Stephens wrote:
>
> On our production system, we are occasionally getting the following
> error presented to users on the web page:
>
> Can't use string ("RT::User") as a HASH ref while "strict refs" in use
> at /opt/perl/lib/site_perl/5.8.8/DBIx/SearchBuilder/Record.pm line
389.


OK, I've tracked down one place where it's occurring and it's mea culpa.

In my custom override for RT::User::CanonicalizeEmailAddress I was
assuming that I was being called as an object method but in fact it's as
a class method. So $_[0] is the string 'RT::User' rather than a valid
object. I was using it to call other RT::User methods that expect a
valid object and this error was occurring when they were trying to test
fields.

I discovered this because the error occurred in a different place in my
development world and included a stack trace. So I'm not 100% convinced
it's the same instance but the only way to see is to push a fix out to
production and see if it stops the error from occurring.

Olly

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

Request Tracker devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.