Tags:
create new tag
view all tags

Question

Trying to save results in Apache running perl and the oops script, which hangs indefinitely.

First some background:

  • I am trying to get a new installation running
  • I managed to hack my way through a Windows installation with the September release and finally got it up
  • Then v4.0.1 came out so I ran that with the Upgrade script which broke a lot of stuff
  • Now I am back to a semi-functional state with many issues (feeling rather overwhelmed)

Apologies also if I do not have enough information, or too much information all in one post.

Problem 1

One of the things that's wrong is that I was initially trying out the edit feature on the ATasteOfTWiki topic to fix a typo. After making the change, I try to save. At that point, Apache runs "perl -wT oops", which basically hangs with 100% cpu usage until I kill it.

Note: Even though perl hangs at 100% cpu usage and has to be killed, the next time I load the page, the edits have been saved, but the revision number is still the same.

Running the oops script from cygwin to a test.html file doesn't hang and results in the following html output:

TWiki Installation Error

Template "oops" not found.

Check the configuration setting for {TemplateDir}.

TWiki.org apparently has the same issue(?): https://twiki.org/cgi-bin/oops

In search of clues, here is the Apache log:

Note: I have substituted my client IP with "-"

[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] c:/cygwin/bin/ci -x,v -q -l -m"% COMMENT%" -t-none -w"%USERNAME%" %FILENAME%  of d:/twiki/data/TWiki/ATasteOfTWiki.txt failed:  at /cygdrive/d/twiki/lib/TWiki/Store/RcsWrap.pm line 401.\n
[Sat Feb 11 15:27:45 2006] [error] [client -] \n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] c:/cygwin/bin/ci -x,v -q -l -m"% COMMENT%" -t-none -w"%USERNAME%" %FILENAME%  of d:/twiki/data/TWiki/ATasteOfTWiki.txt failed:  at /cygdrive/d/twiki/lib/TWiki/Store/RcsWrap.pm line 401.\n
[Sat Feb 11 15:27:45 2006] [error] [client -] \n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] c:/cygwin/bin/ci -x,v -q -l -m"% COMMENT%" -t-none -w"%USERNAME%" %FILENAME%  of d:/twiki/data/TWiki/ATasteOfTWiki.txt failed:  at /cygdrive/d/twiki/lib/TWiki/Store/RcsWrap.pm line 401.\n
[Sat Feb 11 15:27:45 2006] [error] [client -] \n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n
[Sat Feb 11 15:27:45 2006] [error] [client -] OopsException(attention/save_error web=>TWiki topic=>ATasteOfTWiki params=>c:/cygwin/bin/ci -x,v -q -l -m"% COMMENT%" -t-none -w"%USERNAME%" %FILENAME%  of d:/twiki/data/TWiki/ATasteOfTWiki.txt failed: )\n
[Sat Feb 11 15:27:45 2006] [error] [client -] ********************************\n

Below were the other problems listed in my original post, which I have tried to split out to their own topics, per Richard's Advice. I have kept them here mostly to help me keep track of everything.

Problem 2

See: SkinRenderingProblems

Problem 3

See: UserNoShow

Problem 4

See: CantLocateEntitiesPm

Problem 5

I can't figure out how to change the copyright text at the bottom of the pages.

Answer: Setting is located in TWiki.TWikiPreferences

Problem 6

I can't figure out how to redirect from http://computername/ to -> http://computername/bin/view/Main/WebHome. I can enable/disable access to the page and file contents at http://computername/ but I can't figure out how to make it load the Main TWiki page.

Answer: See instructions here: http://www.macalester.edu/its/docs/howto/urlredirect/

Environment

TWiki version: TWikiRelease04x00x01
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: WinXP SP 1
Web server: Apache 1.3.34
Perl version: 5.8.7-5
Client OS: WinXP, Win2k
Web Browser: Firefox
Categories: Installation

-- JoshuaJohnston - 10 Feb 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Please split these questions into separate pages - it's difficult to answer many questions on one page. Also, SupportGuidelines will help you provide enough information in your questions.

-- RichardDonkin - 11 Feb 2006

Alright I am working on separating the problems out into different posts.

I have also looked in RcsWrap.pm which is where it looks like this error gets generated--line 401 referenced in the Apache log is the throw error line at the bottom of the subroutine.

sub _ci {
    my( $this, $comment, $user, $date ) = @_;

    $comment = 'none' unless $comment;

    my( $cmd, $rcsOutput, $exit );
    if( defined( $date )) {
        $date = TWiki::Time::formatTime( $date , '$rcs', 'gmtime');
        $cmd = $TWiki::cfg{RCS}{ciDateCmd};
        ($rcsOutput, $exit)= $this->{session}->{sandbox}->sysCommand(
            $cmd,
            USERNAME => $user,
            FILENAME => $this->{file},
            COMMENT => $comment,
            DATE => $date );
    } else {
        $cmd = $TWiki::cfg{RCS}{ciCmd};
        ($rcsOutput, $exit)= $this->{session}->{sandbox}->sysCommand(
            $cmd,
            USERNAME => $user,
            FILENAME => $this->{file},
            COMMENT => $comment );
    }
    $rcsOutput ||= '';

    if( $exit ) {
        throw Error::Simple($cmd.' of '.$this->{file}.
                              ' failed: '.$rcsOutput );
    }

    chmod( $TWiki::cfg{RCS}{filePermission}, $this->{file} );
}

