Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932101AbVJKPO5 (ORCPT ); Tue, 11 Oct 2005 11:14:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932152AbVJKPOy (ORCPT ); Tue, 11 Oct 2005 11:14:54 -0400 Received: from 68.105.138.210.bn.2iij.net ([210.138.105.68]:57098 "HELO viper2.netfort.gr.jp") by vger.kernel.org with SMTP id S932101AbVJKPOu (ORCPT ); Tue, 11 Oct 2005 11:14:50 -0400 Date: Wed, 12 Oct 2005 00:15:03 +0900 Message-ID: <877jck9jbc.dancerj%dancer@netfort.gr.jp> From: Junichi Uekawa To: Scott James Remnant Cc: Junichi Uekawa , 322309@bugs.debian.org, 329468@bugs.debian.org, debian-devel@bugs.debian.org, linux-kernel@vger.kernel.org, 332903@bugs.debian.org Subject: Re: Bug#322309: Debian woody dpkg no longer works with recent linux kernel. In-Reply-To: <87achg9lnl.dancerj%dancer@netfort.gr.jp> References: <87zmpi3ell.dancerj%dancer@netfort.gr.jp> <1128897196.19000.3.camel@localhost.localdomain> <87achg9lnl.dancerj%dancer@netfort.gr.jp> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/21.4 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1723 Lines: 47 Hi, > > > dpkg in Debian woody (3.0) is broken by recent linux kernels; > > > due to the following command changing behavior (mmap of > > > zero-byte length): > > > > > > addr=mmap(NULL, 0, PROT_READ, MAP_SHARED, fd, 0); > > > > > > These bugs are caused by mmap changing behavior; > > > it used to return NULL when given a length of 0. > > > However, it now returns -1, and gives back an errno=EINVAL. > > > > > Indeed. This was the sole change in the 1.13.8 release. > > 1.13.8 is more recent than sarge; and I'm not quite sure > why sarge successfully installs, and woody fails. Okay, I've verified that dpkg on sarge doesn't call mmap. strace snippet: umask(022) = 022 open("/var/lib/dpkg/status", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 close(3) = 0 open("/var/lib/dpkg/updates/", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 3 fstat(3, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 getdents64(3, /* 2 entries */, 4096) = 48 getdents64(3, /* 0 entries */, 4096) = 0 close(3) = 0 open("/var/lib/dpkg/available", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 close(3) = 0 exit_group(0, 0, 0x2aaaaadfc530, 0x2, 0x2aaaaae00640