Bug 381259

Summary: getting rid of ia_file is wrong
Product: [openSUSE] openSUSE 11.0 Reporter: Forgotten User ZhJd0F0L3x <forgotten_ZhJd0F0L3x>
Component: KernelAssignee: John R Johansen <jjohansen>
Status: RESOLVED FIXED QA Contact: Stephan Kulow <coolo>
Severity: Critical    
Priority: P1 - Urgent CC: aj, axel.braun, buschmann23, dieter, dsk, duwe, felipe.alvarez, forgotten_sLJ7K2dvxj, guitarist198, heelstraf, hi-du, jeffm, jsrain, Larry.Finger, legal-system, lovetoflyguy, maksym.grytsenko
Version: Beta 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: Documentation Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: screenshot
[PATCH] vfs: restore ia_file for compatibility with external modules

Description Forgotten User ZhJd0F0L3x 2008-04-18 10:34:55 UTC
see the attached screenshot: it is not possible to boot the live system, and even less to pass boot options to it.
Comment 1 Forgotten User ZhJd0F0L3x 2008-04-18 10:35:29 UTC
Created attachment 208908 [details]
screenshot
Comment 2 Forgotten User ZhJd0F0L3x 2008-04-18 10:36:33 UTC
"failsafe" and "noacpi" also do not work, the only working option is "memtest"
Comment 3 Stephan Kulow 2008-04-18 11:09:11 UTC
and just pressing enter works?
Comment 4 Matthias Fehring 2008-04-18 14:10:10 UTC
It is the same as in bug 365783:
https://bugzilla.novell.com/show_bug.cgi?id=365783

From the given options only memtest works. Try to start with "linux" leads to a Kernel Panic. Pressing Enter does nothing. But it works if you wait a short time. Then the system starts automatically and runs.
Comment 5 Josh J 2008-04-18 18:09:46 UTC
On Virtual Box: 1.5.4
Just pressing enter makes it continue, although creating xconfig fails.
Comment 6 Stephan Kulow 2008-04-19 05:18:04 UTC
*** Bug 377565 has been marked as a duplicate of this bug. ***
Comment 7 Stephan Kulow 2008-04-19 05:18:59 UTC
------------[ cut here ]------------
kernel BUG at /usr/src/packages/BUILD/aufs/obj/default/finfo.c:31!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:03.0/resource
Modules linked in: iptable_filter ip_tables ip6table_filter ip6_tables x_tables ipv6 af_packet microcode firmware_class binfmt_misc edd joydev fuse i2c_piix4 ne2k_pci i2c_core 8390 aufs squashfs loop nls_utf8 BusLogic usb_storage usbcore sg st sd_mod sr_mod ide_disk ide_cd_mod cdrom ide_core ata_piix ahci libata dock scsi_mod parport_pc parport [last unloaded: speedstep_lib]

Pid: 2132, comm: master Tainted: G        N (2.6.25-rc9-17-default #1)
EIP: 0060:[<f89ecd7a>] EFLAGS: 00000246 CPU: 0
EIP is at ftofi+0x2a/0x40 [aufs]
EAX: 00000000 EBX: f5e27d60 ECX: f5a1bf70 EDX: f5bf0600
ESI: 00000000 EDI: f21b1384 EBP: f5a1be80 ESP: f5a1be80
 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Process master (pid: 2132, ti=f5a1a000 task=f5a050e0 task.ti=f5a1a000)
Stack: f5a1bf24 f89f2f38 00000000 00000001 00000010 00000001 f5dfec00 00000001
       00000286 f5a1bec4 c011e6b6 00000000 00000000 00000001 f5dfec00 fffffff4
       f5e27d60 f5a1bf70 f21b4d74 f5bf0600 f5e27d60 00000000 f5a1bf4c f5a1bf58
Call Trace:
 [<f89f2f38>] aufs_setattr+0x418/0x720 [aufs]
 [<c018931c>] notify_change+0x153/0x2e3
 [<c0176610>] sys_fchmod+0xa5/0xd0
 [<c0105a62>] syscall_call+0x7/0xb
 [<b7b391b1>] 0xb7b391b1
 =======================
Code: 90 55 8b 40 70 89 e5 85 c0 74 20 8b 50 18 85 d2 74 19 0f b6 50 1d 84 d2 7f 08 5d 8d b6 00 00 00 00 c3 3a 50 1c 8d 74 26 00 7d ef <0f> 0b 8d 74 26 00 eb fa 8d b4 26 00 00 00 00 8d bc 27 00 00 00
EIP: [<f89ecd7a>] ftofi+0x2a/0x40 [aufs] SS:ESP 0068:f5a1be80
---[ end trace c4f0426ee5b8379e ]---
Comment 8 Maksym Grytsenko 2008-04-20 12:03:43 UTC
OK. There is a way for me to continue installing process on my KDE4 i386 Live-CD.

Earlier I had a kernel freezing right after accepting the licence.

I've noticed, that if I run the installer via /sbin/ yast2 live-installer I can go to the next steps of installation.

But if I click the Install icon on the desktop - I have a bug.


Anyway, even if I run the installer from the konsole, It accepts licence, adjusts time but later I DO NOT SEE HDD on my laptop.

And no function in partitioning works

Comment 9 Christopher Vogt 2008-04-20 16:28:46 UTC
I confirm this statement:

"  ------- Comment #8 From Maksym Grytsenko  2008-04-20 06:03:43 MST  [reply] -------

OK. There is a way for me to continue installing process on my KDE4 i386
Live-CD.

Earlier I had a kernel freezing right after accepting the licence.

I've noticed, that if I run the installer via /sbin/ yast2 live-installer I can
go to the next steps of installation.

But if I click the Install icon on the desktop - I have a bug.


Anyway, even if I run the installer from the konsole, It accepts licence,
adjusts time but later I DO NOT SEE HDD on my laptop.

And no function in partitioning works"
Comment 10 heel straf 2008-04-21 15:48:15 UTC
I did, 
booting openSUSE 11.0 beta 1 / KDE live i386

log out in kde 4.0.3 (make sure that everthing is unmouted)

system --> console 

login name "root"

start live installer with "/sbin/yast2 live-installer"

everthing looks good, have HD and can copy the image to HD
so the installation started ;-)

