Lucid: recovery silently deletes data in large files.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vim (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Lucid |
Fix Released
|
High
|
Bartosz Kosiorek | ||
Precise |
Fix Released
|
High
|
Unassigned | ||
Quantal |
Fix Released
|
High
|
Unassigned | ||
Raring |
Fix Released
|
High
|
Unassigned |
Bug Description
This is present in vim 2:7.2.330-1ubuntu3, in Lucid. It was fixed upstream in 7.3.216, which is in Precise and newer. To replicate the bug (taken from https:/
[Summary]
The recovery process silently deletes part of the file it's run on, when the file is large enough (40,000 lines seems to trigger it).
[Impact]
The recovery process, while it may not recover all of the user's changes since the process was killed, is expected to at least not destroy random chunks of data in the middle of a large file. This bug has bitten me at least twice--
[Test Case]
1. Run 'vi test.txt'.
2. Type '78a-' [ESC], then 'yy', '39999p', then ':wq', to create a 40,000-line test file.
3. Run 'cp test.txt test.bak'.
4. Run 'vi test.txt'.
5. Type 'Ox' to make a small change to the file.
6. From another terminal window, run 'ps x|grep [t]est.txt' to find the PID of the running vim process.
7. Run 'kill $PID' to terminate the process.
8. Run 'vi test.txt', and type 'r' to attempt recovery, then ':wq' to save the recovered contents.
9. Run 'wc -l test.txt test.bak'.
Expected output:
$ wc -l test.txt test.bak
40001 test.txt
40000 test.bak
Actual output:
$ wc -l test.txt test.bak
38629 test.txt
40000 test.bak
[Regression Potential]
Small. The patch I'm backporting (https:/
Related branches
- Marc Deslauriers: Approve
- Adam Buchbinder (community): Needs Resubmitting
- Jamie Strandboge: Needs Fixing
-
Diff: 162 lines (+70/-5)9 files modifieddebian/changelog (+14/-0)
src/memline.c (+1/-0)
src/testdir/Make_amiga.mak (+2/-1)
src/testdir/Make_dos.mak (+1/-1)
src/testdir/Make_ming.mak (+1/-1)
src/testdir/Make_vms.mms (+1/-1)
src/testdir/Makefile (+1/-1)
src/testdir/test70.in (+46/-0)
src/testdir/test70.ok (+3/-0)
summary: |
- recovery silently deletes data in large files. + Lucid: recovery silently deletes data in large files. |
description: | updated |
Triaged: Reporter points to discussion and fix
Importance: High (I was wondering about crticial since it's a data loss/corruption, but there again it's in a vi recovery which is reasonably rare and not an arbitrary corruption)