Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 41462 - root mounted twice, writing to disk is doubled and fails
Summary: root mounted twice, writing to disk is doubled and fails
Status: RESOLVED DUPLICATE of bug 39143
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: x86-kernel@gentoo.org (DEPRECATED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-13 06:51 UTC by Gert Thiel
Modified: 2005-07-17 13:06 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gert Thiel 2004-02-13 06:51:11 UTC
The root fs is mounted twice. Any attempts to create directories (untar a tar source, using emerge et al) are executed twice as well and the second creating fails.

Example 1:
  server root # tar xfvz cyrus-smlacapd-0.5.x86-linux.tar.gz
  cyrus-smlacapd-0.5/
TAR stops untarring the archive after creating the dir.

Example 2:
  Using MC creating a dir MC fails with a "File exists (17)" error. Nevertheless MC created the dir.

Example 3:
server root # /usr/sbin/python-updater
 * Starting Python Updater from 2.2 to 2.3 :
 * Searching for packages with files in /usr/lib/python2.2 ..
   Adding to list: dev-python/python-fchksum-1.6.1-r1
   Adding to list: media-libs/lcms-1.12
 * Calculating Upgrade Package List ..
 * Re-ordering packages to merge ..
 * Preparing to merge these packages in this order:
   dev-python/python-fchksum-1.6.1-r1
   media-libs/lcms-1.12
 * Starting to merge (1/2) dev-python/python-fchksum-1.6.1-r1 ..
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-python/python-fchksum-1.6.1-r1 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2599, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1551, in merge
    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 2157, in doebuild
    os.makedirs(mysettings["T"])
  File "/usr/lib/python2.3/os.py", line 154, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/tmp/portage/python-fchksum-1.6.1-r1/temp'
 * Failed merging dev-python/python-fchksum-1.6.1-r1 (1/2)!
 * Starting to merge (2/2) media-libs/lcms-1.12 ..
Calculating dependencies ...done!
>>> emerge (1 of 1) media-libs/lcms-1.12 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2599, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1551, in merge
    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 2157, in doebuild
    os.makedirs(mysettings["T"])
  File "/usr/lib/python2.3/os.py", line 154, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/tmp/portage/lcms-1.12/temp'
 * Failed merging media-libs/lcms-1.12 (2/2)!
 *
 * ************************************************************
 * * Packages that still need to be manually emerged :        *
 * ************************************************************
 *
 *  Failed Packaged:
 *  ----------------
 *  These packages have failed and need to be re-emerged again.
 *  Alternatively, try re-running this script again to see if it
 *  can be fixed.
 *
 *  emerge -p  \=dev-python/python-fchksum-1.6.1-r1 \=media-libs/lcms-1.12
 *

My log contain symtoms of related trouble: Postfix deliver twice. Amavis fails on creating any dir the second time.

My mounts `mount`:
/dev/sda6 on / type ext3 (rw,noatime)
/dev/sda6 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)

My mounts `cat /proc/mounts`:
rootfs / rootfs rw 0 0
/dev/root /tmp/.initrd ext2 rw 0 0
/dev/sda6 / ext3 rw,noatime 0 0
none /proc proc rw 0 0
none /dev devfs rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/bus/usb usbfs rw 0 0

My grub.conf:
timeout 10
default  0

title  Gentoo Linux (2.4.24-xfs-r1)
root   (hd0,0)
kernel (hd0,0)/boot/kernel-2.4.24-xfs-r1 init=/linuxrc root=/dev/ram0 real_root=/dev/sda6 splash=verbose vga=0x317
initrd (hd0,0)/boot/initrd-2.4.24-xfs-r1

I used genkernel 3.0.1_beta11 to build and install the kernel.

I can log in to my machine using SSH. All read ops perform smoothly -- even when I use emerge. But writing ops use to fail: emerge sync, python-updater ...
I
Comment 1 Gert Thiel 2004-02-13 06:51:11 UTC
The root fs is mounted twice. Any attempts to create directories (untar a tar source, using emerge et al) are executed twice as well and the second creating fails.

Example 1:
  server root # tar xfvz cyrus-smlacapd-0.5.x86-linux.tar.gz
  cyrus-smlacapd-0.5/
TAR stops untarring the archive after creating the dir.

Example 2:
  Using MC creating a dir MC fails with a "File exists (17)" error. Nevertheless MC created the dir.

Example 3:
server root # /usr/sbin/python-updater
 * Starting Python Updater from 2.2 to 2.3 :
 * Searching for packages with files in /usr/lib/python2.2 ..
   Adding to list: dev-python/python-fchksum-1.6.1-r1
   Adding to list: media-libs/lcms-1.12
 * Calculating Upgrade Package List ..
 * Re-ordering packages to merge ..
 * Preparing to merge these packages in this order:
   dev-python/python-fchksum-1.6.1-r1
   media-libs/lcms-1.12
 * Starting to merge (1/2) dev-python/python-fchksum-1.6.1-r1 ..
Calculating dependencies ...done!
>>> emerge (1 of 1) dev-python/python-fchksum-1.6.1-r1 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2599, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1551, in merge
    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 2157, in doebuild
    os.makedirs(mysettings["T"])
  File "/usr/lib/python2.3/os.py", line 154, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/tmp/portage/python-fchksum-1.6.1-r1/temp'
 * Failed merging dev-python/python-fchksum-1.6.1-r1 (1/2)!
 * Starting to merge (2/2) media-libs/lcms-1.12 ..
Calculating dependencies ...done!
>>> emerge (1 of 1) media-libs/lcms-1.12 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2599, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1551, in merge
    retval=portage.doebuild(y,"clean",myroot,self.pkgsettings,edebug,cleanup=1)
  File "/usr/lib/portage/pym/portage.py", line 2157, in doebuild
    os.makedirs(mysettings["T"])
  File "/usr/lib/python2.3/os.py", line 154, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/tmp/portage/lcms-1.12/temp'
 * Failed merging media-libs/lcms-1.12 (2/2)!
 *
 * ************************************************************
 * * Packages that still need to be manually emerged :        *
 * ************************************************************
 *
 *  Failed Packaged:
 *  ----------------
 *  These packages have failed and need to be re-emerged again.
 *  Alternatively, try re-running this script again to see if it
 *  can be fixed.
 *
 *  emerge -p  \=dev-python/python-fchksum-1.6.1-r1 \=media-libs/lcms-1.12
 *

My log contain symtoms of related trouble: Postfix deliver twice. Amavis fails on creating any dir the second time.

My mounts `mount`:
/dev/sda6 on / type ext3 (rw,noatime)
/dev/sda6 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)

My mounts `cat /proc/mounts`:
rootfs / rootfs rw 0 0
/dev/root /tmp/.initrd ext2 rw 0 0
/dev/sda6 / ext3 rw,noatime 0 0
none /proc proc rw 0 0
none /dev devfs rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/bus/usb usbfs rw 0 0

My grub.conf:
timeout 10
default  0

title  Gentoo Linux (2.4.24-xfs-r1)
root   (hd0,0)
kernel (hd0,0)/boot/kernel-2.4.24-xfs-r1 init=/linuxrc root=/dev/ram0 real_root=/dev/sda6 splash=verbose vga=0x317
initrd (hd0,0)/boot/initrd-2.4.24-xfs-r1

I used genkernel 3.0.1_beta11 to build and install the kernel.

I can log in to my machine using SSH. All read ops perform smoothly -- even when I use emerge. But writing ops use to fail: emerge sync, python-updater ...
I´m forced to discontinue my mail server (Postfix, Cyrus IMAPd) to avoid data losses.

Reproducible: Always
Steps to Reproduce:




Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9, 2.4.24-xfs-r1)
===============================================================
==
System uname: 2.4.24-xfs-r1 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/
bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://distro.ibiblio.org/pub/Linux/distributions/
gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="apache2 apm arts avi berkdb crypt cups encode foomaticdb gd gdbm gif gnome gpm gtk gtk2 
imap imlib innodb ipv6 java jpeg kde ldap libg++ libwww mad maildir mikmod motif mpeg mysql 
ncurses nls oggvorbis opengl oss pam pdflib perl pg-hier pg-intdatetime pg-vacuumdelay png 
postgres python quicktime readline samba sasl sdl slang slp spell ssl svga tcpd tiff truetype x86 xml2 
xmms xv zlib"
Comment 2 Gert Thiel 2004-02-14 02:38:25 UTC
Some details on
"My log contain symtoms of related trouble: Postfix deliver twice. Amavis fails on creating any dir the second time":

I'm using daemonized fetchmail to get my mail, Postfix as my MTA and a Cyrus IMAPd. Postfix can deliver new mail to Cyrus (deffered). Nevertheless I can fetch my emails using my Mac OS X client machine using Mail.app and store these mails in my Cyrus IMAPd maildir using the same client app.
Comment 3 Gert Thiel 2004-02-14 06:36:55 UTC
This bug report is (mostly) comparable to bug 38360.
But I have __severe troubles__ writing to disk that disable my mail server!
Comment 4 Gert Thiel 2004-02-14 07:05:35 UTC
To help myself, I tried to boot my kernel without initrd:

/boot/grub.conf: ========
timeout 10
default  0
fallback 1

title  Gentoo Linux (2.4.24-xfs-r1 w/o initrd)
root   (hd0,0)
kernel (hd0,0)/boot/kernel-2.4.24-xfs-r1 root=/dev/sda6 splash=verbose vga=0x317

title  Gentoo Linux (2.4.24-xfs-r1)
root   (hd0,0)
kernel (hd0,0)/boot/kernel-2.4.24-xfs-r1 init=/linuxrc root=/dev/ram0 real_root=/dev/sda6 splash=verbose vga=0x317
initrd (hd0,0)/boot/initrd-2.4.24-xfs-r1

`mount` says: ========
/dev/sda6 on / type ext3 (rw,noatime)
none on /proc type proc (rw)
none on /dev type devfs (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/bus/usb type usbfs (rw)

`cat /proc/mounts`: ========
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,noatime 0 0
none /proc proc rw 0 0
none /dev devfs rw 0 0
none /dev/shm tmpfs rw 0 0
none /proc/bus/usb usbfs rw 0 0

This did not help: I still have trouble to create dirs using MC and myriads of Postfix defer messages in my logs.
Comment 5 Gert Thiel 2004-02-14 07:16:28 UTC
Further investigation:
Only creating dir generates an error, creating a file succeeds:

server TEST # ll
total 0
server TEST # mkdir TESTDIR
mkdir: cannot create directory `TESTDIR': File exists
server TEST # ll
total 4
drwxr-xr-x    2 root     root         4096 Feb 14 16:15 TESTDIR
server TEST # rmdir TESTDIR
server TEST # ll
total 0
server TEST # touch TESTFILE
server TEST # ll
total 0
-rw-r--r--    1 root     root            0 Feb 14 16:16 TESTFILE
server TEST #
Comment 6 Gert Thiel 2004-02-14 07:47:23 UTC
EXTRA WEIRED:

My probs seem not to relate to a "root mounted twice" bug:

server root # cd /boot/
server boot # mkdir TEST
mkdir: cannot create directory `TEST': File exists

Creating a dir makes trouble on a non root filesystem (/boot).
Comment 7 Brian Jackson (RETIRED) gentoo-dev 2004-02-14 08:17:09 UTC

*** This bug has been marked as a duplicate of 39143 ***