Re: Permission bug?

2007-06-15 Thread Igor Karasynskyi
> If your /rw/tmp is 1777, it may be the trigger of this aufs bug and
> please try this patch.

Yes you are right :) my first RO branch has 0777 and branches after
that has 1777, this patch fixed this problem, thank you very much :)

> So what you did is,
> # mount -t aufs -o br:/rw1:/ro1:/ro2 none /aufs
> # mount -o remount,prepend:/rw0 /aufs
> # mount -o remount,mod:/rw1=ro /aufs
> and crashed.
Yes that is.

About this problem with remount branch as RO:
1) I have image of Gentoo distributive (with 2.4 kernel)
2) after that I mounted branch in which I'm upgraded this image to 2.6
and other system software
So as you see my system boot with 2.6 kernel with aufs and mount this
braches, then chroot to them and start init. If I run system with
upgraded software (to 2.6) all work's fine, but if I just boot system
without (mounting branch with 2.6 upgrade) I receive error with
remount, so problem occurred only in this situation.

Now I try to investigate this (try to do what you say - apply patch
and turn on logging).

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread Igor Karasynskyi

So what you did is,
# mount -t aufs -o br:/rw1:/ro1:/ro2 none /aufs
# mount -o remount,prepend:/rw0 /aufs
# mount -o remount,mod:/rw1=ro /aufs
and crashed.

Won't you try this patch which produce more detailed debug information
at remount time, and send me the debug log?


I apply your patch and repeat situation, netconsole log attached.


netcat.log
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Re: Permission bug?

2007-06-15 Thread sfjro

"Igor Karasynskyi":
> Yes you are right :) my first RO branch has 0777 and branches after
> that has 1777, this patch fixed this problem, thank you very much :)

God news!


> About this problem with remount branch as RO:
> 1) I have image of Gentoo distributive (with 2.4 kernel)
> 2) after that I mounted branch in which I'm upgraded this image to 2.6
> and other system software
> So as you see my system boot with 2.6 kernel with aufs and mount this
> braches, then chroot to them and start init. If I run system with
> upgraded software (to 2.6) all work's fine, but if I just boot system
> without (mounting branch with 2.6 upgrade) I receive error with
> remount, so problem occurred only in this situation.

Do you mean that you are running aufs in 2.4 kernel?
Aufs doesn't support linux-2.4.

--

> I apply your patch and repeat situation, netconsole log attached.

Thank you for your test.
There were sevral files are opened when you modify the branch
permission.

libc-2.3.4.so, libuuid.so.1.2, libblkid.so.1.0, ld-2.3.4.so, mount,
libnss_files-2.3.4.so, libnss_nis-2.3.4.so, libnsl-2.3.4.so,
libnss_compat-2.3.4.so, libc-2.3.4.so, libdl-2.3.4.so, ld-2.3.4.so,
bash, vcsa2

The trigger was last 'vcsa2.' Is this file executable or something?
And, most importantly, Is this file inside aufs?
All other files existed in aufs and on the branch which was indexed as
2. Does vcsa2 exist on the same branch?
(branches are indexed from 0. you can check them the line in
/proc/mounts or /sys/fs/aufs/brs, "br:br0:br1:br2:...)


Junjiro Okajima

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread sfjro

"Igor Karasynskyi":
> When I trying to find file vcsa2 the result only was /dev/vcsa*, so I
> think it was device file, and as I say because image is based on 2.4
> kernel stuff, the dev files is located on "image" branch (last index):
> br:/cur=rw:/base=ro:/image=ro. So maybe problem in dev files if they
> located on branches (because when I mount branch with 2.6 stuff, init
> initialize udev on /dev and dev files then not located on branch
> anymore).

Hmm,,,
Won't you try this patch?


> Today when I trying to create swap file on my aufs system I receive
> error (mkswap return error), is it correct? If i create swap file on
> mounted filesystem all ok.

You are fast. :-)
What you did is,,,

# mkswap /aufs/regular/file 
- failed

# mkswap /branch/regular/file 
- succeeded

right?
Please send me the output of strace mkswap /aufs/regular/file.
But I am not sure it will be supported.


Junjiro Okajima

--

Index: fs/aufs/branch.c
===
RCS file: /cvsroot/aufs/aufs/fs/aufs/branch.c,v
retrieving revision 1.51
diff -u -p -r1.51 branch.c
--- fs/aufs/branch.c4 Jun 2007 02:15:32 -   1.51
+++ fs/aufs/branch.c15 Jun 2007 09:16:41 -
@@ -781,6 +791,10 @@ int br_mod(struct super_block *sb, struc
//file_list_lock();
list_for_each_entry(file, &sb->s_files, f_u.fu_list) {
LKTRTrace("%.*s\n", DLNPair(file->f_dentry));
+   if (unlikely(file->f_dentry->d_inode->i_mode
+& (S_IFCHR | S_IFBLK | S_IFIFO | 
S_IFSOCK)))
+   continue;
+
fi_read_lock(file);
if (!S_ISREG(file->f_dentry->d_inode->i_mode)
|| !(file->f_mode & FMODE_WRITE)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread Igor Karasynskyi
> Do you mean that you are running aufs in 2.4 kernel?
> Aufs doesn't support linux-2.4.

No, I'm running 2.6 kernel with AUFS, I mean that image on which
problem occured is based on 2.4 kernel stuff (modutils, there not
exist udev and devfs, just dev files created by MAKEDEV)

>
> Thank you for your test.
> There were sevral files are opened when you modify the branch
> permission.
>
> libc-2.3.4.so, libuuid.so.1.2, libblkid.so.1.0, ld-2.3.4.so, mount,
> libnss_files-2.3.4.so, libnss_nis-2.3.4.so, libnsl-2.3.4.so,
> libnss_compat-2.3.4.so, libc-2.3.4.so, libdl-2.3.4.so, ld-2.3.4.so,
> bash, vcsa2
>
> The trigger was last 'vcsa2.' Is this file executable or something?
> And, most importantly, Is this file inside aufs?
> All other files existed in aufs and on the branch which was indexed as
> 2. Does vcsa2 exist on the same branch?
> (branches are indexed from 0. you can check them the line in
> /proc/mounts or /sys/fs/aufs/brs, "br:br0:br1:br2:...)
>

When I trying to find file vcsa2 the result only was /dev/vcsa*, so I
think it was device file, and as I say because image is based on 2.4
kernel stuff, the dev files is located on "image" branch (last index):
br:/cur=rw:/base=ro:/image=ro. So maybe problem in dev files if they
located on branches (because when I mount branch with 2.6 stuff, init
initialize udev on /dev and dev files then not located on branch
anymore).

Today when I trying to create swap file on my aufs system I receive
error (mkswap return error), is it correct? If i create swap file on
mounted filesystem all ok.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread Igor Karasynskyi

Hmm,,,
Won't you try this patch?

Didn't help, log attached


# mkswap /aufs/regular/file 
- failed

# mkswap /branch/regular/file 
- succeeded

right?

I make mistake, error return not mkswap but swapon

I have following situation (for example):
/dev/sda1 /mnt/disk
/mnt/disk/root = aufs (br:/mnt/disk/cur=rw:/mnt/disk/image=ro)
I'm chroot to /mnt/disk/root and run my system by calling init
so when I create swap file on the system (for example /var/tmp/swap)
and calls swapon then error occured, but if i create file on
/mnt/disk/swap and call swapon all ok.

stat64("/var/tmp/swap", {st_mode=S_IFREG|0644, st_size=10240, ...}) = 0
swapon("/var/tmp/swap") = -1 EINVAL (Invalid argument)
write(2, "swapon: /var/tmp/swap: Invalid a"..., 40swapon:
/var/tmp/swap: Invalid argument
) = 40
exit_group(-1)  = ?


netcat1.log
Description: Binary data
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Re: Permission bug?

2007-06-15 Thread sfjro

"Igor Karasynskyi":
> > Won't you try this patch?
> Didn't help, log attached

Sorry, I should write more.
Please remove the last debug patch which includes au_debug_on().


> I make mistake, error return not mkswap but swapon
:::
> stat64("/var/tmp/swap", {st_mode=S_IFREG|0644, st_size=10240, ...}) = 0
> swapon("/var/tmp/swap") = -1 EINVAL (Invalid argument)
> write(2, "swapon: /var/tmp/swap: Invalid a"..., 40swapon:
> /var/tmp/swap: Invalid argument
> ) = 40
> exit_group(-1)  = ?

Currently it is an expected behaviour since I am doubtful about swap in
aufs. Is it really needed? As you wrote, you can mkswap on a branch
filesystem directly and the swap file is no need to be stackable.


Junjiro Okajima

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread Igor Karasynskyi
> Currently it is an expected behaviour since I am doubtful about swap in
> aufs. Is it really needed? As you wrote, you can mkswap on a branch
> filesystem directly and the swap file is no need to be stackable.
>
No it not really needed, it much more clear when swap located outside of aufs

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: Permission bug?

2007-06-15 Thread sfjro

"Igor Karasynskyi":
> No it not really needed, it much more clear when swap located outside of aufs

OK. Then I hope you had already read this description, too.

(from the aufs manual)
When you use aufs as root filesystem, it is recommended to consider to
exclude some directories. For example, /tmp and /var/log are not need
to stack in many cases. They don't usually need to copyup or to whiteout.


Junjiro Okajima


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


"au_new_inode: broken ino"

2007-06-15 Thread Jørgen P. Tjernø
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Using 20070528 release, I'm at random intervals
getting "aufs au_new_inode:...: broken ino", e.g.:
[  349.301408] aufs au_new_inode:325:glftpd[3180]: broken ino, b0,
files/3.Lbs, hi805306524, i1078. Try udba=inotify.
Also:
[631021.668293] aufs au_new_inode:325:twistd[27583]: broken ino, b0,
libxtst/libxtst6_1.0.1-3build1_i386.deb, hi134217865, i48493. Try
udba=inotify.
[717395.849214] aufs au_new_inode:325:twistd[27583]: broken ino, b0,
samba/samba-common_3.0.22-1ubuntu4.2_i386.deb, hi134217862, i48869. Try
udba=inotify.

Not the same path each time. Also, it says 'try udba=inotify': I'm
already using it:
[EMAIL PROTECTED]:~$ grep aufs /proc/mounts
none /storage aufs
rw,xino=/vault/disk3/.aufs.xino,udba=inotify,br:/vault/disk3=rw:/vault/disk2=rw:/vault/disk1=rw:/vault/lvm=rw
0 0

What's the cause? Is this a problem?

Kindest regards, Jørgen P. Tjernø.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGcoVMwqQbW3my7pcRAtVBAJ437yDeq03fN/UEoBQJb0zRLIO3sgCgjyr5
0WRIett+qcVvUbwdyIaC5wI=
=PKck
-END PGP SIGNATURE-

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/


Re: "au_new_inode: broken ino"

2007-06-15 Thread sfjro

"Jrgen_P._Tjern":
> getting "aufs au_new_inode:...: broken ino", e.g.:
> [  349.301408] aufs au_new_inode:325:glftpd[3180]: broken ino, b0,
> files/3.Lbs, hi805306524, i1078. Try udba=3Dinotify.
> Also:
> [631021.668293] aufs au_new_inode:325:twistd[27583]: broken ino, b0,
> libxtst/libxtst6_1.0.1-3build1_i386.deb, hi134217865, i48493. Try
> udba=3Dinotify.
> [717395.849214] aufs au_new_inode:325:twistd[27583]: broken ino, b0,
> samba/samba-common_3.0.22-1ubuntu4.2_i386.deb, hi134217862, i48869. Try
> udba=3Dinotify.
:::
> What's the cause? Is this a problem?

It must be a probelm for aufs, but it may not be for you.
It means,
"aufs tries assigning 48869 as the aufs inode number for
samba/samba-common_3.0.22-1ubuntu4.2_i386.deb whose inode number is
134217862 on branch 0 (the first branch) since 48869 was previously
assigned for 134217862. But current aufs inode #48869 has different
information and aufs thinks it was changed by someone else outside
aufs. To detect the outer changes, udba=inotify is necessary."
Then aufs assigns another inode number. You can continue accessing
the reported file flawlessly, but its inode number is changed. Some
applications, such like "chmod -R xxx /large/dir", may warn about that.

Actually you already specified udba=inotify, so it must be a bug.
Additionally the inode numbers #805306524, #134217865 and #134217862
seem to be too large. Are they correct numbers? Generally speaking, they
are not illegal numbers, but I want to check whether they are correct or
not.
Please tell me about your branch 0. What filesystem is it? What is the
largest inode number on it?


Junjiro Okajima

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/