Thanks for the info.ok, I attached both sdcard daemons (internal and external) to gdb and ran the file copy test again.
When the copy hung, breaking to gdb and doing info threads shows:
(gdb) info threads
Id Target Id Frame
3 Thread 4478 read () at bionic/libc/arch-arm/syscalls/read.S:9
2 Thread 4477 read () at bionic/libc/arch-arm/syscalls/read.S:9
* 1 Thread 4467 read () at bionic/libc/arch-arm/syscalls/read.S:10
(gdb) info threads
Id Target Id Frame
3 Thread 4475 read () at bionic/libc/arch-arm/syscalls/read.S:9
2 Thread 4474 read () at bionic/libc/arch-arm/syscalls/read.S:9
* 1 Thread 4468 read () at bionic/libc/arch-arm/syscalls/read.S:10
If I'm reading this correctly, it means that the worker threads are waiting for fuse request in line 1545
ssize_t len = read(fuse->fd, handler->request_buffer, sizeof(handler->request_buffer));
and the inotify thread is also waiting for inotify event in read()
If the hang was caused by read from sdcard, it should be pread64 syscall instead, right?
This is getting really weird, because it implies that the sdcard daemon is itself not hanging. All of the threads are blocking either:
1) Waiting for an inotify event (the inotify thread)
2) Waiting for a FUSE request to come from the FUSE event queue (/dev/fuse)
this is weird... Looks like the daemon is just sitting there waiting for a request and it's not getting one.
Question - when things start going badly, is it just that file affected, or do all file accesses to the sdcard get hosed?
Also, when it's broken - are you able to access the control filesystem described in https://android.googlesource.com/ke...ndroid-3.8/Documentation/filesystems/fuse.txt ?
Specifically, are there any "waiting" requests in /sys/fs/fuse/connections when it's hung?
Last edited: