# ntfs3g or fuse freezing kernel

## shimage

I recently upgraded to the 2.6.24-r4 kernel, from 2.6.19 because of an issue with dhcpcd-3.2.3 being broken with the older kernel. While I never had any problems with the old kernel, fuse (or ntfs3g, I'm not entirely sure which is the problem) freezes my computer on a random file write to ntfs. I'm using ntfs3g-1.2310 and the kernel's fuse driver; ntfs3g-1.1120 wants to install the old fuse package (which reputedly doesn't play nice with the 2.6.24 kernel). According to https://forums.gentoo.org/viewtopic-t-667016-highlight-ntfs3g+freeze.html, switching from the fuse package to the kernel's fuse driver is all I needed to do to fix this problem, but this does not seem to be the case for me. It doesn't crash immediately on a file write, but eventually one ntfs file write or another causes the system to freeze. 

I know this isn't a hardware problem because I don't have this problem with Windows, nor did I have the problem with the 2.6.19 kernel. Any help would be appreciated; if some extra information would make you more helpful, please don't hesitate to ask for it.

----------

## pappy_mcfae

Fuse and ntfs3g play very well with 2.6.22-gentoo-r-10. It's newer than your old kernel version, and there are some serious advantages to using that kernel version versus the .23 and .24 versions.

Blessed be!

Pappy

----------

## irgu

It sounds like you are still using the fuse kernel module from the fuse package for some reasons. The hangs you described are easily reproducible with that one but I have never had problems with the fuse kernel module from the kernel. 

The fuse package will drop the fuse kernel module to prevent such problems in the future.

----------

## pappy_mcfae

That makes sense. No wonder my use of fuse is so error-free. I have it compiled as a module from my kernel. Learning something new everyday! Thanks for the info.

Blessed be!

Pappy

----------

## shimage

I'm sorry; I tried to make it as apparent as I could that I was using in-kernel fuse. I am (and was, with the 2.6.24 kernel) using the in-kernel fuse. I did not have the fuse package installed (it's still not installed). Using the fuse that comes with the 2.6.24 kernel, file writes randomly crash my computer. This doesn't happen with either of the other two recent kernels I've used (2.6.19 and 2.6.22). 

I switched to the 2.6.22 kernel (as suggested), and that seemed to fix things ... except that I had to also switch back to the ipw3945 driver (instead of iwl3945). It's not really a solution, but there don't seem to be any better ideas (I certainly don't have any). Thanks for the suggestions anyway.

----------

## irgu

 *shimage wrote:*   

> Using the fuse that comes with the 2.6.24 kernel, file writes randomly crash my computer. 

 

Crash or freeze? They are not the same. The FUSE problem freezes the box. Crashes suggest some hardware or device driver problem related to your storage device. This can happen with some external USB drives (e.g. Seagate, Lacie). 

What's in your kernel kernel log?

----------

## pappy_mcfae

 *shimage wrote:*   

> I'm sorry; I tried to make it as apparent as I could that I was using in-kernel fuse. I am (and was, with the 2.6.24 kernel) using the in-kernel fuse. I did not have the fuse package installed (it's still not installed). Using the fuse that comes with the 2.6.24 kernel, file writes randomly crash my computer. This doesn't happen with either of the other two recent kernels I've used (2.6.19 and 2.6.22). 

 

You're right, I didn't understand. Now that I do, I'd say you need to fill out a bug report and go back to one of the stable kernels you were using. Also, if you haven't done it yet, emerge the application fuse. That way, you get libfuse and some other things that the fuse module needs. You could try 2.6.25.x kernels as well. I just set one up on my machine, and fuse is working as expected.

Blessed be!

Pappy

----------

## pawstar

I have the same problem and its really starting to get on my nerves.  I have also seen that apparent work-around, but its a no-go for me, it didn't change a thing.  I have uninstalled the fuse ebuild package, masked it, compiled fuse into my kernel and I still get random freezes.  This is with kernel 2.6.24.x.

Is there any reason why the in-kernel ntfs driver has not been updated to include proper write support?  If the necessary ntfs algorithms are known (i.e. they are in ntfs-3g which is open-source) what is the holdup?

What I did notice is that it seems to crash more frequently when there are more programs using the same disk rather than a single program accessing it. (mutex or semaphore problem somewhere)?

Cheers!

----------

## irgu

