ports/169165: sysutils/fusefs-kmod: calling fchown(2) on sshfs filesystem causes panic
Henry Hu
henry.hu.sh at gmail.com
Mon Aug 13 03:00:07 UTC 2012
The following reply was made to PR ports/169165; it has been noted by GNATS.
From: Henry Hu <henry.hu.sh at gmail.com>
To: bug-followup at freebsd.org, dh at bsd.ee, mirror176 at cox.net
Cc:
Subject: Re: ports/169165: sysutils/fusefs-kmod: calling fchown(2) on sshfs
filesystem causes panic
Date: Sun, 12 Aug 2012 22:57:51 -0400
I'm hitting the same problem. When I copy files to a NTFS partition
mounted with ntfs-3g, the machine panics.
The panic message is nearly identical. It's also a fchown syscall
which leads to page fault at address 0, and the problem is that eip is
0.
The patch in this post should fix the problem:
http://www.mail-archive.com/freebsd-users-jp@jp.freebsd.org/msg04947.html
I tried this patch and it works.
It seems like that the problem is the new fields, fo_chmod and
fo_chown, in struct fileops, which is introduced in r224914 for file
sys/sys/file.h, is not initialized by fusefs-kmod.
It's similar to another problem:
http://www.freebsd.org/cgi/query-pr.cgi?pr=149674
http://www.freebsd.org/cgi/query-pr.cgi?pr=149538
http://forums.freebsd.org/archive/index.php/t-16759.html
which is fixed with a similar patch. This problem is caused by new
field fo_truncate in struct fileops.
Panic message:
-- Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address = 0x0
fault code = supervisor read, page not present
instruction pointer = 0x20:0x0
stack pointer = 0x28:0xef885c28
frame pointer = 0x28:0xef885c50
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, def32 1, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 6163 (cp)
trap number = 12
panic: page fault
cpuid = 1
KDB: stack backtrace:
db_trace_self_wrapper(c09f0277,0,c0c5efe0,7a3,c5f2b7f0,...) at
0xc04d88b6 = db_trace_self_wrapper+0x26
kdb_backtrace(c0a28b7b,1,c09b9cae,ef885abc,1,...) at 0xc06deaca =
kdb_backtrace+0x2a
panic(c09b9cae,c0a29702,c826ba54,1,1,...) at 0xc06ab27f = panic+0x16f
trap_fatal(101a4,3e9,0,ed00ff0e,8713,...) at 0xc096f093 = trap_fatal+0x323
trap_pfault(0,0,0,c7db6580,cc705b40,...) at 0xc096f17c = trap_pfault+0xdc
trap(ef885be8) at 0xc0970093 = trap+0x423
calltrap() at 0xc095970c = calltrap+0x6
--- trap 0xc, eip = 0, esp = 0xef885c28, ebp = 0xef885c50 ---
(null)(c826b8a0,ef885ccc,c,ef885d60,16,...) at 0
syscall(ef885d08) at 0xc096f7e1 = syscall+0x331
Xint0x80_syscall() at 0xc0959771 = Xint0x80_syscall+0x21
--- syscall (123, FreeBSD ELF32, sys_fchown), eip = 0x280bd95b, esp =
0xbfbfe52c, ebp = 0xbfbfe5b8 ---
Cheers,
Henry
More information about the freebsd-ports-bugs
mailing list