bugGNU nano - Bugs: bug #36864, Saving to full device leads to...


bug #36864: Saving to full device leads to empty file

Submitted by:  Clarence Risher <sparr>
Submitted on:  Tue 17 Jul 2012 04:07:24 PM UTC  
Severity: 4 - ImportantStatus: Need Info
Assigned to: Chris Allegretta <astyanax>Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 14 Jul 2014 10:31:35 PM UTC, comment #4:


This just happenned to me on debian wheezy, everything up-to-date.

I did :
nano /my/external/mounted/drive/myfile

and when I saved it, nano said "no enough place" or somethings, and then the file was empty. I'm kinda broken now, this file was a scratchpad full of important stuff !

I still couldn't get my file back, by the way.

nano version : nano GNU version 2.2.6 (compilé à 21:40:01, le Jun 22 2012)

That said (not sure if this place is good for that by the way), I will be more carefull next time !


Wed 05 Feb 2014 05:34:43 PM UTC, comment #3:

I also did the same thing with nano-2.3.2-2.1.2.x86_64 provided by open suse 13.1.

david <ballsystemlord>
Wed 05 Feb 2014 05:32:25 PM UTC, comment #2:

Hi, I recreated this bug by repartitioning my hard disk.
I checked out your source about a month ago so I compiled it
and called it nano2. Then, to let you see where you are in the program I produced a core dump.

% ulimit -c $((2**32))
% nano2 nano-how-to-contrib.html
% stat nano-how-to-contrib.html
File: ‘nano-how-to-contrib.html’
Size: 0 Blocks: 0 IO Block: 1024 regular empty file
Device: 80dh/2061d Inode: 509 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ballsystemlord) Gid: ( 100/ users)
Access: 2014-01-24 20:02:26.000000000 -0500
Modify: 2014-01-24 20:02:26.000000000 -0500
Change: 2014-01-24 20:02:26.000000000 -0500
Birth: -
% ps -a | grep nano
6772 pts/1 00:00:00 nano2
% kill -s SIGSEGV 6772 #I tried using SIGQUIT but it did not work.
% nice -n 10 xz -k -C sha256 -v --lzma2=dict=2MiB,lc=4,lp=0,pb=2,mf=bt4,mode=normal,nice=273,depth=1000 "core"

(file #30464)

david <ballsystemlord>
Thu 10 Jan 2013 03:56:53 AM UTC, comment #1:

Hello. Can you let me know what version of nano you were using? There have been several sets of fixes for full files in various versions, but they have not gone back to all stable branches.

Chris Allegretta <astyanax>
Project AdministratorIn charge of this item.
Tue 17 Jul 2012 04:07:24 PM UTC, original submission:

I was editing a file on a full partition. Attempting to save it yielded an error that the device was full, which was ok. The problem is that this left the file on disk in a zero byte state. This should not happen.

Clarence Risher <sparr>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #30464:  core.xz added by ballsystemlord (51KiB - application/x-xz)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by ballsystemlord (Updated the item)
  • -unavailable- added by astyanax (Posted a comment)
  • -unavailable- added by sparr (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 05 Feb 2014 05:32:25 PM UTCballsystemlordAttached File-=>Added core.xz, #30464
    Thu 10 Jan 2013 03:56:53 AM UTCastyanaxSeverity3 - Normal=>4 - Important
      StatusNone=>Need Info
      Assigned toNone=>astyanax

    Back to the top

    Powered by Savane 3.1-cleanup1