Try the fuse kernel module from the fuse 2.7.3 package. I think that one fixed the freeze too.

Also make sure you are using the new fuse kernel module. E.g. rmmod the old and modprobe the new one.

----------

## shimage

 *irgu wrote:*   

>  *shimage wrote:*   Using the fuse that comes with the 2.6.24 kernel, file writes randomly crash my computer.  
> 
> Crash or freeze? They are not the same. The FUSE problem freezes the box. Crashes suggest some hardware or device driver problem related to your storage device. This can happen with some external USB drives (e.g. Seagate, Lacie). 
> 
> What's in your kernel kernel log?

 

I'm not sure I understand the difference between freezing and crashing. I guess it's freezing? What happens is, first the file write stalls, which also locks anything to do with the particular drive that was being written to; CPU usage sticks to 100%; then eventually everything else stops too. Sometimes I can still move my mouse around, sometimes not. I haven't been able to completely logout out of KDE whenever this happens. Also, while the problem did occur with my USB drive, my primary grievance was it happening with my shared partition (which I've since reformatted reiserfs in an attempt to alleviate my dependance on ntfs). 

What's the kernel log? dmesg? 

As for making sure I had the right module loaded, I did rmmod the old module. After that, something crashed/froze to make the computer completely unresponsive; I then started my computer again, which I am assuming loaded the new module (since I'd uninstalled the old one); something crashed/froze my computer; rinse, repeat. It didn't stop until I went to an older kernel.

I run mostly stable packages, so when the suggested stuff hits stable, I'll give them a try. For now I think I'll stick with the older kernel. Thanks for the tips.

----------

## pawstar

 *irgu wrote:*   

> Try the fuse kernel module from the fuse 2.7.3 package. I think that one fixed the freeze too.
> 
> Also make sure you are using the new fuse kernel module. E.g. rmmod the old and modprobe the new one.

 

I definitely have the module removed - completely deleted from disk actually, and at the moment its compiled it into the kernel.

I checked my logs and there isn't much that would indicate anything unusual: just version numbers, mount & unmount events and the mount options.   The only weird one is : "Not enough space to extended mft data: Operation not supported", but that disk is somewhat low on space and most likely very fragmented.

The only relevant bit of info I can find from one of the crashes is when I start to raise some elephants:

```
Apr  7 19:15:54 name mount.ntfs-3g S 0000000000000000     0  3215      1

Apr  7 19:15:54 name ffff810243d8fc48 0000000000000082 0000000000000000 0000000000000001

Apr  7 19:15:54 name ffff81028cd62e28 0000000000000000 ffffffff80803f00 ffffffff80803f00

Apr  7 19:15:54 name ffffffff808013a0 ffffffff80803f00 ffff810243d8fc08 ffff810243d8fbf8

Apr  7 19:15:54 name Call Trace:

Apr  7 19:15:54 name [<ffffffff80234fe3>] __wake_up+0x43/0x70

Apr  7 19:15:54 name [<ffffffff803b6b51>] fuse_dev_read+0x281/0x550

Apr  7 19:15:54 name [<ffffffff803b6260>] fuse_dev_write+0x0/0x420

Apr  7 19:15:54 name [<ffffffff802af07b>] do_sync_readv_writev+0xcb/0x110

Apr  7 19:15:54 name [<ffffffff80236a30>] default_wake_function+0x0/0x10

Apr  7 19:15:54 name [<ffffffff802af2b9>] do_sync_read+0xd9/0x120

Apr  7 19:15:54 name [<ffffffff802532a0>] autoremove_wake_function+0x0/0x30

Apr  7 19:15:54 name [<ffffffff805f981f>] thread_return+0x3a/0x54b

Apr  7 19:15:54 name [<ffffffff802afc09>] vfs_read+0xe9/0x170

Apr  7 19:15:54 name [<ffffffff802b00a3>] sys_read+0x53/0x90

Apr  7 19:15:54 name [<ffffffff8020bd4e>] system_call+0x7e/0x83
```

----------

## irgu

Aha, you use x86-64! I suggest reporting the problem to

fuse-devel@lists.sourceforge.net

----------

## gentunian

 *Quote:*   

> I definitely have the module removed - completely deleted from disk actually, and at the moment its compiled it into the kernel.

 

Hi there,

Have you read this post? (About compiling the fuse outside the kernel)

https://forums.gentoo.org/viewtopic-t-669497-highlight-.html

regards

----------

