Last modified: 2014-06-23 16:07:09 UTC
Problem: I host a public MW and it causes the following message to repeatedly appear in my Apache error.log file: /usr/bin/diff3: No newline at end of file At least one situation I've been able to track down which commonly triggers this "error" is anytime someone attempts to "undo" an edit, which is prior to the most recent edit, which was at the bottom of the page in the revision in which it was made. Minimal example: On a fresh 1.20 install, I create a new page "X" with content "a". Then I edit page "X" to add a newline and "b". Then another edit to add a newline and "c". Now if I click "undo" on the second ("b") edit, with "tail -f /var/log/apache2/error.log" running in another window, I immediately see the diff3 error appear. Hack solution: If I make the following mydiff3 function: #!/bin/bash diff3 $* |& grep -v "No newline at end of file" and point wgDiff3 to mydiff3, then (naturally) the error no longer appears in my log files, and the wiki appears to continue to function as expected. Severity: I have not been able to find any circumstances where this reported diff3 "No newline" error causes any unexpected behavior with MW's "undo"/merge functionality. At this point, the worst consequence I see of this bug is that it fills my Apache error logs to an extent that gets in the way of me noticing other errors and bugs. Relevant system info: diff3 (GNU diffutils) 3.0 Server version: Apache/2.2.16 (Debian) Observed this bug in MW 1.15.5 and current 1.20-git
Same here. fpm.log contains many lines like this: [10-Aug-2013 02:55:20] WARNING: [pool www] child 24188 said into stderr: "/usr/bin/diff3: No newline at end of file" MediaWiki 1.21.1 PHP 5.4.4-14+deb7u2 (fpm-fcgi) MySQL 5.5.31-0+wheezy1-log
Looking at Apache's access log, this error seems to show up whenever a bot or someone intrusive does very weird requests such as http://espiral.org/w/index.php?title=La_informaci%C3%B3n_secreta_de_Estado_debe_ser_compartida,_conservada_y_finalmente_publicada&action=edit&undoafter=1049&undo=1234 fwiw I have that wiki in view mode only - no edit permissions to anybody.
I don't see a way to suppress the messages for diff3, so it looks like your best bet is the hack solution in comment #0.