php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66923 rsync falls when running with exec
Submitted: 2014-03-18 13:49 UTC Modified: 2014-03-20 12:09 UTC
From: beaux_monde at tut dot by Assigned:
Status: Closed Package: Program Execution
PHP Version: 5.5.10 OS: Arch Linux
Private report: No CVE-ID: None
 [2014-03-18 13:49 UTC] beaux_monde at tut dot by
Description:
------------
After update of php from 5.5.9 to 5.5.10 and apache from 2.2.26 to 2.4.7 rsync got falling while synchronization process.

Test script:
---------------
array($out);
exec("rsync -auzvvvvvvvvv --delete --temp-dir='bad/' --exclude='/bad' --exclude='.htaccess' ./generated/ $host:/some/dir/", $out);


Expected result:
----------------
Synchronization have to executed.

Actual result:
--------------
Synchronization falls at some stage without actual transferring of a files with error code 13. $out contains reference to a line 244 of a rsync's log.c. Here it:

static void filtered_fwrite(FILE *f, const char *buf, int len, int use_isprint)
{
	const char *s, *end = buf + len;
	for (s = buf; s < end; s++) {
		if ((s < end - 4
		  && *s == '\\' && s[1] == '#'
		  && isDigit(s + 2)
		  && isDigit(s + 3)
		  && isDigit(s + 4))
		 || (*s != '\t'
		  && ((use_isprint && !isPrint(s))
		   || *(uchar*)s < ' '))) {
			if (s != buf && fwrite(buf, s - buf, 1, f) != 1)
				exit_cleanup(RERR_MESSAGEIO);
			fprintf(f, "\\#%03o", *(uchar*)s);
			buf = s + 1;
		}
	}
	if (buf != end && fwrite(buf, end - buf, 1, f) != 1)
		exit_cleanup(RERR_MESSAGEIO); // <<< *** This is line 244 ***
}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-18 17:17 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2014-03-18 17:17 UTC] requinix@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php

If you can provide more information, feel free to add it
to this bug and change the status back to "Open".

Thank you for your interest in PHP.


Unlikely to be a bug with PHP and more likely to be a result of something that changed during the upgrade.

What's the error output?
 [2014-03-18 17:18 UTC] requinix@php.net
-Package: Apache2 related +Package: Program Execution
 [2014-03-20 12:09 UTC] beaux_monde at tut dot by
-Status: Feedback +Status: Closed
 [2014-03-20 12:09 UTC] beaux_monde at tut dot by
It looks like the problem was in that there was not free space on a disc...
:-)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 22 12:01:31 2024 UTC