Code Monkey home page Code Monkey logo

Comments (11)

relan avatar relan commented on June 9, 2024

fuse-exfat should work with any block device. It makes no difference between a whole device and a partition. Try to attach to the mount.exfat-fuse process to see where it hangs. BTW which kernel and libc versions are used on this board?

from exfat.

gongzhifeng avatar gongzhifeng commented on June 9, 2024

kernel 3.10.73+
libc 2.19-2014.08
gcc version 4.9.2 20140904
When umount hang, the mount.exfat-fuse process is still alive. Coud you tell me how to attach the mount.exfat-fuse process?
And there's no such issue when using "mkfs.vfat /dev/mmcblk0".
Coud you reproduce the issue?

from exfat.

relan avatar relan commented on June 9, 2024

Coud you tell me how to attach the mount.exfat-fuse process?

gdb -p PID

from exfat.

gongzhifeng avatar gongzhifeng commented on June 9, 2024

I tried, but there's no detail information.
gdb attach in a console, umount in another console:

ps x

338 ? Ss 0:00 mount.exfat /dev/mmcblk0 /sdcard -o errors=remount-ro

gdb -p 338

GNU gdb (crosstool-NG - Linaro Multilib GCC [CortexA9 & ARMv6k] 2014.09) 7.8-2014.09
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://bugs.launchpad.net/gcc-linaro.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 339
Reading symbols from /usr/sbin/mount.exfat-fuse...done.
Reading symbols from /usr/lib/libfuse.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libfuse.so.2
Reading symbols from /lib/libpthread.so.0...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/ld-linux-armhf.so.3...done.
Loaded symbols for /lib/ld-linux-armhf.so.3
0x76ea3004 in read () at ../sysdeps/unix/syscall-template.S:81
81 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) c
Continuing.

from exfat.

gongzhifeng avatar gongzhifeng commented on June 9, 2024

Maybe it hung into libfuse, but libfuse is stripped, no more debug info.
Reading symbols from /usr/lib/libfuse.so.2...(no debugging symbols found)...done.
Using "strace umount /sdcard", the log show hung "umount(...)" system_call.

from exfat.

relan avatar relan commented on June 9, 2024

I can't debug this issue for you. I can only give some advice:

  1. Get the stack trace of mount.exfat while it hangs.
  2. Look for I/O errors in the kernel log. They may be the reason of problems.

from exfat.

gongzhifeng avatar gongzhifeng commented on June 9, 2024

I try to get the stack trace of mount.exfat, but when "umount" cmd hangs, the gdb also hangs, "Ctrl+C" still can't get interrupt signal, so can't get backtrace.
Maybe it is kernel hang partially, so I trace the kernel, it is blocked in

version linux-3.10
file: kernel/linux/fs/fuse/dev.c
function: wait_answer_interruptible
blocked line: wait_event_interruptible

but no I/O errors in kernel at all.
If this is not exfat bug, where can I report or get help?
Thank you very much!

from exfat.

relan avatar relan commented on June 9, 2024

It's very strange that thread hangs in wait_answer_interruptible. Looks like a deadlock. Try to contact board's vendor.

BTW you can run mount.exfat-fuse under strace to see the last syscall before the hang.

Does unmounting of other FUSE-based filesystems (like ntfs-3g) work?

from exfat.

gongzhifeng avatar gongzhifeng commented on June 9, 2024

BTW you can run mount.exfat-fuse under strace to see the last syscall before the hang.

when insert sdcard, mount.exfat-fuse process will auto run, and fork child process.
So I run strace -p $PID -f, the last syscall is close before the hang. the log is
# strace -p 384 -f
Process 384 attached
read(4, "8\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 135168) = 56
writev(4, [{"x\0\0\0\0\0\0\0\2\0\0\0\0\0\0\0", 16},{"\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\200\0\0\0\0\0\0"..., 104}], 2) = 120
read(4, "0\0\0\0\2\0\0\0\3\0\0\0\0\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 135168) = 48
read(4, "(\0\0\0&\0\0\0\4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 135168) = 40
pwrite(3, "\353v\220EXFAT \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512, 0) = 512
fsync(3) = 0
close(3

Does this hang happen only with fuse-exfat? Does unmounting of native filesystems (like ext4 or f2fs) work? Do other FUSE-based filesystems (like ntfs-3g) work?

I didn't try ext4 or f2fs because of tools not ready, but try vfat on board, umount is ok.
And the fuse-exfat umount is ok on PC Ubuntu 14.04.4 LTS.

from exfat.

relan avatar relan commented on June 9, 2024

From this strace output we can see that mount.exfat-fuse hangs on closing /dev/mmcblk0. Source code is

void exfat_unmount(struct exfat* ef)
{
    ...
    finalize_super_block(ef);    <<< pwrite and fsync
    exfat_close(ef->dev);        <<< close
    ...
}

I'd say it's a kernel bug given that mount.exfat-fuse does not hang when it closes /dev/mmcblk0p1. For mount.exfat-fuse there is absolutely no difference between a partition and a whole device, in both cases it works in exactly the same way.

from exfat.

relan avatar relan commented on June 9, 2024

No replies in 7 months, closing. Feel free to reopen if you have any new info.

from exfat.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.