Item13321: Error at attachment trashing
Priority: Urgent
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component:
Branches: master
Error trashing an attachment
How to reproduce
- Attach to topic some file
- click "manage" (in the attachment table)
- click the Delete link
- confirm the question
- the error appears
Attention
Attachment move failed
During move of attachment screenshot_37.png to Trash.TrashAttachment an error was found.
PlainFile: failed to delete /me/fw/utest2/foswiki/core/data/Trash/TrashAttachment.lock: No such file or directory at /me/fw/utest2/foswiki/core/lib/Foswiki/Store/PlainFile.pm line 599. at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/CGI/Carp.pm line 353. CGI::Carp::realdie("PlainFile: failed to delete /me/fw/utest2/foswiki/core/data/T"...) called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/CGI/Carp.pm line 443 CGI::Carp::die("PlainFile: failed to delete /me/fw/utest2/foswiki/core/data/T"...) called at /me/fw/utest2/foswiki/core/lib/Foswiki/Store/PlainFile.pm line 599 Foswiki::Store::PlainFile::atomicUnlock(Foswiki::Store::PlainFile=HASH(0x7fedfb2e6d88), Foswiki::Meta=HASH(0x7fedfb5ca398)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/Meta.pm line 2217 Foswiki::Meta::_atomicUnlock(Foswiki::Meta=HASH(0x7fedfb5ca398), "BaseUserMapping_333") called at /me/fw/utest2/foswiki/core/lib/Foswiki/Meta.pm line 3209 Foswiki::Meta::__ANON__() called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Error.pm line 435 Error::subs::try(CODE(0x7fedfb57bbd8), HASH(0x7fedfb5ca770)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/Meta.pm line 3213 Foswiki::Meta::moveAttachment(Foswiki::Meta=HASH(0x7fedfbab44e0), "screenshot_37.png", Foswiki::Meta=HASH(0x7fedfb5ca398), "new_name", "screenshot_37.png") called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI/Rename.pm line 794 Foswiki::UI::Rename::__ANON__() called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Error.pm line 421 eval {...} called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Error.pm line 413 Error::subs::try(CODE(0x7fedf9f61858), HASH(0x7fedfb57bda0)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI/Rename.pm line 808 Foswiki::UI::Rename::_moveTopicOrAttachment(Foswiki=HASH(0x7fedfa640b18), Foswiki::Meta=HASH(0x7fedfbab44e0), Foswiki::Meta=HASH(0x7fedfb5ca398), "screenshot_37.png", "screenshot_37.png", undef) called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI/Rename.pm line 295 Foswiki::UI::Rename::_renameTopicOrAttachment(Foswiki=HASH(0x7fedfa640b18), "Sandbox", "TestTwo") called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI/Rename.pm line 85 Foswiki::UI::Rename::rename(Foswiki=HASH(0x7fedfa640b18)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI.pm line 374 Foswiki::UI::__ANON__() called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Error.pm line 421 eval {...} called at /Users/clt/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1/Error.pm line 413 Error::subs::try(CODE(0x7fedf9817c48), HASH(0x7fedfa621e90)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI.pm line 500 Foswiki::UI::_execute(Foswiki::Request=HASH(0x7fedf9eeac50), CODE(0x7fedfa502458), "rename", 1) called at /me/fw/utest2/foswiki/core/lib/Foswiki/UI.pm line 326 Foswiki::UI::handleRequest(Foswiki::Request=HASH(0x7fedf9eeac50)) called at /me/fw/utest2/foswiki/core/lib/Foswiki/Engine/CGI.pm line 98 Foswiki::Engine::CGI::run(Foswiki::Engine::CGI=HASH(0x7fedf9c420a8)) called
Please go back in your browser and try again.
--
JozefMojzis - 24 Mar 2015
Confirmed. Create a topic, attach a file, trash a file. ... crash.
Note that the stack trace is wrapped on the error screen. Would be nicer in a verbatim block.
Also, shouldn't these "die" statements be asserts?
--
GeorgeClark - 24 Mar 2015
Similar error when trying RENAME a topic. (from more actions).
--
JozefMojzis - 24 Mar 2015
also for the Delete topic
--
JozefMojzis - 24 Mar 2015
It uses a die because that's what the RCS store uses.
That was a bugger to track down.
--
CrawfordCurrie - 26 Mar 2015
This is still failing for me. I ran a Sanity check after building 1.2.0_Beta_1. Crashed when I "moved" a topic to Trash. Crashed again when I moved it back. I added some debug prints into the _atomicUnlock routine, and it appears to be being called twice to unlock the same file
During rename of topic Trash.SandboxATestTopic to Sandbox an error (PlainFile: failed to delete /var/www/data/Foswiki-1.2.0_Beta_1/data/Trash/SandboxATestTopic.lock: No such file or directory at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Store/PlainFile.pm line 599.
And the debug print...
atomicUnlock called for /var/www/data/Foswiki-1.2.0_Beta_1/data/Trash/SandboxATestTopic.lock
-rw-r--r-- 1 gac users 18 Apr 2 23:08 /var/www/data/Foswiki-1.2.0_Beta_1/data/Trash/SandboxATestTopic.lock
atomicUnlock called for /var/www/data/Foswiki-1.2.0_Beta_1/data/Trash/SandboxATestTopic.lock
ls: cannot access /var/www/data/Foswiki-1.2.0_Beta_1/data/Trash/SandboxATestTopic.lock: No such file or directory
--
GeorgeClark - 03 Apr 2015
Some more debug info. I added "cluck" to atomicUnlock. It's called twice from two different locations in Meta:
- First from Meta.pm Line 2148 - in _saveAs(), the lock is successfully deleted
- Again, from Meta.pm line 2303 - in move() the lock no longer exists, and the die happens.
It appears as though move() calls _saveAs(), so the lock is released before return from saveAs, and then unlocked a 2nd time.
1st call
[Thu Apr 2 23:24:18 2015] rename: atomicUnlock called for /var/www/data/Foswiki-1.2.0_Beta_1/data/Sandbox/ATestTopic.lock
[Thu Apr 2 23:24:18 2015] rename: at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Store/PlainFile.pm line 600.
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Store::PlainFile::atomicUnlock(Foswiki::Store::PlainFile=HASH(0x8c98ba0), Foswiki::Meta=HASH(0x8f270d8)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2217
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::_atomicUnlock(Foswiki::Meta=HASH(0x8f270d8), "JoeUser") called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2148
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 433
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x8ffa760), HASH(0x90902c0)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2150
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::saveAs(Foswiki::Meta=HASH(0x8f270d8), "dontlog", 1) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2287
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 419
[Thu Apr 2 23:24:18 2015] rename: eval {...} called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 411
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x9047940), HASH(0x9060768)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2307
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::move(Foswiki::Meta=HASH(0x8f270d8), Foswiki::Meta=HASH(0x9060368)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 812
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 419
[Thu Apr 2 23:24:18 2015] rename: eval {...} called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 411
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x8857038), HASH(0x9060598)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 826
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::_moveTopicOrAttachment(Foswiki=HASH(0x894bbb0), Foswiki::Meta=HASH(0x8f270d8), Foswiki::Meta=HASH(0x9060368), undef, undef, ARRAY(0x893a3e0)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 295
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::_renameTopicOrAttachment(Foswiki=HASH(0x894bbb0), "Sandbox", "ATestTopic") called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 85
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::rename(Foswiki=HASH(0x894bbb0)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 374
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 419
[Thu Apr 2 23:24:18 2015] rename: eval {...} called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 411
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x804deb8), HASH(0x893a740)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 500
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::_execute(Foswiki::Request=HASH(0x8840078), CODE(0x882b560), "rename", 1) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 326
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::handleRequest(Foswiki::Request=HASH(0x8840078)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Engine/CGI.pm line 98
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Engine::CGI::run(Foswiki::Engine::CGI=HASH(0x8441ea0)) called at rename line 29
-rw-r--r-- 1 gac users 18 Apr 2 23:24 /var/www/data/Foswiki-1.2.0_Beta_1/data/Sandbox/ATestTopic.lock
2nd call:
[Thu Apr 2 23:24:18 2015] rename: atomicUnlock called for /var/www/data/Foswiki-1.2.0_Beta_1/data/Sandbox/ATestTopic.lock
[Thu Apr 2 23:24:18 2015] rename: at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Store/PlainFile.pm line 600.
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Store::PlainFile::atomicUnlock(Foswiki::Store::PlainFile=HASH(0x8c98ba0), Foswiki::Meta=HASH(0x8f270d8)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2217
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::_atomicUnlock(Foswiki::Meta=HASH(0x8f270d8), "JoeUser") called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2303
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 433
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x9047940), HASH(0x9060768)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Meta.pm line 2307
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Meta::move(Foswiki::Meta=HASH(0x8f270d8), Foswiki::Meta=HASH(0x9060368)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 812
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 419
[Thu Apr 2 23:24:18 2015] rename: eval {...} called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 411
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x8857038), HASH(0x9060598)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 826
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::_moveTopicOrAttachment(Foswiki=HASH(0x894bbb0), Foswiki::Meta=HASH(0x8f270d8), Foswiki::Meta=HASH(0x9060368), undef, undef, ARRAY(0x893a3e0)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 295
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::_renameTopicOrAttachment(Foswiki=HASH(0x894bbb0), "Sandbox", "ATestTopic") called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI/Rename.pm line 85
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::Rename::rename(Foswiki=HASH(0x894bbb0)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 374
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::__ANON__() called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 419
[Thu Apr 2 23:24:18 2015] rename: eval {...} called at /usr/lib/perl5/vendor_perl/5.20.1/Error.pm line 411
[Thu Apr 2 23:24:18 2015] rename: Error::subs::try(CODE(0x804deb8), HASH(0x893a740)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 500
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::_execute(Foswiki::Request=HASH(0x8840078), CODE(0x882b560), "rename", 1) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/UI.pm line 326
[Thu Apr 2 23:24:18 2015] rename: Foswiki::UI::handleRequest(Foswiki::Request=HASH(0x8840078)) called at /var/www/data/Foswiki-1.2.0_Beta_1/lib/Foswiki/Engine/CGI.pm line 98
[Thu Apr 2 23:24:18 2015] rename: Foswiki::Engine::CGI::run(Foswiki::Engine::CGI=HASH(0x8441ea0)) called at rename line 29
ls: cannot access /var/www/data/Foswiki-1.2.0_Beta_1/data/Sandbox/ATestTopic.lock: No such file or directory
--
GeorgeClark - 03 Apr 2015