Current-Users archive

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

Side effects when taring up /dev



Hi,

I observed some weird behavior when I ran tar on a filesystem
with a /dev directory.  I ran the equivalent of:
  (cd / && tar -cf - . ) | (cd /somewhere && tar -xpf - )
and got the following error messages:
tar: Couldn't list extended attributes: Invalid argument
tar: Couldn't list extended attributes: Invalid argument
tar: Couldn't list extended attributes: Invalid argument
tar: Couldn't list extended attributes: Invalid argument
tar: Couldn't list extended attributes: Invalid argument
tar: Couldn't list extended attributes: Invalid argument

On the console, I got:
[ 72536.9865017] cd0: sector size 0
[ 72537.0265040] cd0: sector size 0
[ 72633.4720213] tap0: detached

and then the console would no longer accept any input.  I had to
hup the getty process to get it going again.

This was on a Sun Enterprise 450 Ultrasparc system, with a real
CD player installed, and a real serial port console.

I tried something similar on a Xen/amd64 VM running NetBSD
9.99.75.  A simple

  (cd /dev && tar -cf /dev/null ./tap)

gave similar error messages from tar, and the console message:
[ 454.6728584] tap0: detached

It seems that tar opens the ./tap device and then tries to
retrieve some acl attributes.  I speculate that somehow this
again causes a tap0 device to be created, and then shortly
deleted again.

Should tar really open a device node like this?  Many devices
will "do stuff" on open, and I would say it is not expected that
running tar in a directory with device nodes should change the
system state like that.
					-jarle
-- 
There are only two hard things in Computer Science: cache invalidation,
naming things, and off-by-one errors.


Home | Main Index | Thread Index | Old Index