Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 112874 - shfs causes kernel bug at fs/inode.c:252
Summary: shfs causes kernel bug at fs/inode.c:252
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Saleem Abdulrasool (RETIRED)
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 19:30 UTC by Quincy
Modified: 2006-03-21 01:01 UTC (History)
3 users (show)

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


Attachments
shfs inode bug patch (shfs-inode.patch,576 bytes, patch)
2006-01-03 15:01 UTC, Ruben Willmes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Quincy 2005-11-17 19:30:20 UTC
shfs seems to have a problem with the new 2.6.14-r2 kernel. With kernel
2.6.13-r5 everything was fine and i could work with shfs for hours and hours.
Now it gives kernel bug reports like below when saving a file onto the shfs
mount. This error happens on different machines with different kernel setups

Reproducible: Always
Steps to Reproduce:
1. Mount a drive via shfs (shfsmount -o uid=quincy,gid=users
quincy@<host>:/home/quincy /mnt/shfs/)
2. Load a file from the mounted drive
3. Edit and save the file several times (tried jed and quanta)
Actual Results:  
Kernel Error Messages like these:

Nov 18 04:03:47 Quincy-PC kernel BUG at fs/inode.c:252!
Nov 18 04:03:47 Quincy-PC invalid operand: 0000 [#3]
Nov 18 04:03:47 Quincy-PC PREEMPT
Nov 18 04:03:47 Quincy-PC Modules linked in: shfs nvidia asb100 hwmon_vid
i2c_viapro i2c_core snd_pcm_oss snd_mixer_oss snd_emu10k1 snd_rawmidi
snd_seq_device snd_ac97_codec snd_pcm snd_timer snd_ac97_bus snd_page_alloc
snd_util_mem snd_hwdep snd soundcore
Nov 18 04:03:47 Quincy-PC CPU:    0
Nov 18 04:03:47 Quincy-PC EIP:    0060:[<c01710c1>]    Tainted: P      VLI
Nov 18 04:03:47 Quincy-PC EFLAGS: 00210206   (2.6.14-gentoo-r2)
Nov 18 04:03:47 Quincy-PC EIP is at clear_inode+0x21/0xd0
Nov 18 04:03:47 Quincy-PC eax: 00000000   ebx: d9dd77f4   ecx: 00000005   edx:
d9dd77f4
Nov 18 04:03:47 Quincy-PC esi: e123d7b0   edi: d0070000   ebp: 00000002   esp:
d0071eb8
Nov 18 04:03:47 Quincy-PC ds: 007b   es: 007b   ss: 0068
Nov 18 04:03:47 Quincy-PC Process umount (pid: 7209, threadinfo=d0070000
task=cfc5a0b0)
Nov 18 04:03:47 Quincy-PC Stack: d9dd77f4 d9dd77f4 e123d7b0 c01720f0 d9dd77f4
c01743d2 d0071ee0 d9dd77f4
Nov 18 04:03:47 Quincy-PC d9dd77f4 c0172392 d9dd77f4 c041e9e0 db40e448 c016f3f1
d9dd77f4 bfb00b04
Nov 18 04:03:47 Quincy-PC d0070000 00000002 d75d8448 d121ac00 e1245ac0 d0070000
c016f83c 00000002
Nov 18 04:03:47 Quincy-PC Call Trace:
Nov 18 04:03:47 Quincy-PC [<e123d7b0>] shfs_delete_inode+0x0/0x120 [shfs]
Nov 18 04:03:47 Quincy-PC [<c01720f0>] generic_delete_inode+0x70/0x110
Nov 18 04:03:47 Quincy-PC [<c01743d2>] umount_tree+0xc2/0x120
Nov 18 04:03:47 Quincy-PC [<c0172392>] iput+0x62/0x80
Nov 18 04:03:47 Quincy-PC [<c016f3f1>] prune_dcache+0x171/0x200
Nov 18 04:03:47 Quincy-PC [<c016f83c>] shrink_dcache_parent+0x1c/0x30
Nov 18 04:03:47 Quincy-PC [<c015d507>] generic_shutdown_super+0x27/0x150
Nov 18 04:03:47 Quincy-PC [<c015dfc1>] kill_anon_super+0x21/0x60
Nov 18 04:03:47 Quincy-PC [<c0173dc7>] free_vfsmnt+0x27/0x30
Nov 18 04:03:47 Quincy-PC [<c015d3ea>] deactivate_super+0x5a/0x90
Nov 18 04:03:47 Quincy-PC [<c017464f>] sys_umount+0x3f/0x90
Nov 18 04:03:47 Quincy-PC [<c0156a01>] sys_write+0x51/0x80
Nov 18 04:03:47 Quincy-PC [<c01746b7>] sys_oldumount+0x17/0x20
Nov 18 04:03:47 Quincy-PC [<c0102e81>] syscall_call+0x7/0xb
Nov 18 04:03:47 Quincy-PC Code: e9 41 c0 eb c4 90 8d 74 26 00 83 ec 0c 89 5c 24
04 89 74 24 08 8b 5c 24 10 89 1c 24 e8 c9 7a fe ff 8b 8b c8 00 00 00 85 c9 74 08
<0f> 0b fc 00 42 c8 34 c0 8b 83 24 01 00 00 a8 10 75 08 0f 0b fe

Expected Results:  
Should save the file as it did with kernel 2.6.13-r5 without complaining

Portage 2.0.51.22-r3 (default-linux/x86/2005.0, gcc-3.3.6, glibc-2.3.5-r2,
2.6.14-gentoo-r2 i686)
=================================================================
System uname: 2.6.14-gentoo-r2 i686 Pentium III (Katmai)
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.20
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/share/config /var/qmail/control /var/www/localhost/"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium3 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://ftp.tu-clausthal.de/pub/linux/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://192.168.111.30/gentoo-portage"
USE="x86 apache2 apm authdaemond bash-completion berkdb bzip2 clamd crypt curl
eds expat fortran ftp gd gdbm gif gmp gstreamer idn imap imlib jpeg libwww
maildir mcal memlimit mhash mime mmx motif mpm-prefork mysql ncurses nls
no-suexec pam pcre pdflib perl php png python readline sasl slang softquota
spell sse ssl symlink tcpd tiff truetype udev unicode urandom utf8 virus-scan
xml2 zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 Quincy 2005-11-17 19:40:11 UTC
Found same bug in shfs bugtracker

http://sourceforge.net/tracker/index.php?func=detail&aid=1344018&group_id=72997&atid=536381
Comment 2 Wolf Giesen (RETIRED) gentoo-dev 2005-11-24 02:45:06 UTC
I can confirm that; had to go back to 2.6.13, since all my servers use shfs to
access the distfiles repository.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-12-13 17:24:26 UTC
Anyone tried the patch from the upstream bug? (Unfortunately, it's not a
"proper" patch so you'll have to resort to some manual job). 
Comment 4 Maxim Loginov 2005-12-29 15:38:49 UTC
bug reproduced also at amd64 machine, when I try to mv or rm remote file.
uname -a
Linux kazuko 2.6.14.2 #1 Thu Dec 29 20:26:09 CET 2005 x86_64 AMD Opteron(tm) Processor 250 AuthenticAMD GNU/Linux

ebuild suggested in http://bugs.gentoo.org/show_bug.cgi?id=78387 does not help
Comment 5 Ruben Willmes 2006-01-02 04:38:42 UTC
I can confirm this, too, but I've tried a patch from the shfs-dev mailing list (http://sourceforge.net/mailarchive/forum.php?thread_id=9199119&forum_id=40921) which looks to me more simple then the patch posted here.

I tried it on both x86 and amd64 and it seems to work, no more segfaults. 
Comment 6 Maxim Loginov 2006-01-03 10:53:32 UTC
(In reply to comment #5)
> I can confirm this, too, but I've tried a patch from the shfs-dev mailing list
> (http://sourceforge.net/mailarchive/forum.php?thread_id=9199119&forum_id=40921)
> which looks to me more simple then the patch posted here.
> 
> I tried it on both x86 and amd64 and it seems to work, no more segfaults. 
> 

could you please submit the patch here?
I failed to apply the patch from url...

Comment 7 Ruben Willmes 2006-01-03 15:01:56 UTC
Created attachment 76112 [details, diff]
shfs inode bug patch
Comment 8 Ruben Willmes 2006-01-03 15:02:40 UTC
Comment on attachment 76112 [details, diff]
shfs inode bug patch

Ok, here it is, it's my first patch, so please be patient with me ;-)
Comment 9 Maxim Loginov 2006-01-04 03:53:59 UTC
it seems to be very stupid, but I failed to apply this patch again...

1. save shfs-inode.patch into /root/portage/net-fs/shfs/files/0.35
2. ebuild /root/portage/net-fs/shfs/shfs-0.35-r2.ebuild digest
3. emerge shfs

output of emerge:

 * Failed Patch: shfs-inode.patch !
 *  ( /root/portage/net-fs/shfs/files/0.35/shfs-inode.patch )
 *
 * Include in your bugreport the contents of:
 *
 *   /var/tmp/portage/shfs-0.35-r2/temp/shfs-inode.patch-21815.out

content of /var/tmp/portage/shfs-0.35-r2/temp/shfs-inode.patch-21815.out:

***** shfs-inode.patch *****

============================

PATCH COMMAND:  patch -p0 -g0 --no-backup-if-mismatch < /root/portage/net-fs/shfs/fil
es/0.35/shfs-inode.patch

============================
patching file shfs/Linux-2.6/inode.c
Hunk #2 FAILED at 119.
1 out of 2 hunks FAILED -- saving rejects to file shfs/Linux-2.6/inode.c.rej
============================

PATCH COMMAND:  patch -p1 -g0 --no-backup-if-mismatch < /root/portage/net-fs/shfs/fil
es/0.35/shfs-inode.patch

============================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- shfs/Linux-2.6/inode.c    2004-06-01 15:16:19.000000000 +0200
|+++ shfs/Linux-2.6/inode.c        2006-01-02 13:13:02.000000000 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
============================

PATCH COMMAND:  patch -p2 -g0 --no-backup-if-mismatch < /root/portage/net-fs/shfs/fil
es/0.35/shfs-inode.patch

============================
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- shfs/Linux-2.6/inode.c    2004-06-01 15:16:19.000000000 +0200
|+++ shfs/Linux-2.6/inode.c        2006-01-02 13:13:02.000000000 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
============================

PATCH COMMAND:  patch -p3 -g0 --no-backup-if-mismatch < /root/portage/net-fs/shfs/fil
es/0.35/shfs-inode.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- shfs/Linux-2.6/inode.c    2004-06-01 15:16:19.000000000 +0200
|+++ shfs/Linux-2.6/inode.c        2006-01-02 13:13:02.000000000 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored
============================

PATCH COMMAND:  patch -p4 -g0 --no-backup-if-mismatch < /root/portage/net-fs/shfs/fil
es/0.35/shfs-inode.patch

============================
missing header for unified diff at line 3 of patch
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- shfs/Linux-2.6/inode.c    2004-06-01 15:16:19.000000000 +0200
|+++ shfs/Linux-2.6/inode.c        2006-01-02 13:13:02.000000000 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored

what's wrong???
Comment 10 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-01-04 15:15:30 UTC
Added to portage.  Please test the -r2 version which should hit portage mirrors in ~2 hours.
Comment 11 Marcel Meckel 2006-03-21 01:01:34 UTC
This seems to be fixed, but other kernel oopses are still present:

http://bugs.gentoo.org/show_bug.cgi?id=127044