Package: fakeroot Version: 1.20.2-1 Severity: normal Tags: patch Dear Maintainer,
I'm trying to track down an intermittent failure that originally presented like this: dh_md5sums dh_builddeb -- -Znone dpkg-deb: building package `mercury-main-4604p00p1099' in `../mercury-main-4604p00p1099_14.1.4604.00.1099_amd64.deb'. dpkg-deb: building package `mercury-main-4604p00p1099-dbg' in `../mercury-main-4604p00p1099-dbg_14.1.4604.00.1099_amd64.deb'. semop(1): encountered an error: Invalid argument debian/rules:57: recipe for target 'binary-arch' failed make[8]: *** [binary-arch] Error 1 /usr/bin/fakeroot: line 1: kill: (6633) - No such process dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 I've got fakeroot now lashed up to run with debugging. Now the presentation is like this: FAKEROOT: r=320, received message type=1, message=3 FAKEROOT: process stat oldstate=dev:ino=(801:1661605), mode=0100644, own=(0,0), nlink=1, rdev=0 FAKEROOT: (previously unknown) FAKEROOT: r=320, received message type=1, message=3 FAKEROOT: process stat oldstate=dev:ino=(801:1300078), mode=0100644, own=(0,0), nlink=1, rdev=0 FAKEROOT: (previously unknown) semop(1): encountered an error: Invalid argument debian/rules:57: recipe for target 'binary-arch' failed make[8]: *** [binary-arch] Error 1 make[8]: Leaving directory '/u/u645/usdevadmin/work/dragon/1/packages/debian/mercury/ip6tables/x86_64_linux_libc-2.19_release/mercury-ip6tables-4604p00p1099' FAKEROOT: r=-1, received message type=1, message=3 FAKEROOT: process stat oldstate=dev:ino=(801:1300078), mode=0100644, own=(0,0), nlink=1, rdev=0 FAKEROOT: (previously unknown) libfakeroot, when sending message: Invalid argument FAKEROOT, get_msg: Invalid argument r=22, EINTR=4 fakeroot: clearing up message queues and semaphores, signal=-1 /usr/bin/fakeroot: line 1: kill: (4317) - No such process dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2 The r=22, EINTR=4 line is telling me that whatever last set errno had got EINVAL: /usr/include/asm-generic/errno-base.h:#define EINVAL 22 /* Invalid argument */ I notice above that, even though msgrcv failed, faked called process stat with the same arguments as given in the previous message. The indentation of the source suggests that this was not the author's intent. It seems unlikely to be correct. Seeing this seeming bug still present in: https://anonscm.debian.org/cgit/users/clint/fakeroot.git/tree/faked.c I enclose a patch to address that. I don't know at this juncture whether it fixes my original problem. I doubt it but fingers crossed. -- System Information: Debian Release: 8.6 APT prefers stable-updates APT policy: (990, 'stable-updates'), (990, 'stable'), (500, 'oldstable-updates'), (500, 'oldoldstable'), (500, 'stable'), (500, 'oldstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages fakeroot depends on: ii libc6 2.19-18+deb8u6 ii libfakeroot 1.20.2-1 fakeroot recommends no packages. fakeroot suggests no packages. -- no debconf information
--- faked.c.orig 2017-02-20 16:59:47.614272988 -0800 +++ faked.c 2017-02-20 17:01:06.274709158 -0800 @@ -1079,13 +1079,14 @@ r=msgrcv(msg_get,&buf,sizeof(struct fake_msg),0,0); if(debug) fprintf(stderr,"FAKEROOT: r=%i, received message type=%li, message=%i\n",r,buf.mtype,buf.id); - if(r!=-1) + if(r!=-1) { buf.remote = 0; process_msg(&buf); + } }while ((r!=-1)||(errno==EINTR)); if(debug){ perror("FAKEROOT, get_msg"); - fprintf(stderr,"r=%i, EINTR=%i\n",errno,EINTR); + fprintf(stderr,"errno=%i, EINTR=%i\n",errno,EINTR); } }