FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sun Nov 29, 2020 01:06



Post new topic Reply to topic  [ 10 posts ] 
Reproduceable Crash on Freebsd 8.1 
Author Message

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Reproduceable Crash on Freebsd 8.1
Hi folks!

I am quite a beginner and tried setting up ntfs-3g on my nas-box running freebsd 8.1 (amd64).
I am using these ports for that purpose:

fusefs-kmod-0.3.9.p1.20080208_6
fusefs-libs-2.7.4
fusefs-ntfs-2010.3.6
samba34-3.4.9


When i mount a USB device e.g. like "mount_ntfs-3g /dev/da0s1 /mnt/somemountpoint/" i can access the files and even modify them. So far so good.
But when I try to access them via a samba share, i can only read them. Modifying or even copying a small file over samba will crash the whole box / reboot it instantly. This is reproducable (even with different usb disks). As there is nothing in the syslog, i am a little bit confused (or better desperated :) ) and each hint is higly appreciated!

regards, licht


Sat Oct 09, 2010 15:49
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Reproduceable Crash on Freebsd 8.1
Hi,

Quote:
Modifying or even copying a small file over samba will crash the whole box / reboot it instantly. This is reproducable (even with different usb disks).


Is the crash specific to small files (typically less than 500 bytes), or can it also occur with files bigger than 1KB ?

Assuming you have some control over your nas :

1) Can you mount with option debug, and get the latest output before the crash (probably not easy)
2) Can you retry with a more recent version of ntfs-3g ?
A possible crash occurring in file creation was fixed in ntfs-3g-2010.6.31-RC, however this bug should not affect existing files (for instance when appending data to an existing file).

Regards

Jean-Pierre


Sun Oct 10, 2010 11:57
Profile

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Re: Reproduceable Crash on Freebsd 8.1
Hi! First - thanks for your quick answer!

I mounted with the debug option and captured the output... unfortunately, the logfile is being emptied on the reboot of the machine (Just have to figure out how to prevent the logfile from being cleared on the reboot. I logged via "ntfs-3g /dev/da0s1 /mnt/mp3/ >& /var/log/smbdebug").

Basically, i just entered the /tmp folder via samba and tried copying in a small gif file. The box reboots instantly - no suspicions entries in the syslog too. It seems that the reboot is that quickly that nothing is written at all.

For the more recent version - i am using the latest port... - i am not too familiar with compiling applications without using the portstree :)

What else could i do to gather more information about this behaviour?


Attachments:
log.zip [564 Bytes]
Downloaded 1006 times
Sun Oct 10, 2010 12:37
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Reproduceable Crash on Freebsd 8.1
Hi,

Quote:
unfortunately, the logfile is being emptied on the reboot of the machine (Just have to figure out how to prevent the logfile from being cleared on the reboot. I logged via "ntfs-3g /dev/da0s1 /mnt/mp3/ >& /var/log/smbdebug").

There is nothing unusual in the log you posted.
The biggest problem here is buffering. When redirecting stderr with 2> there is supposed to be a line buffering, I do not know what kind of buffering is done with >&. Anyway you had a system crash which can have happened before the cache could be synced, so this must be the end of road in that direction.
Quote:
The box reboots instantly - no suspicions entries in the syslog too. It seems that the reboot is that quickly that nothing is written at all.

This looks like a system crash, and ntfs-3g, a user-space program, is very unlikely to have triggered it.
Quote:
i am not too familiar with compiling applications without using the portstree

This makes is difficult for me to investigate. I am not using Freebsd myself, and I have not seen any similar report on other platforms.
Quote:
What else could i do to gather more information about this behaviour?

Try to be more precise about the circumstances of the crash : does it occur only on small files ? does it occur only on new files ? does it occur on any kinds of updates (rm, ln, mv, mkdir, etc.) ? does it only occur with Samba ?

Regards

Jean-Pierre


Sun Oct 10, 2010 14:20
Profile

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Re: Reproduceable Crash on Freebsd 8.1
Hi!

Quote:
This looks like a system crash, and ntfs-3g, a user-space program, is very unlikely to have triggered it.

