Last modified: 2014-06-23 16:07:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41637, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39637 - diff3 error message (No newline at end of file) logged when undoing an edit at end of file
diff3 error message (No newline at end of file) logged when undoing an edit a...
Status: NEW
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.21.x
PC Linux
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-25 02:39 UTC by Zach
Modified: 2014-06-23 16:07 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Zach 2012-08-25 02:39:35 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
Comment 1 Quim Gil 2013-08-10 05:07:42 UTC
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
Comment 2 Quim Gil 2013-08-12 13:01:40 UTC
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.
Comment 3 Mark A. Hershberger 2013-08-14 17:48:03 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links