[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#756619: apt-get update: SIGBUS when run out of disk space



* Julian Andres Klode <jak@jak-linux.org>, 2014-08-01, 19:57:
# apt-get update
Hit http://ftp.debian.org unstable InRelease
Hit http://ftp.debian.org unstable/main amd64 Packages/DiffIndex
Bus error (core dumped). 60%

I just wonder how this happens. APT is writing to an mmap. That mmap has been allocated on the disk already, so it should not fail, unless the FS lied and has no space anymore, despite having promised it to APT, or am I wrong?

How does apt allocate the space? In the DynamicMMap constructor I see:

     Fd->Seek(WorkSpace - 1);
     char C = 0;
     Fd->Write(&C,sizeof(C));

which would create just a sparse file. Maybe posix_fallocate(3) is needed instead?

(But I'm not familiar with apt codebase, so maybe I'm looking at the completely wrong place.)

--
Jakub Wilk


Reply to: