Package: binfmt-support
Version: 2.0.8
Severity: serious
User: debian...@lists.debian.org
Usertags: piuparts

Hi,

during a test with piuparts I noticed a failure in the jarwrapper
package whcih I traced to update-binfmts.

To reproduce:
* the host has the kernel module loaded and /proc/sys/fs/binfmt_misc is
  mounted, kernel: 3.2.0-2-amd64
* the chroot is a minimal sid or wheezy chroot and
  /proc/sys/fs/binfmt_misc is not yet mounted, but /proc is mounted
* apt-get install jarwrapper
[...]
Setting up binfmt-support (2.0.9) ...
invoke-rc.d: policy-rc.d denied execution of start.
Setting up fastjar (2:0.98-3) ...
Setting up jarwrapper (0.43) ...
update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: 
Invalid argument
update-binfmts: warning: unable to enable binary format jarwrapper
update-binfmts: exiting due to previous errors
dpkg: error processing jarwrapper (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 jarwrapper
* now /proc/sys/fs/binfmt_misc got mounted and the foloowing succeeds:
* dpkg --configure --pending
Setting up jarwrapper (0.43) ...
The problem can be reproduced inside this chroot easily:

# umount /proc/sys/fs/binfmt_misc/
# update-binfmts --install jarwrapper /usr/bin/jarwrapper --magic 'PK\x03\x04' 
--detector /usr/bin/jardetector
update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: 
Invalid argument
update-binfmts: warning: unable to enable binary format jarwrapper
update-binfmts: exiting due to previous errors
# update-binfmts --install jarwrapper /usr/bin/jarwrapper --magic 'PK\x03\x04' 
--detector /usr/bin/jardetector && echo success
success

I'm setting the severity to serious as this breaks installation
and testing of unrelated packages. (And I'll add here Affects/Found in 
the other packages s.t. piuparts can find this bugreport for automated
classification)

Looking at the code, /proc/sys/fs/binfmt_misc/register gets opened (but
does not exist), then /proc/sys/fs/binfmt_misc gets mounted and brings
its own /proc/sys/fs/binfmt_misc/register, thereafter the originally
opened /proc/sys/fs/binfmt_misc/register no longer seems to exist and
closing fails.

Andreas



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to