Last modified: 2014-09-05 11:05:03 UTC
Trying to upgrade a 1.22 version of mediawiki to any of the 1.23 versions will on my shared host result in the following behaviour: After entering the Upgrade Key and moving on to the "Welcome to MediaWiki"-page, the installer hangs and the page never finishes loading, that is you only see white. With strategic outcommenting of code, we have narrowed the issue down to the wfShellExec()-Function, however no error was produced. Only when we extracted the offending piece of code where we able to get a warning message. Test code and warning message: http://slexy.org/view/s2frnrvJCP Hosteurope's (provider) PHP Version: http://www.hosteurope-infos.de/phpinfo.php
(In reply to Daniel from comment #0) > Test code and warning message: http://slexy.org/view/s2frnrvJCP Contents: Error message: PHP Warning: stream_select() [[a href='function.stream-select']function.stream-select[/a]]: You MUST recompile PHP with a larger value of FD_SETSIZE.\nIt is set to 1024, but you have descriptors numbered at least as high as 1438.\n --enable-fd-setsize=2048 is recommended, but you may want to set it\nto equal the maximum number of open files supported by your system,\nin order to avoid seeing this error again at a later date. in /is/htdocs/wp1017571_H5Q0RI8Q57/www/sys/scripts/stream_select_debug.php on line 13 Test code: <?php $cmd = "/bin/bash '/is/htdocs/wp1017571_H5Q0RI8Q57/www/sfrs/hauptcomputer/w-1.23/includes/limit.sh' ''\''/usr/bin/diff3'\'' --version 2>&1' 'MW_INCLUDE_STDERR=;MW_CPU_LIMIT=180; MW_CGROUP='\'''\''; MW_MEM_LIMIT=0; MW_FILE_SIZE_LIMIT=102400; MW_WALL_CLOCK_LIMIT=180; MW_USE_LOG_PIPE=yes"; $desc = array( 0 => array('file', 'php://stdin', 'r'), 1 => array('pipe', 'w' ), 2 => array('file', 'php://stderr', 'w'), 3 => array( 'pipe', 'w' ) ); $readyPipes = null; $proc = proc_open($cmd, $desc, $readyPipes); $emptyArray = array(); var_dump(stream_select($readyPipes, $emptyArray, $emptyArray, null));
Apparently, seems to be a problem with hosteurope See this similar report from dokuwiki: https://bugs.dokuwiki.org/?do=details&task_id=2276 > The problem lies with a hardcoded limit of a maximum of 1024 file descriptors > within the libc-client library. Because HostEurope uses mod_php which is shared > for all clients/apache processes this limit can arbitrarily reached. HostEurope > refuses to maintain a custom version of this library, so the limit can't be > increased. Maybe you can try again in off-peak hours, when there are less concurrent users loading webpages on the server. Dokuwiki "fixed" this by retrying in an infinite loop (yuk!)
(In reply to Kunal Mehta (Legoktm) from comment #1) > You MUST recompile PHP with a larger value of FD_SETSIZE. So is there anything that can actually be done in MediaWiki? Ticket sounds like INVALID to me and a support question instead.
Updates have always been done in off-peak hours, so that's not a solution. Even if it was, isn't wfShellExec() used in other scenarios? So I'd end up with a malfuncitoning installation, if I managed to update at night. That said, the previous incarnation of wfShellExec() that used passthru() instead of stream_select() worked perfectly.
(In reply to Andre Klapper from comment #3) > So is there anything that can actually be done in MediaWiki? > Ticket sounds like INVALID to me and a support question instead. The question was posted in Support Desk as the URL describes) and I convinced Daniel to post it here, in the hope that the issue could be investigated, in case there's some leak in file descriptors or something that could be done. The fact that this error didn't happened on previous versions may indicate this could introduce a bug, or maybe something could be done to detect this and "fallback" to the old way of doing this.