Sound reasonable - but nevertheless: the box reboots only when writing to ntfs-3g via samba :(

Trying to be more precise:
What does work without crashing:
o writeaccess via ssh like copying files from internal disk /home/blabla to the mounted device using ntfs-3g
- this includes: deleting, renaming, touching, coping new files in etc. Not depending of filesize or type.
o Reading via samba, Copying FROM samba to another computer

What ends in an instant reboot (not one line of shutting down etc. in the logs):
o any writeaccess triggered via Samba (copying to, deleting, renaming etc.). Not depending of filesize or type.

Playing around with this is pretty annoying as the ntfs-disk is always killed without unmounting - dont want to mess up that filesystem :(

Additional info: This is a freshly set up server for me... before that one, i used an intel (not AMD64) and freebsd 6.4 instead of 8.1 - there the same disk and network worked without problems (I could read and write to those usb disks mounted with ntfs-3g).

I wish there was at least more logging information ;(


Sun Oct 10, 2010 15:10
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Reproduceable Crash on Freebsd 8.1
Hi,

Quote:
What does work without crashing:
o writeaccess via ssh like copying files from internal disk /home/blabla to the mounted device using ntfs-3g
- this includes: deleting, renaming, touching, coping new files in etc. Not depending of filesize or type.

So, I have to assume the write path from an application to an ntfs device through fuse and ntfs-3g is mostly ok, and something directly related to Samba is at stake. Maybe some file system call specific to Samba which creates a problem in the fuse kernel module (this is the only place I can think of, which can cause a kernel crash).
Quote:
Additional info: This is a freshly set up server for me... before that one, i used an intel (not AMD64) and freebsd 6.4 instead of 8.1

Did you switch from a 32-bit kernel to a 64-bit one ?
Quote:
I wish there was at least more logging information

Maybe you can try mounting ntfs-3g in debug mode through a ssh connection and leave the window open to get an on-screen log, then write through Samba from another window, in order to get the latest log item which could not get to be written to disk in your previous try.

Googling for crashes similar to the one you experience, I found a couple of reports from the same author :
http://groups.google.com/group/mailing. ... edf2965891
http://groups.google.com/group/mailing. ... df112bf19a
both mentions using Samba and fuse, but neither mentions using ntfs-3g... and neither got answered.

I suggest you post a report to Samba and/or fuse, they are more likely to be able to help.

Regards

Jean-Pierre


Sun Oct 10, 2010 19:04
Profile

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Re: Reproduceable Crash on Freebsd 8.1
Hi! I tried now with samba-3.3.13_1 - Same situation :(


Tue Oct 12, 2010 15:42
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: Reproduceable Crash on Freebsd 8.1
Hi,

See http://groups.google.com/group/mailing. ... 95d728c46e
There is a discussion about this crash (with inputs from the guy I referenced earlier), leading to a patch available in http://www.freebsd.org/cgi/query-pr.cgi?pr=149674 however I do not see a clear conclusion that the patch solves the issue.

You should contact these people to get more information.

Also note the patch applies to the fuse *kernel module* so the procedures for compiling and installing are different from those related to the fuse library (which is why some declaration got dissimilar and caused the crash the mentioned patch fixes), but I cannot help you in this area.

Regards

Jean-Pierre


Tue Oct 12, 2010 17:26
Profile

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Re: Reproduceable Crash on Freebsd 8.1
Lol i am real a lucker - looks like the freebsd of ntfs-3g port has been updated (2010.10.11) yesterday :) As soon as i can cvsup i will give it a try and report here if it worked!
Thx anyway - great support!


Tue Oct 12, 2010 17:32
Profile

Joined: Sat Oct 09, 2010 15:34
Posts: 6
Post Re: Reproduceable Crash on Freebsd 8.1
I found a solution - and in case anyone else finds this thread via google - here is the solution:

First: The panic is a result of a change in 8.x freebsd... its not present in earlier versions. Addtionally, it is not only a matter of ntfs within fusefs but also the other "alien" filesystems :)

To get fusefs running again do the following:
o update your portstree and update fusefs-ntfs (at least to 2010-10-11)
o Get the patch from this thread (Important: Download it e.g. via wget - DONT copy / paste!)
o Rename/Copy the patch to this location: /usr/ports/sysutils/fusefs-kmod/patch-fuse_module__fuse_main.c
o do a make within the /usr/ports/sysutils/fusefs-kmod/ to make sure it compiles
o make install clean
o reboot

Have fun and thanks again to the support here!


Wed Oct 13, 2010 14:39
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.