Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272451 - aufs2 does not emerge with kernel 2.6.29-r5
Summary: aufs2 does not emerge with kernel 2.6.29-r5
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major with 1 vote (vote)
Assignee: Thomas Sachau
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-03 16:17 UTC by Paul Hewlett
Modified: 2010-04-06 11:03 UTC (History)
3 users (show)

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


Attachments
Output from the emerge of aufs2 (aufs2report,54.52 KB, text/plain)
2009-06-03 16:21 UTC, Paul Hewlett
Details
Output as requested by error message (utils-Makefile.patch-6990.out,2.78 KB, text/plain)
2009-06-03 16:23 UTC, Paul Hewlett
Details
emerge --info (x,5.21 KB, text/plain)
2009-06-03 16:24 UTC, Paul Hewlett
Details
/var/tmp/portage/sys-fs/aufs2-0_p20090601/temp/aufs2-standalone-29.patch-15596.out (aufs2-standalone-29.patch-15596.out,17.11 KB, text/plain)
2009-06-06 23:32 UTC, Vytautas Jakutis
Details
my emerge --info (emerge_info,5.97 KB, text/plain)
2009-06-07 20:29 UTC, Vytautas Jakutis
Details
/var/tmp/portage/sys-fs/aufs2-0_p20090601/temp/build.log (build.log,1.62 KB, text/plain)
2009-06-07 22:02 UTC, Vytautas Jakutis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Hewlett 2009-06-03 16:17:48 UTC
The emerge of aufs2 fails as the git patches seem to be incorrect.
Comment 1 Paul Hewlett 2009-06-03 16:21:38 UTC
Created attachment 193410 [details]
Output from the emerge of aufs2
Comment 2 Paul Hewlett 2009-06-03 16:23:19 UTC
Created attachment 193414 [details]
Output as requested by error message
Comment 3 Paul Hewlett 2009-06-03 16:24:45 UTC
Created attachment 193415 [details]
emerge --info
Comment 4 Thomas Sachau gentoo-dev 2009-06-04 17:53:47 UTC
The problem is not the patch, but instead a git message before patching: 

fatal: reference is not a tree: cf1c9a7766a2605dd95ceecc0ac0a5396e784f6d

