You are here: Foswiki>Tasks Web>Item1520 (28 Aug 2010, ScottHoge)Edit Attach

Item1520: Extensions.LatexModePlugin and Extensions.WorkflowPlugin fight frown, sad smile

pencil
Priority: Low
Current State: No Action Required
Released In:
Target Release: n/a
Applies To: Extension
Component: LatexModePlugin, WorkflowPlugin
Branches:
Reported By: EdMcDonagh
Waiting For: Main.ScottHoge
Last Change By: ScottHoge
Bug, I think!

When a user tries to view a page that is
  1. Under workflow control using WorkflowPlugin and
  2. contains latex code from LatexModePlugin
the page never loads frown, sad smile

Using top, I could see that the view command continuously runs, taking between 30% and 100% CPU. latex and dvipng pop up every now and again. It carrys on till I kill it.

Looking in the apache error log

[Fri Apr 24 18:03:57 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:03:57 2009] view: Deep recursion on subroutine "Error::subs::try" at /var/lib/foswiki/lib/Foswiki/Func.pm line 1703.
[Fri Apr 24 18:03:57 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:03:57 2009] view: Deep recursion on subroutine "Foswiki::Plugins::dispatch" at /var/lib/foswiki/lib/Foswiki/Store.pm line 1058.
[Fri Apr 24 18:03:57 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:03:57 2009] view: Deep recursion on subroutine "Foswiki::Plugin::invoke" at /var/lib/foswiki/lib/Foswiki/Plugins.pm line 316.
[Fri Apr 24 18:04:07 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:07 2009] view: Deep recursion on subroutine "Foswiki::handleCommonTags" at /var/lib/foswiki/lib/Foswiki/Func.pm line 1942.
[Fri Apr 24 18:04:07 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:07 2009] view: Deep recursion on subroutine "Foswiki::Plugins::LatexModePlugin::afterCommonTagsHandler" at /var/lib/foswiki/lib/Foswiki/Plugin.pm line 273.
[Fri Apr 24 18:04:07 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:07 2009] view: Deep recursion on subroutine "Foswiki::Plugins::LatexModePlugin::Render::renderEquations" at /var/lib/foswiki/lib/Foswiki/Plugins/LatexModePlugin.pm line 222.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Plugins::LatexModePlugin::Render::makePNGs" at /var/lib/foswiki/lib/Foswiki/Plugins/LatexModePlugin/Render.pm line 795.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Func::saveAttachment" at /var/lib/foswiki/lib/Foswiki/Plugins/LatexModePlugin/Render.pm line 1038.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Store::saveAttachment" at /var/lib/foswiki/lib/Foswiki/Func.pm line 1697.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Plugins::WorkflowPlugin::beforeAttachmentSaveHandler" at /var/lib/foswiki/lib/Foswiki/Plugin.pm line 273.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Plugins::WorkflowPlugin::ControlledTopic::canEdit" at /var/lib/foswiki/lib/Foswiki/Plugins/WorkflowPlugin.pm line 291.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Plugins::WorkflowPlugin::Workflow::allowEdit" at /var/lib/foswiki/lib/Foswiki/Plugins/WorkflowPlugin/ControlledTopic.pm line 99.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Plugins::WorkflowPlugin::ControlledTopic::expandMacros" at /var/lib/foswiki/lib/Foswiki/Plugins/WorkflowPlugin/Workflow.pm line 190.
[Fri Apr 24 18:04:08 2009] [error] [client 192.168.130.208] [Fri Apr 24 18:04:08 2009] view: Deep recursion on subroutine "Foswiki::Func::expandCommonVariables" at /var/lib/foswiki/lib/Foswiki/Plugins/WorkflowPlugin/ControlledTopic.pm line 244.
[Fri Apr 24 18:09:08 2009] [warn] [client 192.168.130.208] Timeout waiting for output from CGI script /usr/lib/cgi-bin/foswiki/view
[Fri Apr 24 18:09:08 2009] [error] [client 192.168.130.208] Premature end of script headers: view

Help!

-- EdMcDonagh - 24 Apr 2009

I should have said before, these two plugins worked fine together on the previous twiki installation, and they work fine seperately (apart from one or two unrelated niggles, reported elsewhere on this site!)

-- EdMcDonagh - 29 Apr 2009

Ed,

Thanks for the error report. This is quite possibly a namespace collision, or some similar bug. I'll look into it when I get a chance, but it may be awhile.

-- ScottHoge - 30 Apr 2009

From a hint Scott sent me:

By setting
$Foswiki::cfg{Plugins}{LatexModePlugin}{bypassattach} = 1;
in LocalSite.cfg, the problem disappears! Check the plugin page on your wiki for info, but basically when this isn't set, you can use database storage for attachments, as an alternative to the normal file storage. Setting it to 1 only allows file storage. I think! So for most people, setting this variable will not cause any problems, and will fix the issue I had above!

-- EdMcDonagh - 30 Apr 2009
Topic revision: r5 - 28 Aug 2010, ScottHoge
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy