mahinthjoe / macfuse

Automatically exported from code.google.com/p/macfuse
0 stars 0 forks source link

Reclaim Kernel Panic #83

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
First, thank you a lot for MacFUSE. It's great.

I'm using a small shell script to handle sshfs. At some point, I
messed up the script which led to calling umount just after
sshfs. This resulted in a kernel panic (see end of the note).

Exact commands were

sshfs gaston: /Volumes/gaston+ -o uid=1221,gid=1221 -ovolname=gaston+ 
-oping_diskarb -
oreconnect
umount /Volumes/gaston+

I didn't try to recreate the situation.

I'm using MacFUSE 0.19 on Tiger (Darwin 8.8.2).

Btw, I find options uid=$UID and gid=$UID quite useful. Maybe they
would fit nicely in the sshfs GUI.

Best,
Renaud.

panic(cpu 0 caller 0x2B4582D9): MacFUSE: vnode reclaimed with valid fufh 
(type=2)
Backtrace, Format - Frame : Return Address (4 potential args on stack) 
0x141b3b28 : 0x128d08 (0x3c9afc 0x141b3b4c 0x131de5 0x0) 
0x141b3b68 : 0x2b4582d9 (0x2b45d1a0 0x2 0x141b3bb8 0x174e0f) 
0x141b3be8 : 0x1e3c67 (0x141b3c04 0x1 0x141b3c28 0x358ddc) 
0x141b3c28 : 0x1d0472 (0x3090108 0x141b3c64 0x0 0x2) 
0x141b3c88 : 0x1d05c4 (0x3090140 0x3090108 0x14 0x3d20f4) 
0x141b3cd8 : 0x1d2c9b (0x3090108 0x141b3d88 0x1 0x0) 
0x141b3d48 : 0x1d3f39 (0x3078900 0x0 0x19 0x1a1ec0) 
0x141b3da8 : 0x1d421b (0x3078900 0x0 0x0 0x3b939c4) 
0x141b3dc8 : 0x1d42de (0x3078900 0x0 0x3b939c4 0x0) 
0x141b3f58 : 0x3787be (0x3b939c4 0x2ee6158 0x2ee619c 0x0) 
0x141b3fc8 : 0x19acde (0x27db6c0 0x0 0x19d0b5 0x27db6c0) No mapping exists for 
frame 
pointer
Backtrace terminated-invalid frame pointer 0xbfffdde8
      Kernel loadable modules in backtrace (with dependencies):
         com.google.filesystems.fusefs(0.1.9)@0x2b453000

Kernel version:
Darwin Kernel Version 8.8.2: Thu Sep 28 20:43:26 PDT 2006; 
root:xnu-792.14.14.obj~1/
RELEASE_I386

Model: MacBookPro2,2, BootROM MBP22.00A5.B01, 2 processors, Intel Core 2 Duo, 
2.16 GHz, 1 
GB
Graphics: ATI Radeon X1600, ATY,RadeonX1600, PCIe, 128 MB
Memory Module: BANK 1/DIMM1, 1 GB, DDR2 SDRAM, 667 MHz
AirPort: AirPort Extreme, 1.0.46
Bluetooth: Version 1.7.11f14, 2 service, 1 devices, 1 incoming serial ports
Network Service: Built-in Ethernet, Ethernet, en0
Serial ATA Device: FUJITSU MHW2120BH, 111.79 GB
Parallel ATA Device: HL-DT-ST DVDRW GWA4080MA
USB Device: Built-in iSight, Micron, Up to 480 Mb/sec, 500 mA
USB Device: Apple Internal Keyboard / Trackpad, Apple Computer, Up to 12 
Mb/sec, 500 mA
USB Device: Hub in Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 500 mA
USB Device: Apple Optical USB Mouse, Primax Electronics, Up to 1.5 Mb/sec, 100 
mA
USB Device: Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 250 mA
USB Device: IR Receiver, Apple Computer, Inc., Up to 12 Mb/sec, 500 mA
USB Device: Bluetooth HCI, Up to 12 Mb/sec, 500 mA

Original issue reported on code.google.com by renaud.d...@gmail.com on 1 Feb 2007 at 5:01

GoogleCodeExporter commented 8 years ago
Can you please try to reproduce it (I somehow can't reproduce it based on what 
I think might have happened)? It 
would also be nice if you can share the script that causes this to happen. 
Thanks.

Original comment by si...@gmail.com on 1 Feb 2007 at 8:48

GoogleCodeExporter commented 8 years ago
Question: Did you use the binary installer for "MacFUSE Core 0.1.9" or did you 
compile from source?

Original comment by si...@gmail.com on 2 Feb 2007 at 6:51

GoogleCodeExporter commented 8 years ago
The script I had been using with sshfs under Linux was

    if [ $# != 2 ]; then
        echo Usage: $0 server:/remote/path mount_point
        exit 1
    fi

    point=$2
    server=$1

    if sshfs $server $point -o uid=$UID,gid=$UID
        then echo Successfully mounted $point.
        trap "{ if fusermount -u $point ;
             then echo Successfully unmounted $point. ;
             else echo Error: Unmounting $point failed. ;
             fi ; }" EXIT
        while ls $point > /dev/null
          do sleep 60
        done
    else echo Error: Unable to mount $point
    fi