This will create an empty workdir and logically the patch will fail with this.
Since this commit does exist and i can checkout it cleanly, it may be a local problem on your system. What is your output of "merge -pv git"?
Comment 5 Paul Hewlett 2009-06-04 18:16:34 UTC
(In reply to comment #4)
> The problem is not the patch, but instead a git message before patching: 
> 
> fatal: reference is not a tree: cf1c9a7766a2605dd95ceecc0ac0a5396e784f6d
> 
> This will create an empty workdir and logically the patch will fail with this.
> Since this commit does exist and i can checkout it cleanly, it may be a local
> problem on your system. What is your output of "merge -pv git"?
> 
diracwifi PaulsBook # emerge -pv git

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-util/git-1.6.0.6  USE="cgi curl cvs iconv perl subversion threads tk vim-syntax webdav -bash-completion -doc -emacs -gtk -mozsha1 (-ppcsha1) -xinetd" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
diracwifi PaulsBook #    
Comment 6 Thomas Sachau gentoo-dev 2009-06-04 18:55:34 UTC
Sorry, but i can only guess since i cannot reproduce it:

Can you "rm -r /usr/portage/distfiles/git-src/aufs2-utils" and try again?
And if it still fails, can you attach the output of "git log", while in that dir?
Comment 7 Thomas Sachau gentoo-dev 2009-06-06 14:54:03 UTC
Also, what is the output with aufs2-20090601?
Comment 8 Vytautas Jakutis 2009-06-06 23:32:24 UTC
Created attachment 193766 [details]
/var/tmp/portage/sys-fs/aufs2-0_p20090601/temp/aufs2-standalone-29.patch-15596.out

about the same
Comment 9 Paul Hewlett 2009-06-07 17:17:37 UTC
(In reply to comment #6)
> Sorry, but i can only guess since i cannot reproduce it:
> 
> Can you "rm -r /usr/portage/distfiles/git-src/aufs2-utils" and try again?
> And if it still fails, can you attach the output of "git log", while in that
> dir?
> 

Sorry about the delay in replying but I have rebuilt my system (emerge -e system|world) and re-emerged gentoo-sources.

Emerging aufs now works. so this must have been some kind of temporary glitch.
Sorry about the noise.
Comment 10 Thomas Sachau gentoo-dev 2009-06-07 18:48:31 UTC
(In reply to comment #8)
> Created an attachment (id=193766) [edit]
> /var/tmp/portage/sys-fs/aufs2-0_p20090601/temp/aufs2-standalone-29.patch-15596.out
> 
> about the same
> 

You are currently using gentoo-sources-2.6.29-r5?
Can you also add your emerge --info and the build.log?
Comment 11 Vytautas Jakutis 2009-06-07 20:29:04 UTC
Created attachment 193833 [details]
my emerge --info

yes, I am using the ~x86 with gentoo-sources-2.6.29-r5
Comment 12 Vytautas Jakutis 2009-06-07 22:02:55 UTC
Created attachment 193840 [details]
/var/tmp/portage/sys-fs/aufs2-0_p20090601/temp/build.log
Comment 13 Thomas Sachau gentoo-dev 2009-06-12 18:57:28 UTC
After your next regular sync, please try with aufs2-0_p20090601-r1 and report back
Comment 14 Tsang Ka Wing 2009-06-26 23:37:32 UTC
I can emerge  sys-fs/aufs2-0_p20090601-r1 with gentoo-source-2.6.29-r5, but not 2.6.30
Comment 15 Paul Hewlett 2009-07-06 13:58:27 UTC
In reference to my comment #9, I still have an error. Everything builds but the modules will not load because of undefined references. I get this at the end of the emerge:

 * Removing sys-fs/aufs2-0_p20090601-r1 from moduledb.
>>> Original instance of package unmerged safely.
 * Updating module dependencies for 2.6.29-gentoo-r5 ...
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_alloc
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_reset_hinotify
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_ctl
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hinotify_init
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_free
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hinoti  [ ok ]

Kernel 2.6.29-r5
Comment 16 Ed Wildgoose 2009-07-07 00:12:32 UTC
Can you try with a vanilla kernel?

I'm seeing exactly the same issue with 2.6.29.2 + hardened+vserver, and 2.6.29.5+vserver.  I'm slowly getting back to vanilla

Also I reproduced this without using the ebuild and just pulling down the git sources directly (and following the install instructions).  So this doesn't seem to be an ebuild issue?

Anyone got any thoughts?
Comment 17 Paul Hewlett 2009-07-07 14:24:09 UTC
(In reply to comment #16)
> Can you try with a vanilla kernel?
> 
> I'm seeing exactly the same issue with 2.6.29.2 + hardened+vserver, and
> 2.6.29.5+vserver.  I'm slowly getting back to vanilla
> 
> Also I reproduced this without using the ebuild and just pulling down the git
> sources directly (and following the install instructions).  So this doesn't
> seem to be an ebuild issue?
> 
> Anyone got any thoughts?

I unmerged aufs2 and downloaded the git patches manually. After re-emerging gentoo-sources to get a clean source tree, I applied the patches and recompiled the kernel. still got undefined symbols au_hin_alloc etc. I added EXPORT_SYMBOL macros to hinotify.c - still got errors. Disabled CONFIG_AUFS_HINOTIFY option - still got the errors - this is surprising as the au_hin_alloc function is defined as a static inline in inode.h when this flag is not set.

It is an upstream error - I have joined the aufs2-users mailing list

> 

Comment 18 Paul Hewlett 2009-07-07 17:06:00 UTC
Emerged vanilla-sources, applied aufs2 patch by hand, compiled and rebooted and aufs2 now loads without error.
So it seems to be a gentoo bug.
I see a new bug has been filed 275476
Comment 19 Paul Hewlett 2009-07-07 21:09:40 UTC
Did a diff between the fs/aufs directory on both the vanilla sources and the gentoo sources reveals no differences.
Recompiling gentoo sources with hand-patched aufs still gives unknown symbols
Found spurious aufs.ko module in /lib/modules/2.6/.29-gentoo-r5/misc. Deleted it and re-ran depmod -a and now it works.
Where did the spurious aufs.ko come from?
Comment 20 Paul Hewlett 2009-07-07 21:42:37 UTC
Re-emerged gentoo-sources from scratch, compiled kernel and then emerged aufs2. Problem is now worse - 
 * Updating module dependencies for 2.6.29-gentoo-r5 ...
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol __lookup_one_len
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol do_splice_to
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol security_inode_permission
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol devcgroup_inode_permission
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_alloc
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol lookup_hash
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_reset_hinotify
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol fsync_super
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_ctl
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol do_splice_from
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol do_truncate
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hinotify_init
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hin_free
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol au_hinotify_fin
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol deny_write_access
WARNING: //lib/modules/2.6.29-gentoo-r5/misc/aufs.ko needs unknown symbol security_inode_readlink                                                                             [ ok ]

and the modules is in /lib/modules/2.6.29-gentoo-r5/misc.
Comment 21 Paul Hewlett 2009-07-07 21:57:46 UTC
The conclusion so far:

1.emerge -av aufs2 does not work because of unknown symbols. 
2.emerging gentoo-sources and then hand-patching works provided one remembers to delete the incorrect module in 2.6.29-gentoo-r5/misc.
3. emerge -av aufs2 does not leave the gentoo-sources patched so one cannot compile the aufs module and install it in the initramfs if one wants to boot with a unioned filesystem as root.


Comment 22 Ed Wildgoose 2009-07-07 23:07:44 UTC
Firstly, that other bug #275476 is the best way ahead because it does the same as a manual patch of the latest git

However! I figured out that part of the problem is that the KDIR option to aufs2 is not being respected correctly and I suspect if you look closely you will see that you are building against the wrong kernel sources?

Now I look I can see that it tries really really hard to figure out what kernel you are running.  So the solution is to build the kernel with it's patch, then reboot, then go back and build the module...

See if this helps?  
Comment 23 Vytautas Jakutis 2009-07-07 23:45:53 UTC
I have successfully switched to UnionFS..
Comment 24 Ed Wildgoose 2009-07-10 09:21:10 UTC
The conclusion of this problem seems likely to be either a problem with kernel sources, or more likely (previously) using the current gentoo ebuild which applies an earlier version of the aufs patch, has then left the kernel sources in an invalid state once the patch was reversed out and the later one applied?

I haven't been able to repro this since starting with a fresh kernel sources and re-applying either the patches manually, or using the "git-latest" gentoo ebuild (bug #275476 )

Very curious, but for anyone else facing this I think the solution is to get a fresh kernel sources, re-apply patches and .config

I think this bug can be closed now?
Comment 25 Thomas Sachau gentoo-dev 2009-07-12 15:21:38 UTC
If anyone can reproduce this with a clean kernel source dir and current aufs2 ebuild, please tell me about it and provide emerge --info + build.log with it.

If noone is able to, i will close this bug during the next days or weeks.
Comment 26 Gareth McClean 2010-03-09 00:21:28 UTC
This info might help anyone else who sees this issue:


First 'emerge aufs2' this will do an initial build of the aufs2 module and patch the current kernel source files. The module will fail to load with 'unknown symbol errors' until the kernel is rebuilt and the machine restarted with the new patched kernel. You then need to 'emerge aufs2' a second time to allow the linker to resolve the previously unknown symbols. At his point the module is usable but it may be necessary to rebuild your initrd to include the newly working aufs2 module if it is used during the boot process.




Comment 27 Chris Chan 2010-04-06 03:00:18 UTC
i'm also getting these errors with kernel 2.6.31 and aufs2-0_p20100405 compiled with "kernel-patch kernel_linux" USE flags. Can we rename 'kernel-patch' to 'kernel_patch' as well please?
Comment 28 Thomas Sachau gentoo-dev 2010-04-06 11:03:09 UTC
(In reply to comment #27)
> i'm also getting these errors with kernel 2.6.31 and aufs2-0_p20100405 compiled
> with "kernel-patch kernel_linux" USE flags. Can we rename 'kernel-patch' to
> 'kernel_patch' as well please?
> 

This bug is about kernel 2.6.29-r5 and seems to have been issues on user side, which i could not resolve from ebuild side. So next time, please open a new bug about an issue with aufs2. Also, did you follow comment #25 and comment #26 to get a clean setup?

Also, i am missing your emerge --info, your build.log, your steps to compile aufs2 and the kernel and any other detail, which can point at the issue.