then (i was gone from computer)
get the fault "line 420: 4012 segmentation fault"
(I selected belgain keyboard)

Hope that's good info
EOS
Comment 11 Stephan Kulow 2008-04-22 06:31:01 UTC
please open a separate bug report with yast logs. This bug is about not being able to boot.
Comment 12 Jiri Srain 2008-04-22 13:50:35 UTC
*** Bug 381711 has been marked as a duplicate of this bug. ***
Comment 13 Axel Braun 2008-04-22 14:04:57 UTC
(In reply to comment #8 from Maksym Grytsenko)
> OK. There is a way for me to continue installing process on my KDE4 i386
> Live-CD.
> 
> Earlier I had a kernel freezing right after accepting the licence.

can confirm this, same behaviour here.
 
> I've noticed, that if I run the installer via /sbin/ yast2 live-installer I can
> go to the next steps of installation.

right

> But if I click the Install icon on the desktop - I have a bug.

yes, it hangs completely 
>
> Anyway, even if I run the installer from the konsole, It accepts licence,
> adjusts time but later I DO NOT SEE HDD on my laptop.

When it comes to partitioning, it does not find a HD to partition (running Virtualbox 1.5.6)

In Dmesg, it finds the VBOX-Harddisk, but it claims that 
Driver 'sd' needs update - please use bus_type methods
(no idea what that means)
and of course the unknown partition table (because there is none)
Comment 14 Felipe Alvarez 2008-04-23 14:30:07 UTC
(In reply to comment #5 from Josh J)
> On Virtual Box: 1.5.4
> Just pressing enter makes it continue, although creating xconfig fails.
> 
Not using virtual box, but creating xconfig fails, and nothing happens. I pressed "enter" at the start. Also, live-system fails to work, as does noacpi and failsafe.
Comment 15 Torsten Duwe 2008-04-23 15:57:13 UTC
I can see the BUG in qemu, thanks. No more info required so far.
Comment 16 JP Rosevear 2008-04-23 16:12:48 UTC
*** Bug 382800 has been marked as a duplicate of this bug. ***
Comment 17 JP Rosevear 2008-04-23 16:18:18 UTC
*** Bug 382798 has been marked as a duplicate of this bug. ***
Comment 19 Stephan Kulow 2008-04-24 15:09:07 UTC
*** Bug 360425 has been marked as a duplicate of this bug. ***
Comment 20 Torsten Duwe 2008-04-24 15:44:31 UTC
Jeff, can you please have a look whether this is related to aufs' fsetattr you added? The file* being null during this operation triggers this BUG.

You can reproduce it with "qemu -s -m 800 -hda ... -cdrom openSUSE-11.0-Beta1-KDE4-LiveCD-i386.iso -boot d" and setting a gdb breakpoint at 0xf29ecd7a .

Coolo: do you have any pointers to a matching debuginfo?
Comment 21 Torsten Duwe 2008-04-24 15:45:59 UTC
Edit: Sorry, the private_date within the struct file is null.
Comment 22 Stephan Kulow 2008-04-24 16:01:41 UTC
Not sure what you exactly need, but /work/users/coolo/live/kiwi-image-livecd-kde-openSUSE-11.0.i686-2.6.0.iso is the ISO of today and I put kernel-default-debuginfo.rpm next to it that should fit together. 

http://ftp5.gwdg.de/pub/opensuse/distribution/11.0-Beta1/Factory/inst-source-debug/suse/i586/kernel-default-debuginfo-2.6.25-rc9.17.i586.rpm _should_ be beta1's kernel-default, but I can't guarantee it.
Comment 23 Stephan Kulow 2008-04-24 16:06:08 UTC
ok, that live cd does not boot at all - different problem. So ftp5 is the only chance then.
Comment 24 Stephan Kulow 2008-04-24 19:02:15 UTC
ok, the live cd does not boot because kiwi does not prepare the chroot and kernel-default %post fails. I worked around it and built a small live cd with just text mode from Factory - and the problem does not trigger ;(
Comment 25 Torsten Duwe 2008-04-28 11:07:48 UTC
Jeff, referring to my comment#20: Coolo and I just discussed the problem and found the possibility that your patch, which was apparently not present in Beta1, actually _fixed_ this issue.

Can you confirm? This would increase our confidence that this problem, gone by itself, will not return by itself.
Comment 26 Jeff Mahoney 2008-04-28 14:33:38 UTC
The only explanation I have is that the LiveCD is somehow running a post-AppArmor patchset kernel with a pre-fsetattr patched aufs. It has ATTR_FILE set, but isn't passing ->ia_file.

If that's the case, then any external file system will Oops in a similar manner. The aufs fsetattr patch would fix it because it provides the right callback for passing the file pointer.

I'm not calling this fixed yet, though. The bug is in the kernel, not aufs. Any external file system will continue to build successfully and then Oops unexpectedly. I'm assigning this to John Johansen since it's his patch.

John, this is broken:
                        if (file && file->f_op && file->f_op->fsetattr)
                                error = file->f_op->fsetattr(file, attr);
                        else
                                error = inode->i_op->setattr(dentry, attr);

fsetattr may be a cleaner interface, but there's no check for ATTR_FILE being passed to setattr. Even if there were, and it issued a warning and failed the operation, it's still a core API incompatibility with mainline. For AppArmor, it's understandable, but without AppArmor patches, the build will fail.

I think getting rid of ia_file is wrong at this stage. This is one of those cases where the patch needs to be included into mainline before it is accepted into our kernel. I don't care if you keep the fsetattr API, but please ensure that ->setattr works as it did before.

Leaving as BLOCKER.
Comment 27 Stephan Kulow 2008-04-29 15:08:41 UTC
*** Bug 384832 has been marked as a duplicate of this bug. ***
Comment 28 Hubert Figuiere 2008-04-29 15:16:00 UTC
but in my case I could boot without difficulties. I notice the OOPS because I was looking for something. I guess YMMV.
Comment 29 mike marsh 2008-04-30 15:57:18 UTC
On my system, as in initial bug report, typing anything except memtest fails. Pressing 'enter' or simply waiting will boot, but kiwi hangs at 'Probing module: ohci-hcd'. Further interaction with installer is not possible, and the pc eventually reboots. Hope this helps.

(P4-2.4c,1gb,80gb,kde4liveCD)
Comment 30 Torsten Duwe 2008-04-30 16:29:48 UTC
Looks like -fstack-protector is the culprit. It ends up in aufs' CFLAGS.
Comment 31 Stephan Kulow 2008-04-30 18:40:38 UTC
your change fixes the problem tracked in 377565 - cool
Comment 32 Stephan Kulow 2008-05-01 06:08:33 UTC
#26 is the reason this bug is open, the original problem we saw is fixed
Comment 33 Jeff Mahoney 2008-05-05 18:34:34 UTC
*** Bug 383372 has been marked as a duplicate of this bug. ***
Comment 34 Greg Kroah-Hartman 2008-05-09 16:17:11 UTC
I thought this was fixed already?  JJ?
Comment 35 Jeff Mahoney 2008-05-09 17:51:55 UTC
I'm afraid not. External file systems will still fail spectacularly.
Comment 36 Jeff Mahoney 2008-05-09 18:26:10 UTC
On second thought, I wouldn't call this a blocker any more. The problem must've been caused by a syncing issue between the kernel and aufs packages. Anything that cares about ATTR_FILE will use iattr->ia_file and fail to build due to the missing field.

I'd still view it as broken since it is an API change that nobody else currently carries and forces external file system developers to add changes that are only required by our kernel. Downgrading to CRITICAL.
Comment 37 Jeff Mahoney 2008-05-09 18:48:01 UTC
Created attachment 214047 [details]
[PATCH] vfs: restore ia_file for compatibility with external modules

 patches.apparmor/fsetattr.diff eliminated ia_file and ATTR_FILE in favor
 of providing a ->fsetattr call that used a file pointer. Until this
 patch is accepted into mainline, this patch provides the backward
 compatibility for external file system modules.

I've committed this to CVS.
Comment 38 Jeff Mahoney 2008-05-09 18:48:18 UTC
Closing as FIXED.