Summary: CodeReview SVN shell-out fails with default
                    $wgMaxShellMemory (false locale, DNS errors)
           Product: MediaWiki extensions
           Version: any
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: Normal
         Component: CodeReview

Testing on Ubuntu 10.10 64-bit with a fairly stock trunk install as of r80753.

I plopped CodeReview in, added the MediaWiki repository, and went to initialize
it with svnImport.php, and got this exciting failure:

$ php extensions/CodeReview/svnImport.php MediaWiki

svn: warning: cannot set LC_CTYPE locale
svn: warning: environment variable LANG is en_US.UTF-8
svn: warning: please check that your locale name is correct
svn: OPTIONS of '': Could not resolve
hostname `': Host not found (

I tracked it down to the memory limit being applied on the shell-out: poking
$wgMaxShellMemory from the default 102400 up to 1024000 gets it working just

Can repro the error here like so:

  bash # start a new shell so you don't break your old one!
  ulimit -v 102400
  svn info --non-interactive --trust-server-cert

I guess a hundred megabytes doesn't go as far as it used to. :( strace shows a
lot of mmap() failures; for instance we get a hostname resolution failure
because the NSS plugin for DNS lookups can't be loaded:

open("/lib/", O_RDONLY)  = 4
read(4, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\17\0\0\0\0\0\0"...,
832) = 832
fstat(4, {st_mode=S_IFREG|0644, st_size=22928, ...}) = 0
ENOMEM (Cannot allocate memory)
close(4)                                = 0

The failure mode is weird, and it's *totally* unobvious how to fix it from the
error messages. If adjusting defaults isn't feasible, we at least need some
documentation warning of the issue.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to