Editing lifecycles completely breaks RT

Using RT 6.0.2, I’ve been trying to edit the default lifecycle using the web interface. Several times now as soon as I save I start getting the error below and end up unable to load any pages in RT. Every page shows the below error for all users who try to access the site.

The only way I’ve been able to use RT again is to go into the database and run the SQL statement:

delete from Configurations where name = 'Lifecycles';

Then restart apache. That resets all lifecycles back to defaults and at least gets me back in.

I’ve then gone in and made the exact same changes I tried in the first place, and it works without any issue. I haven’t been able to figure out what makes it happen some times and not others.

Any ideas?

System error

error: Can’t use string (“ARRAY(0x64c9378e5548)”) as an ARRAY ref while “strict refs” in use at /opt/rt6/sbin/../lib/RT/Lifecycle.pm line 1132.
context:
undefined ----
code stack: /opt/rt6/sbin/../lib/RT/Lifecycle.pm:1132
/opt/rt6/sbin/../lib/RT/Lifecycle.pm:671
/opt/rt6/sbin/../lib/RT/System.pm:281
/opt/rt6/sbin/../lib/RT/Interface/Web.pm:382
/opt/rt6/share/html/autohandler:53
undefined ----

raw error

Can't use string ("ARRAY(0x64c9378e5548)") as an ARRAY ref while "strict refs" in use at /opt/rt6/sbin/../lib/RT/Lifecycle.pm line 1132.


Trace begun at /usr/local/share/perl/5.38.2/HTML/Mason/Exceptions.pm line 125
HTML::Mason::Exceptions::rethrow_exception('Can\'t use string ("ARRAY(0x64c9378e5548)") as an ARRAY ref while "strict refs" in use at /opt/rt6/sbin/../lib/RT/Lifecycle.pm line 1132.^J') called at /opt/rt6/sbin/../lib/RT/Lifecycle.pm line 1132
RT::Lifecycle::ValidateLifecycle('RT::Lifecycle', 'Lifecycle', 'HASH(0x64c93c126510)', 'Name', 'assets') called at /opt/rt6/sbin/../lib/RT/Lifecycle.pm line 671
RT::Lifecycle::FillCache('RT::Lifecycle') called at /opt/rt6/sbin/../lib/RT/System.pm line 281
RT::System::MaybeRebuildLifecycleCache('RT::System=HASH(0x64c936cfe070)') called at /opt/rt6/sbin/../lib/RT/Interface/Web.pm line 382
RT::Interface::Web::HandleRequest('HASH(0x64c93f8e9dd0)') called at /opt/rt6/share/html/autohandler line 53
HTML::Mason::Commands::__ANON__('Name', 'default', 'Type', 'ticket') called at /usr/local/share/perl/5.38.2/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x64c93f230b18)', 'Name', 'default', 'Type', 'ticket') called at /usr/local/share/perl/5.38.2/HTML/Mason/Request.pm line 1300
eval {...} at /usr/local/share/perl/5.38.2/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'Name', 'default', 'Type', 'ticket') called at /usr/local/share/perl/5.38.2/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/share/perl/5.38.2/HTML/Mason/Request.pm line 481
eval {...} at /usr/local/share/perl/5.38.2/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('RT::Interface::Web::Request=HASH(0x64c93fbd1fd8)') called at /usr/local/share/perl/5.38.2/HTML/Mason/PSGIHandler.pm line 96
eval {...} at /usr/local/share/perl/5.38.2/HTML/Mason/PSGIHandler.pm line 96
HTML::Mason::Request::PSGI::exec('RT::Interface::Web::Request=HASH(0x64c93fbd1fd8)') called at /usr/local/share/perl/5.38.2/HTML/Mason/Interp.pm line 342
HTML::Mason::Interp::exec(undef, undef, 'Name', 'default', 'Type', 'ticket') called at /usr/local/share/perl/5.38.2/HTML/Mason/PSGIHandler.pm line 59
eval {...} at /usr/local/share/perl/5.38.2/HTML/Mason/PSGIHandler.pm line 59
HTML::Mason::PSGIHandler::invoke_mason('HTML::Mason::PSGIHandler::Streamy=HASH(0x64c93d9292f0)', 'HASH(0x64c93fbbf9f8)', 'HASH(0x64c93fbbb7f0)') called at /usr/local/share/perl/5.38.2/HTML/Mason/PSGIHandler/Streamy.pm line 52
HTML::Mason::PSGIHandler::Streamy::__ANON__('CODE(0x64c93f8b11e0)') called at /usr/local/share/perl/5.38.2/Plack/Util.pm line 339
Plack::Util::__ANON__('CODE(0x64c93fbd9db0)') called at /usr/local/share/perl/5.38.2/Plack/Util.pm line 339
Plack::Util::__ANON__('CODE(0x64c93f8daad0)') called at /usr/local/share/perl/5.38.2/Plack/Handler/FCGI.pm line 149
Plack::Handler::FCGI::run('Plack::Handler::FCGI=HASH(0x64c93f1c1e40)', 'CODE(0x64c93e3aab70)') called at /usr/local/share/perl/5.38.2/Plack/Loader.pm line 84
Plack::Loader::run('Plack::Loader=HASH(0x64c93f1c1d08)', 'Plack::Handler::FCGI=HASH(0x64c93f1c1e40)') called at /usr/local/share/perl/5.38.2/Plack/Runner.pm line 279
Plack::Runner::run('RT::PlackRunner=HASH(0x64c93449b3c8)') called at /opt/rt6/sbin/../lib/RT/PlackRunner.pm line 150
eval {...} at /opt/rt6/sbin/../lib/RT/PlackRunner.pm line 150
RT::PlackRunner::run('RT::PlackRunner=HASH(0x64c93449b3c8)') called at /opt/rt6/sbin/rt-server.fcgi line 165

I’ve tried to reproduce this problem changing the default lifecycle and other custom one without any issue. So, I can’t help you too much.

Is there any not ASCII code or anything strange in any status name or whatever?

I never use any default lifecycle just in case.

No special characters or anything anywhere in the lifecycles.

Two of the things I remember doing that broke it were really simple:

  • Changed the update type of an existing action from Comment to Reply. Got the error as soon as I saved that.
  • Added a new right called ResolveTicket that was From * To resolved. Again, as soon as I saved that RT completely broke.

I haven’t found any way to make it happen reliably which makes it really difficult to troubleshoot. I guess if it keeps happening I can do the config file way of creating lifecycles instead and ignore the web editor.

No luck. I’ve tried these changes but I’m unable to reproduce your issue.

I hope you’ll find a solution.

Super useful! One missing comma in that Perl hash and RT just gives up! It’s super helpful to remind people to run perl -c /opt/rt5/etc/RT_SiteConfig.pm after making changes. It catches those syntax errors before you restart the web server and save yourself the ‘white screen of death.’ This is the tip on the Mason cache, too!

I’ll keep that in mind when editing the config file. But all my issues so far have been from changes made in the web interface.

1 Like