Debian Bug report logs - #617299
dpkg-deb: should give a hint when it fails due to filling /tmp

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg.

Reported by: Yann Dirson <ydirson@free.fr>

Date: Mon, 7 Mar 2011 22:24:01 UTC

Severity: normal

Found in versions dpkg/1.15.8.10, dpkg/1.16.4.3

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Mon, 07 Mar 2011 22:24:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Yann Dirson <ydirson@free.fr>:
New Bug report received and forwarded. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 07 Mar 2011 22:24:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Yann Dirson <ydirson@free.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Mon, 7 Mar 2011 23:21:12 +0100
Package: dpkg
Version: 1.15.8.10
Severity: normal

"dpkg-deb -b" apparently uses some temporary files which can take some
place.  When it fills /tmp, it stops with a "no space left on device"
error, but since it cleans up before exiting, the user is left with
few clues as to where to add space.  An explicit message would be nice.

FWIW, I hit that when using "make deb-pkg" on a linux kernel, using a
debian-derived .config with KALLSYMS activated.  Looks like my initial
install (was it a squeeze CD I used last may ?) has setup a somewhat
ridiculous <.5GB /tmp.

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'oldstable'), (500, 'unstable'), (500, 'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.34.1-00003-ge5b0813-dirty (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages dpkg depends on:
ii  coreutils               8.5-1            GNU core utilities
ii  libbz2-1.0              1.0.5-6          high-quality block-sorting file co
ii  libc6                   2.11.2-11        Embedded GNU C Library: Shared lib
ii  libselinux1             2.0.96-1         SELinux runtime shared libraries
ii  xz-utils                5.0.0-2          XZ-format compression utilities
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                           0.8.11.5   Advanced front-end for dpkg

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Mon, 07 Mar 2011 23:45:10 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Mon, 07 Mar 2011 23:45:10 GMT) Full text and rfc822 format available.

Message #10 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Yann Dirson <ydirson@free.fr>
Cc: 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Mon, 7 Mar 2011 17:42:00 -0600
Hi Yann,

Yann Dirson wrote:

> "dpkg-deb -b" apparently uses some temporary files which can take some
> place.  When it fills /tmp, it stops with a "no space left on device"
> error, but since it cleans up before exiting, the user is left with
> few clues as to where to add space.  An explicit message would be nice.

Makes sense to me.  Could you give a log from when this was triggered?
Ideally using "dpkg-deb --debug" but even if not, a few lines before
that appeared on the console could be useful to figure out which
ohshite() invocation would need to be tweaked.

A more general audit of places dpkg could provide more context when
erroring out for a syscall error sounds like a good idea, but it would
take more time. :/

Hope that helps,
Jonathan




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Tue, 10 Apr 2012 20:39:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dominique Brazziel <dbrazziel@snet.net>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Tue, 10 Apr 2012 20:39:05 GMT) Full text and rfc822 format available.

Message #15 received at 617299@bugs.debian.org (full text, mbox):

From: Dominique Brazziel <dbrazziel@snet.net>
To: 617299@bugs.debian.org
Subject: I hit this same problem building custom kernel
Date: Tue, 10 Apr 2012 16:34:41 -0400
	Per the 'Debian Linux Kernel Handbook' chapter 'Common kernel-related
tasks' (http://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official)
I tried:

make KDEB_PKGVERSION=1.0_xxx deb-pkg 

and the build went OK until the final step(s) to produce the 
image .deb file:

dpkg-deb: building package `linux-headers-3.2.12' in
`../linux-headers-3.2.12_1.0-interatom_i386.deb'.
dpkg-deb: building package `linux-libc-dev' in
`../linux-libc-dev_1.0-interatom_i386.deb'.
dpkg-deb: building package `linux-image-3.2.12' in
`../linux-image-3.2.12_1.0-interatom_i386.deb'.
dpkg-deb (subprocess): data member: internal gzip write error: 'No space
left on device'
dpkg-deb: error: subprocess <compress> from tar -cf returned error exit
status 2
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2
Command exited with non-zero status 2

This was the first time I tried this method, I've been using 
make-kpkg for years without a problem.  Like the OP, my /tmp
size was low, 200 megabytes to be precise.  The 200M was derived from
the value of '/etc/default/tmpfs' as 20% of RAM, but that value used to
be 50% IIRC.  The make-kpkg method had no problem with 20%, but with
that method one can specify to build the image only, but the 'deb-pkg'
target apparently builds header and libc6-dev packages without one
asking for them and this may have something to do with lots of
additional space being allocated.

     Even after specifying env TMPDIR='/huge/harddrive/directory' the
dpkg-deb space seemed to hang/loop at the same place, though no message
regarding space was emitted, so that may have been a different problem.
In any event, more verbose messages seem warranted.  







Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 06:21:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martin-Éric Racine <martin-eric.racine@iki.fi>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 06:21:05 GMT) Full text and rfc822 format available.

Message #20 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Debian Bug Tracking System <617299@bugs.debian.org>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 01:56:55 +0300
Package: dpkg
Version: 1.16.4.3
Followup-For: Bug #617299

I also encounter the same bug when trying to build kernel 3.2.21 from upstream tarball:

$ LOCALVERSION=-git-686-pae make deb-pkg
[...]
dpkg-deb: building package `firmware-linux' in `../firmware-linux_3.2.21-git-686-pae-1_i386.deb'.
dpkg-deb: building package `linux-headers-3.2.21-git-686-pae' in `../linux-headers-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_3.2.21-git-686-pae-1_i386.deb'.
dpkg-deb: building package `linux-image-3.2.21-git-686-pae' in `../linux-image-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
dpkg-deb (subprocess): data member: internal gzip write error: 'File not found'
dpkg-deb: error: subprocess <compress> from tar -cf returned error exit status 2
make[1]: *** [deb-pkg] Error 2
make: *** [deb-pkg] Error 2

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (1001, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.5.0-rc6-686-pae (SMP w/2 CPU cores)
Locale: LANG=fi_FI.utf8, LC_CTYPE=fi_FI.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg depends on:
ii  libbz2-1.0   1.0.6-3
ii  libc6        2.13-33
ii  liblzma5     5.1.1alpha+20120614-1
ii  libselinux1  2.1.9-5
ii  tar          1.26-4
ii  zlib1g       1:1.2.7.dfsg-13

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt  0.9.7.1

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 19:36:38 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 19:36:38 GMT) Full text and rfc822 format available.

Message #25 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Debian Bug Tracking System <617299@bugs.debian.org>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 20:46:51 +0300
2012/7/13 Martin-Éric Racine <martin-eric.racine@iki.fi>:
> Package: dpkg
> Version: 1.16.4.3
> Followup-For: Bug #617299
>
> I also encounter the same bug when trying to build kernel 3.2.21 from upstream tarball:
>
> $ LOCALVERSION=-git-686-pae make deb-pkg
> [...]
> dpkg-deb: building package `firmware-linux' in `../firmware-linux_3.2.21-git-686-pae-1_i386.deb'.
> dpkg-deb: building package `linux-headers-3.2.21-git-686-pae' in `../linux-headers-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
> dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_3.2.21-git-686-pae-1_i386.deb'.
> dpkg-deb: building package `linux-image-3.2.21-git-686-pae' in `../linux-image-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
> dpkg-deb (subprocess): data member: internal gzip write error: 'File not found'
> dpkg-deb: error: subprocess <compress> from tar -cf returned error exit status 2
> make[1]: *** [deb-pkg] Error 2
> make: *** [deb-pkg] Error 2

This seems to be caused by either 'tar' or 'gzip' using /tmp to build
the package. Since recent Debian systems default to using tmpfs for
/tmp, systems with insufficient memory or with another process using
all available memory resources will make the build fail. Would there
perhaps be a way to make this process use /var/tmp or some other
normal storage space to avoid these nonsensical failures?




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 19:36:40 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 19:36:40 GMT) Full text and rfc822 format available.

Message #30 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Debian Bug Tracking System <617299@bugs.debian.org>, debian-kernel@lists.debian.org, 617299-submitter@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 22:03:42 +0300
2012/7/13 Martin-Éric Racine <martin-eric.racine@iki.fi>:
> 2012/7/13 Martin-Éric Racine <martin-eric.racine@iki.fi>:
>> Package: dpkg
>> Version: 1.16.4.3
>> Followup-For: Bug #617299
>>
>> I also encounter the same bug when trying to build kernel 3.2.21 from upstream tarball:
>>
>> $ LOCALVERSION=-git-686-pae make deb-pkg
>> [...]
>> dpkg-deb: building package `firmware-linux' in `../firmware-linux_3.2.21-git-686-pae-1_i386.deb'.
>> dpkg-deb: building package `linux-headers-3.2.21-git-686-pae' in `../linux-headers-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
>> dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_3.2.21-git-686-pae-1_i386.deb'.
>> dpkg-deb: building package `linux-image-3.2.21-git-686-pae' in `../linux-image-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
>> dpkg-deb (subprocess): data member: internal gzip write error: 'File not found'
>> dpkg-deb: error: subprocess <compress> from tar -cf returned error exit status 2
>> make[1]: *** [deb-pkg] Error 2
>> make: *** [deb-pkg] Error 2
>
> This seems to be caused by either 'tar' or 'gzip' using /tmp to build
> the package. Since recent Debian systems default to using tmpfs for
> /tmp, systems with insufficient memory or with another process using
> all available memory resources will make the build fail. Would there
> perhaps be a way to make this process use /var/tmp or some other
> normal storage space to avoid these nonsensical failures?

Actually, this feels like an upstream kernel 3.2 bug: as a test, I
purposely disabled TMPFS for /tmp just to see if the kernel package
would finally build as expected. It did, except that the resulting DEB
is a whopping 488MB in size, compared to 22MB for the stock Debian
linux-image-3.2.0-3-686-pae built using the exact same .config file.

When I built another kernel using the 3.5-rc6 tree instead, the build
produced a kernel package similar in size to the stock Debian one, so
I suspect that the issue lies in kernel 3.2's build scripts and was
evidently fixed recently.

Would the people on debian-kernel@l.d.o perhaps know more about this?

Martin-Éric




Message sent on to Yann Dirson <ydirson@free.fr>:
Bug#617299. (Fri, 13 Jul 2012 19:38:38 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 19:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 19:45:03 GMT) Full text and rfc822 format available.

Message #38 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: martin-eric.racine@iki.fi
Cc: 617299@bugs.debian.org, debian-kernel@lists.debian.org, 617299-submitter@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 14:41:29 -0500
Hi,

Martin-Éric Racine wrote:

> Actually, this feels like an upstream kernel 3.2 bug: as a test, I
> purposely disabled TMPFS for /tmp just to see if the kernel package
> would finally build as expected. It did, except that the resulting DEB
> is a whopping 488MB in size, compared to 22MB for the stock Debian
> linux-image-3.2.0-3-686-pae built using the exact same .config file.

That's because the Debian packaging strips debugging symbols into a
separate -dbg package.

If you use "scripts/config --disable DEBUG_INFO" (or manually make the
same setting in "make nconfig"), both the build tree and the resulting
deb will be much smaller.

Hope that helps,
Jonathan




Message sent on to Yann Dirson <ydirson@free.fr>:
Bug#617299. (Fri, 13 Jul 2012 19:45:11 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 19:51:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 19:51:06 GMT) Full text and rfc822 format available.

Message #46 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: 617299@bugs.debian.org, debian-kernel@lists.debian.org, 617299-submitter@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 22:47:08 +0300
2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> Hi,
>
> Martin-Éric Racine wrote:
>
>> Actually, this feels like an upstream kernel 3.2 bug: as a test, I
>> purposely disabled TMPFS for /tmp just to see if the kernel package
>> would finally build as expected. It did, except that the resulting DEB
>> is a whopping 488MB in size, compared to 22MB for the stock Debian
>> linux-image-3.2.0-3-686-pae built using the exact same .config file.
>
> That's because the Debian packaging strips debugging symbols into a
> separate -dbg package.

I'm already aware of the effects of stripping binaries. However, you
gotta admit that 488MB compared to 22MB is just ridiculous; something
is definitely broken in those 3.2 build scripts.

Martin-Éric




Message sent on to Yann Dirson <ydirson@free.fr>:
Bug#617299. (Fri, 13 Jul 2012 19:51:15 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:06:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:06:04 GMT) Full text and rfc822 format available.

Message #54 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 23:02:57 +0300
(putting back the CC to the bug, which will probably need to be
reassigned to 'linux')
2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> (dropping dpkg maintainers from cc)
> Martin-Éric Racine wrote:
>> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>>> Martin-Éric Racine wrote:
>
>>>>                                                      the resulting DEB
>>>> is a whopping 488MB in size, compared to 22MB for the stock Debian
>>>> linux-image-3.2.0-3-686-pae built using the exact same .config file.
>>>
>>> That's because the Debian packaging strips debugging symbols into a
>>> separate -dbg package.
>>
>> I'm already aware of the effects of stripping binaries. However, you
>> gotta admit that 488MB compared to 22MB is just ridiculous; something
>> is definitely broken in those 3.2 build scripts.
>
> Are the build scripts responsible for the size of debugging symbols?
> I don't follow.
>
> Or do you mean that the size of the kernel -dbg packages is
> ridiculous?

I mean that the size of the kernel package produced by 'make deb-pkg'
from the 3.2 vanilla tree, even after disabling debug symbols, is
highly suspicious, compared to the stock Debian kernel with the same
source.

Martin-Éric




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:06:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Cyril Brulebois <kibi@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:06:06 GMT) Full text and rfc822 format available.

Message #59 received at 617299@bugs.debian.org (full text, mbox):

From: Cyril Brulebois <kibi@debian.org>
To: martin-eric.racine@iki.fi, 617299@bugs.debian.org
Subject: Re: Bug#617299: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 21:45:44 +0200
[Message part 1 (text/plain, inline)]
Martin-Éric Racine <martin-eric.racine@iki.fi> (13/07/2012):
> This seems to be caused by either 'tar' or 'gzip' using /tmp to build
> the package. Since recent Debian systems default to using tmpfs for
> /tmp, systems with insufficient memory or with another process using
> all available memory resources will make the build fail. Would there
> perhaps be a way to make this process use /var/tmp or some other
> normal storage space to avoid these nonsensical failures?

Manpage reading time:

       TMPDIR If set, dpkg will use it as the directory  in  which  to  create
              temporary files and directories.

Mraw,
KiBi.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:09:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:09:03 GMT) Full text and rfc822 format available.

Message #64 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 15:07:21 -0500
Martin-Éric Racine wrote:
> (putting back the CC to the bug, which will probably need to be
> reassigned to 'linux')
> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>> (dropping dpkg maintainers from cc)
>> Martin-Éric Racine wrote:

>>> I'm already aware of the effects of stripping binaries. However, you
>>> gotta admit that 488MB compared to 22MB is just ridiculous; something
>>> is definitely broken in those 3.2 build scripts.
>>
>> Are the build scripts responsible for the size of debugging symbols?
>> I don't follow.
>>
>> Or do you mean that the size of the kernel -dbg packages is
>> ridiculous?
>
> I mean that the size of the kernel package produced by 'make deb-pkg'
> from the 3.2 vanilla tree, even after disabling debug symbols, is
> highly suspicious, compared to the stock Debian kernel with the same
> source.

Ok, I missed that.  What is that size?

Just to confirm, are you certain CONFIG_DEBUG_INFO is disabled?




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:24:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:24:03 GMT) Full text and rfc822 format available.

Message #69 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 23:21:15 +0300
2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> Martin-Éric Racine wrote:
>> (putting back the CC to the bug, which will probably need to be
>> reassigned to 'linux')
>> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>>> (dropping dpkg maintainers from cc)
>>> Martin-Éric Racine wrote:
>
>>>> I'm already aware of the effects of stripping binaries. However, you
>>>> gotta admit that 488MB compared to 22MB is just ridiculous; something
>>>> is definitely broken in those 3.2 build scripts.
>>>
>>> Are the build scripts responsible for the size of debugging symbols?
>>> I don't follow.
>>>
>>> Or do you mean that the size of the kernel -dbg packages is
>>> ridiculous?
>>
>> I mean that the size of the kernel package produced by 'make deb-pkg'
>> from the 3.2 vanilla tree, even after disabling debug symbols, is
>> highly suspicious, compared to the stock Debian kernel with the same
>> source.
>
> Ok, I missed that.  What is that size?

As written above, the custom package came out to 488MB compared to
22MB for linux-image-3.2.0-3-686-pae from Wheezy.

> Just to confirm, are you certain CONFIG_DEBUG_INFO is disabled?

Yup.

Martin-Éric




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:33:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:33:08 GMT) Full text and rfc822 format available.

Message #74 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 15:29:56 -0500
Martin-Éric Racine wrote:
> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:

>> Just to confirm, are you certain CONFIG_DEBUG_INFO is disabled?
>
> Yup.

Ok.  Please attach your .config so we can reproduce this.




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:39:03 GMT) Full text and rfc822 format available.

Message #79 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 23:34:29 +0300
2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> Martin-Éric Racine wrote:
>> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>
>>> Just to confirm, are you certain CONFIG_DEBUG_INFO is disabled?
>>
>> Yup.
>
> Ok.  Please attach your .config so we can reproduce this.

I have already stated that the .config is copied as-is from the stock
Debian 3.2 kernel's config. The only change I made was to disable
debug symbols, as above, and to patch one gspca C file as asked by
upstream for a test.

Martin-Éric




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 20:42:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 20:42:06 GMT) Full text and rfc822 format available.

Message #84 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 15:37:58 -0500
Martin-Éric Racine wrote:

> I have already stated that the .config is copied as-is from the stock
> Debian 3.2 kernel's config.

Oh, interesting.

May we have a debdiff of the binary packages, too?




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Fri, 13 Jul 2012 21:06:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Fri, 13 Jul 2012 21:06:03 GMT) Full text and rfc822 format available.

Message #89 received at 617299@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: Jonathan Nieder <jrnieder@gmail.com>, debian-kernel@lists.debian.org, 617299@bugs.debian.org
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Fri, 13 Jul 2012 21:46:22 +0100
On Fri, Jul 13, 2012 at 11:02:57PM +0300, Martin-Éric Racine wrote:
> (putting back the CC to the bug, which will probably need to be
> reassigned to 'linux')
> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> > (dropping dpkg maintainers from cc)
> > Martin-Éric Racine wrote:
> >> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
> >>> Martin-Éric Racine wrote:
> >
> >>>>                                                      the resulting DEB
> >>>> is a whopping 488MB in size, compared to 22MB for the stock Debian
> >>>> linux-image-3.2.0-3-686-pae built using the exact same .config file.
> >>>
> >>> That's because the Debian packaging strips debugging symbols into a
> >>> separate -dbg package.
> >>
> >> I'm already aware of the effects of stripping binaries. However, you
> >> gotta admit that 488MB compared to 22MB is just ridiculous; something
> >> is definitely broken in those 3.2 build scripts.
> >
> > Are the build scripts responsible for the size of debugging symbols?
> > I don't follow.
> >
> > Or do you mean that the size of the kernel -dbg packages is
> > ridiculous?
> 
> I mean that the size of the kernel package produced by 'make deb-pkg'
> from the 3.2 vanilla tree, even after disabling debug symbols, is
> highly suspicious, compared to the stock Debian kernel with the same
> source.

Did you actually rebuild with CONFIG_DEBUG_INFO off, or did you
only re-run 'make deb-pkg'?

Ben.

-- 
Ben Hutchings
We get into the habit of living before acquiring the habit of thinking.
                                                              - Albert Camus




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 04:54:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 04:54:06 GMT) Full text and rfc822 format available.

Message #94 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: Jonathan Nieder <jrnieder@gmail.com>, debian-kernel@lists.debian.org, 617299@bugs.debian.org, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 07:51:14 +0300
2012/7/13 Ben Hutchings <ben@decadent.org.uk>:
> On Fri, Jul 13, 2012 at 11:02:57PM +0300, Martin-Éric Racine wrote:
>> (putting back the CC to the bug, which will probably need to be
>> reassigned to 'linux')
>> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>> > (dropping dpkg maintainers from cc)
>> > Martin-Éric Racine wrote:
>> >> 2012/7/13 Jonathan Nieder <jrnieder@gmail.com>:
>> >>> Martin-Éric Racine wrote:
>> >
>> >>>>                                                      the resulting DEB
>> >>>> is a whopping 488MB in size, compared to 22MB for the stock Debian
>> >>>> linux-image-3.2.0-3-686-pae built using the exact same .config file.
>> >>>
>> >>> That's because the Debian packaging strips debugging symbols into a
>> >>> separate -dbg package.
>> >>
>> >> I'm already aware of the effects of stripping binaries. However, you
>> >> gotta admit that 488MB compared to 22MB is just ridiculous; something
>> >> is definitely broken in those 3.2 build scripts.
>> >
>> > Are the build scripts responsible for the size of debugging symbols?
>> > I don't follow.
>> >
>> > Or do you mean that the size of the kernel -dbg packages is
>> > ridiculous?
>>
>> I mean that the size of the kernel package produced by 'make deb-pkg'
>> from the 3.2 vanilla tree, even after disabling debug symbols, is
>> highly suspicious, compared to the stock Debian kernel with the same
>> source.
>
> Did you actually rebuild with CONFIG_DEBUG_INFO off, or did you
> only re-run 'make deb-pkg'?

The plot thickens:

If I disable CONFIG_DEBUG_INFO again just before building, the kernel
indeed is MUCH smaller (I had probably forgotten to disable it before
attempting a new build; sorry for the confusion) and it easily builds
within the space allocated for /tmp using sysfs via initscripts.
However, it still comes out at about 8MB larger than the equivalent
stock Debian kernel:

-rw-r--r-- 1 perkelix perkelix 22M Jun 28 15:03
linux-image-3.2.0-3-686-pae_3.2.21-3_i386.deb
-rw-r--r-- 1 perkelix perkelix 30M Jul 14 01:31
linux-image-3.2.21-vanilla-686-pae_3.2.21-vanilla-686-pae-1_i386.deb

This is of course a minor issue at this point and something that can
be discussed separately from this bug. :)

As for bug #617299, the actual cause is three-folds:

1) Starting with Wheezy, /tmp is mounted as a tmpfs whose size is
determined by initscripts to 20% of available memory. On my laptop
with a modest 1GB of RAM, this meant a /tmp sized at 200MB.

2) As it happens, 'dpkg-deb -b' uses /tmp (unless somewhere else is
specified using TMPDIR) as temporary space to compress packages while
building them.

3) Whenever building a kernel using 'make deb-pkg' without first
having disabled CONFIG_DEBUG_INFO, the resulting *.deb can easily near
500MB in size using the stock .config on x86. This obviously exceeds
the available /tmp space allocated as tmpfs via initscripts, which is
how gzip ends up outputing the above error message about "No space
left on device" or "File not found" despite plenty of hard-disk space
being available.

The solution to bug #617299 is therefore to either define TMPDIR to
some actual hard-disk with sufficient storage space via a commandline
environment e.g. 'TMPDIR=/var/tmp make deb-pkg' whenever using
commands that require an unusually large amount of /tmp space, or to
completely disable the usage of a tmpfs for /tmp via initscripts
defaults in /etc/defaults/rcS and /etc/defaults/tmpfs, as appropriate.

Martin-Éric




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ben Hutchings <ben@decadent.org.uk>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:03:02 GMT) Full text and rfc822 format available.

Message #99 received at 617299@bugs.debian.org (full text, mbox):

From: Ben Hutchings <ben@decadent.org.uk>
To: martin-eric.racine@iki.fi
Cc: Jonathan Nieder <jrnieder@gmail.com>, debian-kernel@lists.debian.org, 617299@bugs.debian.org, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 05:58:58 +0100
[Message part 1 (text/plain, inline)]
On Sat, 2012-07-14 at 07:51 +0300, Martin-Éric Racine wrote:
> 2012/7/13 Ben Hutchings <ben@decadent.org.uk>:
[...]
> If I disable CONFIG_DEBUG_INFO again just before building, the kernel
> indeed is MUCH smaller (I had probably forgotten to disable it before
> attempting a new build; sorry for the confusion) and it easily builds
> within the space allocated for /tmp using sysfs via initscripts.
> However, it still comes out at about 8MB larger than the equivalent
> stock Debian kernel:
> 
> -rw-r--r-- 1 perkelix perkelix 22M Jun 28 15:03
> linux-image-3.2.0-3-686-pae_3.2.21-3_i386.deb
> -rw-r--r-- 1 perkelix perkelix 30M Jul 14 01:31
> linux-image-3.2.21-vanilla-686-pae_3.2.21-vanilla-686-pae-1_i386.deb

Official packages are now compressed with xz whereas deb-pkg uses gzip.

> This is of course a minor issue at this point and something that can
> be discussed separately from this bug. :)
> 
> As for bug #617299, the actual cause is three-folds:
> 
> 1) Starting with Wheezy, /tmp is mounted as a tmpfs whose size is
> determined by initscripts to 20% of available memory. On my laptop
> with a modest 1GB of RAM, this meant a /tmp sized at 200MB.
[...]

This was reverted in version of 2.88dsf-26 of initscripts, due to issues
like this.  I'm not sure all systems will get automatically changed back
though.

Ben.

-- 
Ben Hutchings
The generation of random numbers is too important to be left to chance.
                                                            - Robert Coveyou
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:12:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:12:03 GMT) Full text and rfc822 format available.

Message #104 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: Ben Hutchings <ben@decadent.org.uk>, debian-kernel@lists.debian.org, 617299@bugs.debian.org, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 00:09:23 -0500
clone 617299 -1
retitle -1 kernel-handbook: encourage disabling DEBUG_INFO and setting TMPDIR
submitter -1 !
reassign -1 debian-kernel-handbook 1.0.13
quit

Martin-Éric Racine wrote:

> The solution to bug #617299 is therefore to either define TMPDIR to
> some actual hard-disk with sufficient storage space via a commandline
> environment e.g. 'TMPDIR=/var/tmp make deb-pkg' whenever using
> commands that require an unusually large amount of /tmp space, or to
> completely disable the usage of a tmpfs for /tmp via initscripts
> defaults in /etc/defaults/rcS and /etc/defaults/tmpfs, as appropriate.

Sort of.  It's still a dpkg (wishlist?) bug.  I would even think it
might be possible for dpkg-deb to write its output directly to the
expected target path or another file in the same directory.

Cloning as a reminder to recommend setting TMPDIR in the kernel
handbook.

Thanks,
Jonathan




Bug 617299 cloned as bug 681550 Request was from Jonathan Nieder <jrnieder@gmail.com> to control@bugs.debian.org. (Sat, 14 Jul 2012 05:12:07 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to martin-eric.racine@iki.fi:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:27:03 GMT) Full text and rfc822 format available.

Message #111 received at 617299@bugs.debian.org (full text, mbox):

From: Martin-Éric Racine <martin-eric.racine@iki.fi>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Ben Hutchings <ben@decadent.org.uk>, 617299@bugs.debian.org, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 08:24:23 +0300
(dropping debian-kernel from CC as we're back to discussing the dpkg
issue itself)
2012/7/14 Jonathan Nieder <jrnieder@gmail.com>:
> clone 617299 -1
> retitle -1 kernel-handbook: encourage disabling DEBUG_INFO and setting TMPDIR
> submitter -1 !
> reassign -1 debian-kernel-handbook 1.0.13
> quit
>
> Martin-Éric Racine wrote:
>
>> The solution to bug #617299 is therefore to either define TMPDIR to
>> some actual hard-disk with sufficient storage space via a commandline
>> environment e.g. 'TMPDIR=/var/tmp make deb-pkg' whenever using
>> commands that require an unusually large amount of /tmp space, or to
>> completely disable the usage of a tmpfs for /tmp via initscripts
>> defaults in /etc/defaults/rcS and /etc/defaults/tmpfs, as appropriate.
>
> Sort of.  It's still a dpkg (wishlist?) bug.  I would even think it
> might be possible for dpkg-deb to write its output directly to the
> expected target path or another file in the same directory.