The while loop was a quick fix for a timeout issue on my machine. I
figured I didn't need it anymore on the mac, and I put

    if [ $# != 1 ]; then
        echo Usage: $0 server:/remote/path
        exit 1
    fi

    server=$1
    tServer="${server//[ :\/]/+}"
    point="/Volumes/$tServer"

    if [ -d "$point" ]; then
        rmdir "$point" || exit 1
    fi
    mkdir "$point" || exit 1
    if sshfs $server "$point" -o uid=$UID,gid=$UID -ovolname="$tServer" \
             -oping_diskarb -oreconnect -oworkaround=rename
        then echo Successfully mounted $point.
        trap "{ if umount $point ;
             then echo Successfully unmounted $point. ;
             else echo Error: Unmounting $point failed. ;
             fi ; }" EXIT
#        while ls "$point" > /dev/null
#          do sleep 60
#        done
    else echo Error: Unable to mount $point
    fi

...forgetting to remove the trap.

I was running FUSE 0.19 binary ditrib. I'll try to reproduce the panic
soon.

Cheers,
Renaud.

Original comment by renaud.d...@gmail.com on 3 Feb 2007 at 10:49

GoogleCodeExporter commented 8 years ago
I've hit the same panic (though it seems like a different mechanism), so I'll 
add it here.

I was trying to reproduce the "Corrupted files in TextMate" issue #103 which 
I've also hit, so was holding 
down cmd-s in TextMate to repeatedly save a ~5kB file to a sshfs mount. In 
another terminal while TextMate 
was still continually saving, I tried "tail filename", and a panic occurred, 
see below. I was using sshfs 1.7 
compiled from source and the MacFuse 0.2.0 binary installer. TextMate is set to 
use "Perform Atomic Saves" 
and the sshfs command is using "-o workaround=rename -o ping_diskarb". I'm not 
sure if there's anything 
else pertinent to add - let me know if there is. I haven't tried to reproduce 
the issue yet.

The backtrace with debug symbols:
0x128d1f <panic+382>:   mov    4317808,%ecx
0x4f4ca1c1 <fuse_vnop_reclaim+228>:     mov    %edi,(%esp)
0x1e3bc2 <VNOP_RECLAIM+88>:     mov    %eax,%ebx
0x1d0432 <vclean+418>:  test   %eax,%eax
0x1d0584 <vnode_reclaim_internal+176>:  mov    64(%ebx),%eax
0x1d080b <vnode_put_locked+161>:        mov    $0x1,%edx
0x1d0841 <vnode_put+27>:        mov    %eax,%esi
0x1de216 <vn_closefile+68>:     mov    %ebx,%eax
0x330464 <closef_locked+443>:   mov    %eax,-96(%ebp)
0x331c3d <close_internal+552>:  mov    %eax,%ebx
0x331d07 <close+122>:   mov    %eax,%ebx
0x378337 <unix_syscall+755>:    mov    %eax,%esi

panic(cpu 0 caller 0x4F4CA1C1): MacFUSE: vnode reclaimed with valid fufh 
(type=2, vtype=1)
Backtrace, Format - Frame : Return Address (4 potential args on stack) 
0x251bbc18 : 0x128d1f (0x3c9540 0x251bbc3c 0x131df4 0x0) 
0x251bbc58 : 0x4f4ca1c1 (0x4f4cff8c 0x2 0x1 0x174e08) 
0x251bbcd8 : 0x1e3bc2 (0x251bbcf4 0x1 0x251bbd18 0x358958) 
0x251bbd18 : 0x1d0432 (0x517ac60 0x251bbd58 0x0 0x2) 
0x251bbd78 : 0x1d0584 (0x7a565dc 0x43ffa0 0x517ac60 0x0) 
0x251bbdc8 : 0x1d080b (0x517ac60 0x1 0x0 0x517ac60) 
0x251bbdf8 : 0x1d0841 (0x517ac60 0x1800400 0x0 0x0) 
0x251bbe18 : 0x1de216 (0x517ac60 0x1 0x4062d04 0x5438bb8) 
0x251bbe48 : 0x330464 (0x5264e18 0x5438bb8 0x0 0x0) 
0x251bbed8 : 0x331c3d (0x7ac6d00 0x5264e18 0x5438bb8 0x198cc3) 
0x251bbf28 : 0x331d07 (0x5438bb8 0xb 0x7ac6d00 0x3) 
0x251bbf68 : 0x378337 (0x5438bb8 0x79fd2b0 0x79fd2f4 0x0) 
0x251bbfc8 : 0x19acae (0x55519dc 0x0 0x8 0x55519dc) No mapping exists for frame 
pointer
Backtrace terminated-invalid frame pointer 0xbffff338
      Kernel loadable modules in backtrace (with dependencies):
         com.google.filesystems.fusefs(0.2.0)@0x4f4c4000

Original comment by matt.gtalkfix@gmail.com on 22 Feb 2007 at 12:52

GoogleCodeExporter commented 8 years ago
In the yet unreleased 0.2.2 version, I fixed a bug that I think is the cause of 
the panic you're seeing. Please try 
0.2.2 when it's out and do report back if your problem is gone.

Original comment by si...@gmail.com on 22 Feb 2007 at 8:37

GoogleCodeExporter commented 8 years ago
This should be fixed in the now released 0.2.2 version. If it isn't, please 
open another issue.

Original comment by si...@gmail.com on 1 Mar 2007 at 12:39