Without further knowledge, perhaps this is two problems?

  • The ci command looks like it's not executing -and-
  • When the Oops Exception is called, something else isn't working and is hanging everything

I am also wondering if the ci command not working has anything to do with my user name not being completely detected(?) by the system... see UserNoShow.

-- JoshuaJohnston - 13 Feb 2006

Here's another datapoint I found inadvertently:

By making a new wikiword then following the new link stub (creating a new page), then editing and performing a save, the page saves correctly the first time without crashing.

After that, it's back to some more of the same... click on edit, make changes, click save, file gets saved correctly but no RCS revision update and the oops script hangs perl at 100% cpu usage.

-- JoshuaJohnston - 13 Feb 2006

I had a related experience, though it did not result in a hanging oops: I could update attachments, but the revision number wouldn't change. By trial and error I found that the ci (RCS checkin) command didn't work. Perhaps you can perform a rather trivial check:

  • Do you have a couple of lines like $cfg{RCS}{ciCmd} = "..." in your lib/LocalSite.cfg? If so, do they contain \"? (I would guess so from your error log). Try to remove all that \" strings (four in the line containing $cfg{RCS}{ciCmd}, and four in $cfg{RCS}{ciDateCmd}), then try again.
It seems that the upgrade script doesn't do The Right Thing when converting the RCS command settings for Windows environments. There's a hint in TWiki.cfg:
# <b>Note: If you override any of the paths, parameters of the form
# %ARG|T% must <em>NOT</em> be enclosed in any kind of quotes.</b> 
# Otherwise the quotes will be treated as part of the parameter value.

Oh - and you seem to have % COMMENT% in your lib/LocalSite.cfg where there should only be %COMMENT%. But maybe you just wrote that to avoid TWiki's variable expansion?

-- HaraldJoerg - 14 Feb 2006

I put the space between the % and COMMENT because it was adding any further comments there (I didn't know you could put the nop in there to give correct appearance).

In regards to the to Twiki.cfg note, I'm not sure exactly what that means (not enough background info since I'm a newbie), but as far as the quotes, I removed them and received identical behavior, except the Apache logs now show the quotes being gone from the command lines in the error messages.

In regards to the upgrade script, I'm not sure exactly what it did, but I found out yesterday that among other things, it butchered my TWiki Preferences settings by inserting my old settings into the new file in various locations, essentially duplicating the entire file in a way that was very difficult to fix.

I'm wondering if there's a way to manually try the ci command as the SYSTEM user. It seemed to work when I tried checking in a file with identical syntax, running as the default user (under my user account in Cygwin).

I'm also wondering why there are comments in the localsite.cfg that don't match the commands themselves--where these comments came from. For example, for the ci command, the -u option is listed in the comment syntax, instead of -l -- not being familiar with the syntax switches, I'm wondering what the difference is and why the discrepancy.

-- JoshuaJohnston - 14 Feb 2006

When creating a new web I also receive a similiar error... the Apache error log looks identical but Oops doesn't hang and the following info is displayed on the screen:

TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

c:path -x,v -q -l -m% COMMENT% -t-none -w%USERNAME% %FILENAME%  of d:path failed: 

Again I am adding a space between % and COMMENT% for proper rendering here. Also, before I had removed the quotes from the LocalSite.cfg, there used to be quotes in the above text surrounding the designated variables when trying to create a new web. This error message looks like the the full path of ci.exe was replaced with "path" (?)

Also, similiar to previous actions using the Save command, the new web IS created despite the error, so if I return to the main page and refresh, it shows up.

-- JoshuaJohnston - 14 Feb 2006

In order to protect server paths from casual hackers - who may force an error to examine a vulnerable host - TWiki converts all paths in error messages to "path". The full error message is output in error_log; you can't get that screen output without a line in error_log, IIRC.

I generally recommend to windows users that they use RcsLite rather than cygwin rcs. I have found it to be perfectly reliable and not much slower. I haven't tried cygwin with TWiki 4.0.0, personally frown

-- CrawfordCurrie - 14 Feb 2006

Thanks for this info and the suggestion... moving to RcsLite now lets everything work correctly, however, I would maintain that there is still a problem with the Oops script hanging... an RCS problem is undoubtedly linked to my configuration setup, but having a perl script hang at 100% cpu usage seems likely to be a coding problem elsewhere.

Now that RCS is working, my other problem is also resolved for new users that are created not showing up in the user list. See topic: UserNoShow

-- JoshuaJohnston - 14 Feb 2006

RCS: /usr/bin/rlog -x,v -h %FILENAME|F% of c:/twiki/data/Sandbox/WebTopicCreator.txt,v failed: at c:/twiki/lib/TWiki/Store/RcsWrap.pm line 245.

-- LekhaMohanty - 11 May 2006

Edit | Attach | Watch | Print version | History: r15 < r14 < r13 < r12 < r11 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r15 - 2020-04-26 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.