Writing to the target path would indeed make sense. Just a wild guess,
but dpkg probably uses /tmp because, by definition, it's guaranteed to
be temporary and deleted upon reboot, whereas writing to target path
might leave an increasing amount of cruft whenever a build repeatedly
fails.

Still, as the original reporter complained, blindly trying to figure
out why a package repeatedly fails to build with "No space left" -
even though it compiled succesfully - on a hard-disk with several GB
of space, when it turns out that it's simply because dpkg uses as a
scratchpad a /tmp that happens to be mounted as a small tmpfs, is a
genuine problem. I am curious to hear what dpkg developers have to say
about solving this particular one.

Martin-Éric




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:27:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Nieder <jrnieder@gmail.com>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:27:04 GMT) Full text and rfc822 format available.

Message #116 received at 617299@bugs.debian.org (full text, mbox):

From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin-Éric Racine <martin-eric.racine@iki.fi>
Cc: Ben Hutchings <ben@decadent.org.uk>, 617299@bugs.debian.org, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 00:26:14 -0500
Martin-Éric Racine wrote:

> Still, as the original reporter complained, blindly trying to figure
> out why a package repeatedly fails to build with "No space left" -
> even though it compiled succesfully - on a hard-disk with several GB
> of space, when it turns out that it's simply because dpkg uses as a
> scratchpad a /tmp that happens to be mounted as a small tmpfs, is a
> genuine problem. I am curious to hear what dpkg developers have to say
> about solving this particular one.

I'm guessing they say "patches welcome"?

:)
Jonathan

I also suggested earlier that output from dpkg-deb --debug would be
helpful in solving this, but no one took up the offer.




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:39:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:39:03 GMT) Full text and rfc822 format available.

Message #121 received at 617299@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 617299@bugs.debian.org
Subject: Re: Bug#617299: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 07:29:34 +0200
On Sat, 2012-07-14 at 00:09:23 -0500, Jonathan Nieder wrote:
> Martin-Éric Racine wrote:
> > The solution to bug #617299 is therefore to either define TMPDIR to
> > some actual hard-disk with sufficient storage space via a commandline
> > environment e.g. 'TMPDIR=/var/tmp make deb-pkg' whenever using
> > commands that require an unusually large amount of /tmp space, or to
> > completely disable the usage of a tmpfs for /tmp via initscripts
> > defaults in /etc/defaults/rcS and /etc/defaults/tmpfs, as appropriate.
> 
> Sort of.  It's still a dpkg (wishlist?) bug.  I would even think it
> might be possible for dpkg-deb to write its output directly to the
> expected target path or another file in the same directory.

Yes, it's possible, and it's on my TODO list pending merging some ar
code refactoring. The code needs to rewind the file descriptor to write
out the ar header for the final tar member size. WHich will imply way
faster .deb generation as the output will be only written once instead
of copyig data over multiple times.

thanks,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Sat, 14 Jul 2012 05:57:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Guillem Jover <guillem@debian.org>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Sat, 14 Jul 2012 05:57:09 GMT) Full text and rfc822 format available.

Message #126 received at 617299@bugs.debian.org (full text, mbox):

From: Guillem Jover <guillem@debian.org>
To: Jonathan Nieder <jrnieder@gmail.com>, 617299@bugs.debian.org
Cc: Martin-Éric Racine <martin-eric.racine@iki.fi>, Ben Hutchings <ben@decadent.org.uk>, Dominique Brazziel <dbrazziel@snet.net>, Yann Dirson <ydirson@free.fr>
Subject: Re: Bug#617299: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Sat, 14 Jul 2012 07:56:31 +0200
On Sat, 2012-07-14 at 00:26:14 -0500, Jonathan Nieder wrote:
> Martin-Éric Racine wrote:
> 
> > Still, as the original reporter complained, blindly trying to figure
> > out why a package repeatedly fails to build with "No space left" -
> > even though it compiled succesfully - on a hard-disk with several GB
> > of space, when it turns out that it's simply because dpkg uses as a
> > scratchpad a /tmp that happens to be mounted as a small tmpfs, is a
> > genuine problem. I am curious to hear what dpkg developers have to say
> > about solving this particular one.

While, as mentioned on the other mail, I agree dpkg could do better
to avoid the need to use temporary files in most of these cases, I do
think getting a “No space left” error due to small /tmp is either a
system misconfiguration error in case of default, or user error for
not using an alternate TMPDIR in case that was an explicit setup.

> I also suggested earlier that output from dpkg-deb --debug would be
> helpful in solving this, but no one took up the offer.

