Item12794: CopyContrib fails with lenghy "setArchivist" error message
Priority: Urgent
Current State: No Action Required
Released In: n/a
Target Release: n/a
We are experiencing increasingly problems that seem to be related to
CopyContrib in conjunction with
DBCacheContrib.
I don't have a clear picture yet, but it seems that mainly topics with numerous attachments, 100+, fail to copy with a lengthy error message about 'Can't call method "setArchivist" on an undefined value ...' (see
http://pastebin.com/Xc9ARmBX)
After several reloads the topics finally copy.
Unfortunately, Foswikis
error.log
contains no entries!
--
AndreLichtsteiner - 18 Mar 2014
Can't call method "setArchivist" on an undefined value at /opt/foswiki115/lib/Foswiki/Contrib/DBCacheContrib/Archivist/Storable.pm line 109. at /opt/foswiki115/lib/Foswiki/Contrib/DBCacheContrib/Archivist/Storable.pm line 109 Foswiki::Contrib::DBCacheContrib::Archivist::Storable::getRoot('Foswiki::Contrib::DBCacheContrib::Archivist::Storable=HASH(0x...') called at /opt/foswiki115/lib/Foswiki/Contrib/DBCacheContrib.pm line 445 Foswiki::Contrib::DBCacheContrib::load('Foswiki::Plugins::DBCachePlugin::WebDB=HASH(0x4a29158)', 0) called at /opt/foswiki115/lib/Foswiki/Plugins/DBCachePlugin/WebDB.pm line 73 Foswiki::Plugins::DBCachePlugin::WebDB::load('Foswiki::Plugins::DBCachePlugin::WebDB=HASH(0x4a29158)', 0, 'AUTHOR_WWW/Science', 'DepartmentsLaborsEN') called at /opt/foswiki115/lib/Foswiki/Plugins/DBCachePlugin/Core.pm line 1169 Foswiki::Plugins::DBCachePlugin::Core::getDB('Trash') called at /opt/foswiki115/lib/Foswiki/Plugins/DBCachePlugin/Core.pm line 132 Foswiki::Plugins::DBCachePlugin::Core::afterSaveHandler('LIVE_WWW/Science', 'DepartmentsLaborsEN', 'Trash', 'TrashAttament', 'general_energy_bild2.jpg', 'general_energy_bild2.jpg') called at /opt/foswiki115/lib/Foswiki/Plugins/DBCachePlugin.pm line 233 Foswiki::Plugins::DBCachePlugin::afterRenameHandler('LIVE_WWW/Science', 'DepartmentsLaborsEN', 'general_energy_bild2.jpg', 'Trash', 'TrashAttament', 'general_energy_bild2.jpg') called at /opt/foswiki115/lib/Foswiki/Plugin.pm line 288 Foswiki::Plugin::invoke('Foswiki::Plugin=HASH(0x32baff0)', 'afterRenameHandler', 'LIVE_WWW/Science', 'DepartmentsLaborsEN', 'general_energy_bild2.jpg', 'Trash', 'TrashAttament', 'general_energy_bild2.jpg') called at /opt/foswiki115/lib/Foswiki/Plugins.pm line 340 Foswiki::Plugins::dispatch('Foswiki::Plugins=HASH(0x247d9e0)', 'afterRenameHandler', 'LIVE_WWW/Science', 'DepartmentsLaborsEN', 'general_energy_bild2.jpg', 'Trash', 'TrashAttament', 'general_energy_bild2.jpg') called at /opt/foswiki115/lib/Foswiki/Meta.pm line 3013 Foswiki::Meta::moveAttachment('Foswiki::Meta=HASH(0x3c1ef40)', 'general_energy_bild2.jpg', 'Foswiki::Meta=HASH(0x44b2ff8)', 'new_name', 'general_energy_bild2.jpg') called at /opt/foswiki115/lib/Foswiki/Func.pm line 2194 Foswiki::Func::moveAttachment('LIVE_WWW/Science', 'DepartmentsLaborsEN', 'general_energy_bild2.jpg', 'Trash', 'TrashAttament') called at /opt/foswiki115/lib/Foswiki/Contrib/CopyContrib/TopicAgent.pm line 238 Foswiki::Contrib::CopyContrib::TopicAgent::trashAttachments('Foswiki::Contrib::CopyContrib::TopicAgent=HASH(0x4464240)') called at /opt/foswiki115/lib/Foswiki/Contrib/CopyContrib/TopicAgent.pm line 175 Foswiki::Contrib::CopyContrib::TopicAgent::copyPart('Foswiki::Contrib::CopyContrib::TopicAgent=HASH(0x4464240)', 'attachments') called at /opt/foswiki115/lib/Foswiki/Contrib/CopyContrib/TopicAgent.pm line 290 Foswiki::Contrib::CopyContrib::TopicAgent::copy('Foswiki::Contrib::CopyContrib::TopicAgent=HASH(0x4464240)') called at /opt/foswiki115/lib/Foswiki/Contrib/CopyContrib.pm line 71 Foswiki::Contrib::CopyContrib::__ANON__() called at /usr/share/perl5/Error.pm line 415 eval {...} called at /usr/share/perl5/Error.pm line 407 Error::subs::try('CODE(0x247ce40)', 'HASH(0x4462988)') called at /opt/foswiki115/lib/Foswiki/Contrib/CopyContrib.pm line 90 Foswiki::Contrib::CopyContrib::copyCgi('Foswiki=HASH(0x247cea0)') called at /opt/foswiki115/lib/Foswiki/UI.pm line 318 Foswiki::UI::__ANON__() called at /usr/share/perl5/Error.pm line 415 eval {...} called at /usr/share/perl5/Error.pm line 407 Error::subs::try('CODE(0x1a70f28)', 'HASH(0x2535b58)') called at /opt/foswiki115/lib/Foswiki/UI.pm line 441 Foswiki::UI::_execute('Foswiki::Request=HASH(0x24268c8)', 'CODE(0x252d300)', 'copy', 1) called at /opt/foswiki115/lib/Foswiki/UI.pm line 276 Foswiki::UI::handleRequest('Foswiki::Request=HASH(0x24268c8)') called at /opt/foswiki115/lib/Foswiki/Engine/CGI.pm line 41 Foswiki::Engine::CGI::run('Foswiki::Engine::CGI=HASH(0x1dbe6c8)') called
--
MichaelDaum - 18 Mar 2014
What exactly did you do?
For now this patch should mend the symptoms:
--- lib/Foswiki/Contrib/DBCacheContrib/Archivist/Storable.pm (revision 17381)
+++ lib/Foswiki/Contrib/DBCacheContrib/Archivist/Storable.pm (working copy)
@@ -106,7 +106,7 @@
$root = $this->{root} = Storable::lock_retrieve( $this->{_file} );
#print STDERR "loaded from $this->{_file}\n";
- $root->setArchivist($this);
+ $root->setArchivist($this) if $root;
}
else {
$root = $this->{root} = $this->newMap();
Does switching to
Segmentable
archivist help?
--
MichaelDaum - 18 Mar 2014
We are puzzled about the bug our selves as we weren't touching the system for a while when they suddenly started to appear.
Users observed, that copying succeeds after multiple trials: once retry for the topic itself and one for each attachment! I taught this might help.
Your patch leads to a new bug:
Can't call method "size" on an undefined value at /opt/foswiki115/lib/Foswiki/Contrib/DBCacheContrib.pm line 450.
...
And, what do you mean by
Segmentable
archivist?
--
AndreLichtsteiner - 19 Mar 2014
See the
{DBCacheContrib}{Archivist}
parameter in
configure
--
MichaelDaum - 19 Mar 2014
Ok, we'll give
Segmentable
a try.
As the cache files are split into smaller pieces it seems more suitable to our cluster/AFS setup.
--
AndreLichtsteiner - 19 Mar 2014