That would not have helped much as dpkg-deb does not have any actual
debug reporting, only the option parsing. :)

I've noted to fix this on my TODO for 1.17.x.

thanks,
guillem




Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Wed, 18 Jul 2012 10:57:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Goswin von Brederlow <goswin-v-b@web.de>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 18 Jul 2012 10:57:04 GMT) Full text and rfc822 format available.

Message #131 received at 617299@bugs.debian.org (full text, mbox):

From: Goswin von Brederlow <goswin-v-b@web.de>
To: martin-eric.racine@iki.fi, 617299@bugs.debian.org
Subject: Re: Bug#617299: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Wed, 18 Jul 2012 12:54:32 +0200
On Fri, Jul 13, 2012 at 08:46:51PM +0300, Martin-Éric Racine wrote:
> 2012/7/13 Martin-Éric Racine <martin-eric.racine@iki.fi>:
> > Package: dpkg
> > Version: 1.16.4.3
> > Followup-For: Bug #617299
> >
> > I also encounter the same bug when trying to build kernel 3.2.21 from upstream tarball:
> >
> > $ LOCALVERSION=-git-686-pae make deb-pkg
> > [...]
> > dpkg-deb: building package `firmware-linux' in `../firmware-linux_3.2.21-git-686-pae-1_i386.deb'.
> > dpkg-deb: building package `linux-headers-3.2.21-git-686-pae' in `../linux-headers-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
> > dpkg-deb: building package `linux-libc-dev' in `../linux-libc-dev_3.2.21-git-686-pae-1_i386.deb'.
> > dpkg-deb: building package `linux-image-3.2.21-git-686-pae' in `../linux-image-3.2.21-git-686-pae_3.2.21-git-686-pae-1_i386.deb'.
> > dpkg-deb (subprocess): data member: internal gzip write error: 'File not found'
> > dpkg-deb: error: subprocess <compress> from tar -cf returned error exit status 2
> > make[1]: *** [deb-pkg] Error 2
> > make: *** [deb-pkg] Error 2
> 
> This seems to be caused by either 'tar' or 'gzip' using /tmp to build
> the package. Since recent Debian systems default to using tmpfs for
> /tmp, systems with insufficient memory or with another process using
> all available memory resources will make the build fail. Would there
> perhaps be a way to make this process use /var/tmp or some other
> normal storage space to avoid these nonsensical failures?

No, switching to /var/tmp would make no sense and would in no way fix
the bug. Nothing garanties that /tmp has enough space or that /var/tmp
would have enough space or the build directory. Applications have to
deal with ENOSPC properly.

The bug here is that the error message makes little sense. It should
properly respond with "No space left on device" and hopefully give
a hint that the device in question is /tmp.

And the trigger seems to be the excess size of the build, see other
mails. But fixing that is just doctoring the symptoms.

MfG
	Goswin



Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#617299; Package dpkg. (Wed, 22 May 2013 15:51:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to calculus@rezozer.net:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>. (Wed, 22 May 2013 15:51:09 GMT) Full text and rfc822 format available.

Message #136 received at 617299@bugs.debian.org (full text, mbox):

From: Jerome BENOIT <calculus@rezozer.net>
To: 617299@bugs.debian.org
Subject: Re: Bug#617299: dpkg-deb: should give a hint when it fails due to filling /tmp
Date: Wed, 22 May 2013 16:47:04 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have just experienced this issue:
it appeared that dpkg-deb does honours TMPDIR,
but that the used devscript which calls it does not
pass the TMPDIR environment variable.
The involved devscript is debuild : TMPDIR has to be preserved.

So, either the issue was fixed or the issue is rather a calling issue.

On my Wheezy box:
$ dpkg-deb --version
Debian `dpkg-deb' package archive backend version 1.16.10 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.


hth,
Jerome

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJRnNpoAAoJEIC/w4IMSybjuJgIAIOz94SSl/yoSoSp97F7sGMd
LaYA/iXSSHPayO6Ve3Kfh2aHO3dBdJk3tkof+SBqBpLQ94CiCcWI4VoHutMv7Zx4
Bjv7MfejPZ22vJ3anrqmP96TPcdtfhtnJwJbuEHpO3JlbSZg4pH9v5HZHN7cvHrc
Esk1eB1+QGN8Iqzk10oHpmcbS1RodS8Nm/11INBtaarEpGHLyIsjvpuwMY5hfi/k
Y6J1QG9gERwg0tBznMQkRLM/BsUFRT4S4Fpyaee2huo68h89WU3EVHpetGtIeOsi
GUzkCPhhU/WC+a0o4qhoY911z/6ZUK8kS3zz6fn2avvgMRe4hoTjfPbZBDcShOQ=
=/qAH
-----END PGP SIGNATURE-----



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 05:22:47 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.