{"action":"created","issue":{"url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/148","labels_url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/148/comments","events_url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/148/events","html_url":"https://github.com/astrada/google-drive-ocamlfuse/issues/148","id":120152471,"number":148,"title":"google-drive-ocamlfuse crashes when accessing many files","user":{"login":"CorvusCorax","id":569222,"avatar_url":"https://avatars.githubusercontent.com/u/569222?v=3","gravatar_id":"","url":"https://api.github.com/users/CorvusCorax","html_url":"https://github.com/CorvusCorax","followers_url":"https://api.github.com/users/CorvusCorax/followers","following_url":"https://api.github.com/users/CorvusCorax/following{/other_user}","gists_url":"https://api.github.com/users/CorvusCorax/gists{/gist_id}","starred_url":"https://api.github.com/users/CorvusCorax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorvusCorax/subscriptions","organizations_url":"https://api.github.com/users/CorvusCorax/orgs","repos_url":"https://api.github.com/users/CorvusCorax/repos","events_url":"https://api.github.com/users/CorvusCorax/events{/privacy}","received_events_url":"https://api.github.com/users/CorvusCorax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-12-03T11:45:40Z","updated_at":"2015-12-04T12:30:36Z","closed_at":null,"body":"Hi,   I was trying to run nbd-server in \"treefiles\" configuration in a directory mounted with google-drive-ocamlfuse for a performance test.\r\nHowever every time I try to \"mkfs.ext3\" on the simulated 1 GB block device, google-drive-ocamlfuse crashes hard towards the end of the mkfs command.\r\n```\r\n@ mkfs.ext3 /dev/nbd0 \r\nmke2fs 1.42.13 (17-May-2015)\r\nCreating filesystem with 262144 4k blocks and 65536 inodes\r\nFilesystem UUID: d8e7450e-d860-4d60-a521-7122443cf408\r\nSuperblock backups stored on blocks: \r\n        32768, 98304, 163840, 229376\r\n\r\nAllocating group tables: done                            \r\nWriting inode tables: done                            \r\nCreating journal (8192 blocks): done\r\nWriting superblocks and filesystem accounting information:\r\n```\r\n\r\n\r\ngoogle-drive-ocamlfuse was setup to mount the gdrive in /mnt/googledrive with the following configuration:\r\n```\r\nmax_cache_size_mb=512\r\nmap_icon=\r\nmap_format=desktop\r\nlarge_file_threshold_mb=16\r\nforce_docs_export=true\r\nnew_revision=false\r\nsqlite3_busy_timeout=500\r\nread_only=false\r\nconflict_resolution=client\r\ndrawing_icon=\r\nverification_code=\r\ndrawing_format=png\r\ndelete_forever_in_trash_folder=false\r\ndocument_format=odt\r\nform_format=ods\r\ndocument_icon=\r\ndocs_file_extension=true\r\nkeep_duplicates=false\r\npresentation_format=pdf\r\nstream_large_files=false\r\ndownload_docs=false\r\nclient_secret=\r\nmetadata_cache_time=60\r\nclient_id=\r\nspreadsheet_icon=\r\nspreadsheet_format=ods\r\nform_icon=\r\ndebug=true\r\ncurl_debug_off=false\r\npresentation_icon=\r\numask=0o022\r\n```\r\nnbd server was run with the following config:\r\n```\r\n[generic]\r\nallowlist=true\r\n[treefiletest]\r\nexportname=/mnt/googledrive/container\r\ntreefiles = true\r\nfilesize = 1073741824\r\n```\r\n\r\nThe treefiles feature of nbd-server is not very well documented. It was added in 2014 to allow hosting a virtual block device specifically on slow network filesystems with \"per file\" transfer like ftp-fs, ssh-fs, webdavfs and otherfilesystems in user space. Usually when having a virtual block device in a file, you end up with one very large file (like >1GB) with many small changes in it.\r\nOn a file based network filesystem that would often lead to the following atomic process flow:\r\n1. download 10 GB file from server\r\n2. change the 2 bytes as requested by nbd-server in atomic write() command\r\n3. upload the 10 GB file back to the server\r\nEven if we assume the fuse filesystem has caching, this is completely unfeasible.\r\nWith \"treefiles=true\" nbd-server simulates a block device not as a single large image file, but with many small files (one per \"block\") in a tree hirarchy, which looks like this:\r\n```\r\n@ find /mnt/googledrive/container\r\n/mnt/googledrive/container/\r\n/mnt/googledrive/container/TREE0000\r\n/mnt/googledrive/container/TREE0000/FILE0030\r\n/mnt/googledrive/container/TREE0000/FILE0002\r\n/mnt/googledrive/container/TREE0000/FILE0006\r\n/mnt/googledrive/container/TREE0000/FILE0005\r\n/mnt/googledrive/container/TREE0000/FILE0004\r\n/mnt/googledrive/container/TREE0000/FILE000E\r\n/mnt/googledrive/container/TREE0000/FILE000D\r\n/mnt/googledrive/container/TREE0000/FILE000C\r\n/mnt/googledrive/container/TREE0000/FILE000B\r\n/mnt/googledrive/container/TREE0000/FILE000A\r\n/mnt/googledrive/container/TREE0000/FILE0009\r\n/mnt/googledrive/container/TREE0000/FILE0008\r\n/mnt/googledrive/container/TREE0000/FILE002F\r\n/mnt/googledrive/container/TREE0000/FILE002E\r\n/mnt/googledrive/container/TREE0000/FILE002D\r\n/mnt/googledrive/container/TREE0000/FILE002C\r\n/mnt/googledrive/container/TREE0000/FILE002B\r\n/mnt/googledrive/container/TREE0000/FILE002A\r\n...\r\n/mnt/googledrive/container/TREE00FF/FILE038E\r\n/mnt/googledrive/container/TREE00FF/FILE03A4\r\n/mnt/googledrive/container/TREE00FF/FILE03AB\r\n/mnt/googledrive/container/TREE00FF/FILE03B6\r\n/mnt/googledrive/container/TREE00FF/FILE03CE\r\n/mnt/googledrive/container/TREE00FF/FILE03E0\r\n/mnt/googledrive/container/TREE00FF/FILE03F8\r\n/mnt/googledrive/container/TREE00FF/FILE03DF\r\n/mnt/googledrive/container/TREE00FF/FILE03FF\r\n/mnt/googledrive/container/TREE00FF/FILE03FE\r\n/mnt/googledrive/container/TREE00FF/FILE03F0\r\n```\r\nwhere each FILE#### is 4096 bytes in size (one block)\r\nThis should in theory allow the userspace filesystem to work very performantly despite the file based transferring - especially if it invokes caching like google-drive-ocamlfuse does\r\n\r\n(the block files are sparse, which means only the files of blocks actually accessed get created. You can simulate a filesystem on a blockdevice with many terabytes in only a few MB - as long as you don't actually ever store that much data)\r\n\r\nHowever, as mentioned, google-drive-ocamlfuse crashes just as the mkfs command is almost finished (with only around 460 files/blocks actually being written into the gdrive filesystem in 2 different subfolders and a size of only 1.7 megabytes in total )\r\n\r\n```\r\n@ .opam/system/bin/google-drive-ocamlfuse -o allow_root -skiptrash -m -f /mnt/googledrive/ -cc\r\nClearing cache...done\r\n*** longjmp causes uninitialized stack frame ***: .opam/system/bin/google-drive-ocamlfuse terminated\r\n======= Backtrace: =========\r\n/lib64/libc.so.6(+0x71e4e)[0x7ff3b280fe4e]\r\n/lib64/libc.so.6(__fortify_fail+0x47)[0x7ff3b2897f67]\r\n/lib64/libc.so.6(+0xf9e6d)[0x7ff3b2897e6d]\r\n/lib64/libc.so.6(__longjmp_chk+0x29)[0x7ff3b2897dc9]\r\n/usr/lib64/libcurl.so.4(+0xa295)[0x7ff3b3499295]\r\n/lib64/libpthread.so.0(+0x10a90)[0x7ff3b3929a90]\r\n/lib64/libpthread.so.0(read+0x2d)[0x7ff3b3928bdd]\r\n/usr/lib64/libfuse.so.2(+0x18ada)[0x7ff3b3059ada]\r\n/usr/lib64/libfuse.so.2(__fuse_read_cmd+0x5f)[0x7ff3b304d65f]\r\n.opam/system/bin/google-drive-ocamlfuse(camlidl_Fuse_bindings_fuse_read_cmd+0x28)[0x672a8a]\r\n.opam/system/bin/google-drive-ocamlfuse(camlFuse_lib__fuse_loop_1010+0x5c)[0x609d7c]\r\n.opam/system/bin/google-drive-ocamlfuse[0x692516]\r\n.opam/system/bin/google-drive-ocamlfuse(mainloop+0xe4)[0x677db5]\r\n.opam/system/bin/google-drive-ocamlfuse(ml_fuse_main+0x85)[0x677e77]\r\n.opam/system/bin/google-drive-ocamlfuse(camlidl_Fuse_bindings_ml_fuse_main+0xda)[0x672bf3]\r\n.opam/system/bin/google-drive-ocamlfuse(camlFuse__main_1073+0x7d)[0x60a7ed]\r\n.opam/system/bin/google-drive-ocamlfuse(camlGdfuse__entry+0xa86)[0x4dba66]\r\n.opam/system/bin/google-drive-ocamlfuse(caml_program+0x7d9)[0x4d1469]\r\n.opam/system/bin/google-drive-ocamlfuse[0x692516]\r\n======= Memory map: ========\r\n00400000-00710000 r-xp 00000000 fc:01 379205                             /home/raven/.opam/system/bin/google-drive-ocamlfuse\r\n00910000-00911000 r--p 00310000 fc:01 379205                             /home/raven/.opam/system/bin/google-drive-ocamlfuse\r\n00911000-00a2d000 rw-p 00311000 fc:01 379205                             /home/raven/.opam/system/bin/google-drive-ocamlfuse\r\n00a2d000-00a3d000 rw-p 00000000 00:00 0 \r\n01fe0000-02124000 rw-p 00000000 00:00 0                                  [heap]\r\n7ff39c000000-7ff39d76b000 rw-p 00000000 00:00 0 \r\n7ff39d76b000-7ff3a0000000 ---p 00000000 00:00 0 \r\n7ff3a0000000-7ff3a25d7000 rw-p 00000000 00:00 0 \r\n7ff3a25d7000-7ff3a4000000 ---p 00000000 00:00 0 \r\n7ff3a77ff000-7ff3a7800000 ---p 00000000 00:00 0 \r\n7ff3a7800000-7ff3a8000000 rw-p 00000000 00:00 0 \r\n7ff3a8000000-7ff3aa8a2000 rw-p 00000000 00:00 0 \r\n7ff3aa8a2000-7ff3ac000000 ---p 00000000 00:00 0 \r\n7ff3ad4c4000-7ff3ad4d7000 r-xp 00000000 fc:01 10849281                   /lib64/libresolv-2.21.so\r\n7ff3ad4d7000-7ff3ad6d7000 ---p 00013000 fc:01 10849281                   /lib64/libresolv-2.21.so\r\n7ff3ad6d7000-7ff3ad6d8000 r--p 00013000 fc:01 10849281                   /lib64/libresolv-2.21.so\r\n7ff3ad6d8000-7ff3ad6d9000 rw-p 00014000 fc:01 10849281                   /lib64/libresolv-2.21.so\r\n7ff3ad6d9000-7ff3ad6db000 rw-p 00000000 00:00 0 \r\n7ff3ad6db000-7ff3ad6e0000 r-xp 00000000 fc:01 10849285                   /lib64/libnss_dns-2.21.so\r\n7ff3ad6e0000-7ff3ad8df000 ---p 00005000 fc:01 10849285                   /lib64/libnss_dns-2.21.so\r\n7ff3ad8df000-7ff3ad8e0000 r--p 00004000 fc:01 10849285                   /lib64/libnss_dns-2.21.so\r\n7ff3ad8e0000-7ff3ad8e1000 rw-p 00005000 fc:01 10849285                   /lib64/libnss_dns-2.21.so\r\n7ff3ad8e1000-7ff3ad8ec000 r-xp 00000000 fc:01 10849292                   /lib64/libnss_files-2.21.so\r\n7ff3ad8ec000-7ff3adaeb000 ---p 0000b000 fc:01 10849292                   /lib64/libnss_files-2.21.so\r\n7ff3adaeb000-7ff3adaec000 r--p 0000a000 fc:01 10849292                   /lib64/libnss_files-2.21.so\r\n7ff3adaec000-7ff3adaed000 rw-p 0000b000 fc:01 10849292                   /lib64/libnss_files-2.21.so\r\n7ff3adaed000-7ff3adaee000 ---p 00000000 00:00 0 \r\n7ff3adaee000-7ff3ae2ee000 rw-p 00000000 00:00 0 \r\n7ff3ae2ee000-7ff3ae2ef000 ---p 00000000 00:00 0 \r\n7ff3ae2ef000-7ff3aeaef000 rw-p 00000000 00:00 0                          [stack:776]\r\n7ff3aeaef000-7ff3aeaf0000 ---p 00000000 00:00 0 \r\n7ff3aeaf0000-7ff3af2f0000 rw-p 00000000 00:00 0                          [stack:5891]\r\n7ff3af6b2000-7ff3af8b4000 rw-p 00000000 00:00 0 \r\n7ff3af8b4000-7ff3b116a000 r-xp 00000000 fc:01 9635169                    /usr/lib64/libicudata.so.55.1\r\n7ff3b116a000-7ff3b1369000 ---p 018b6000 fc:01 9635169                    /usr/lib64/libicudata.so.55.1\r\n7ff3b1369000-7ff3b136a000 r--p 018b5000 fc:01 9635169                    /usr/lib64/libicudata.so.55.1\r\n7ff3b136a000-7ff3b136b000 rw-p 018b6000 fc:01 9635169                    /usr/lib64/libicudata.so.55.1\r\n7ff3b136b000-7ff3b1381000 r-xp 00000000 fc:01 7062643                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1\r\n7ff3b1381000-7ff3b1580000 ---p 00016000 fc:01 7062643                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1\r\n7ff3b1580000-7ff3b1581000 r--p 00015000 fc:01 7062643                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1\r\n7ff3b1581000-7ff3b1582000 rw-p 00016000 fc:01 7062643                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libgcc_s.so.1\r\n7ff3b1582000-7ff3b1677000 r-xp 00000000 fc:01 7062654                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6.0.20\r\n7ff3b1677000-7ff3b1877000 ---p 000f5000 fc:01 7062654                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6.0.20\r\n7ff3b1877000-7ff3b187f000 r--p 000f5000 fc:01 7062654                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6.0.20\r\n7ff3b187f000-7ff3b1881000 rw-p 000fd000 fc:01 7062654                    /usr/lib64/gcc/x86_64-pc-linux-gnu/4.9.3/libstdc++.so.6.0.20\r\n7ff3b1881000-7ff3b1896000 rw-p 00000000 00:00 0 \r\n7ff3b1896000-7ff3b1ac7000 r-xp 00000000 fc:01 9953304                    /usr/lib64/libcrypto.so.1.0.0\r\n7ff3b1ac7000-7ff3b1cc6000 ---p 00231000 fc:01 9953304                    /usr/lib64/libcrypto.so.1.0.0\r\n7ff3b1cc6000-7ff3b1ce2000 r--p 00230000 fc:01 9953304                    /usr/lib64/libcrypto.so.1.0.0\r\n7ff3b1ce2000-7ff3b1cee000 rw-p 0024c000 fc:01 9953304                    /usr/lib64/libcrypto.so.1.0.0\r\n7ff3b1cee000-7ff3b1cf1000 rw-p 00000000 00:00 0 \r\n7ff3b1cf1000-7ff3b1d61000 r-xp 00000000 fc:01 9953307                    /usr/lib64/libssl.so.1.0.0\r\n7ff3b1d61000-7ff3b1f60000 ---p 00070000 fc:01 9953307                    /usr/lib64/libssl.so.1.0.0\r\n7ff3b1f60000-7ff3b1f65000 r--p 0006f000 fc:01 9953307                    /usr/lib64/libssl.so.1.0.0\r\n7ff3b1f65000-7ff3b1f6c000 rw-p 00074000 fc:01 9953307                    /usr/lib64/libssl.so.1.0.0\r\n7ff3b1f6c000-7ff3b2109000 r-xp 00000000 fc:01 9634725                    /usr/lib64/libicuuc.so.55.1\r\n7ff3b2109000-7ff3b2308000 ---p 0019d000 fc:01 9634725                    /usr/lib64/libicuuc.so.55.1\r\n7ff3b2308000-7ff3b2319000 r--p 0019c000 fc:01 9634725                    /usr/lib64/libicuuc.so.55.1\r\n7ff3b2319000-7ff3b231a000 rw-p 001ad000 fc:01 9634725                    /usr/lib64/libicuuc.so.55.1\r\n7ff3b231a000-7ff3b231f000 rw-p 00000000 00:00 0 \r\n7ff3b231f000-7ff3b258c000 r-xp 00000000 fc:01 9634778                    /usr/lib64/libicui18n.so.55.1\r\n7ff3b258c000-7ff3b278c000 ---p 0026d000 fc:01 9634778                    /usr/lib64/libicui18n.so.55.1\r\n7ff3b278c000-7ff3b279b000 r--p 0026d000 fc:01 9634778                    /usr/lib64/libicui18n.so.55.1\r\n7ff3b279b000-7ff3b279d000 rw-p 0027c000 fc:01 9634778                    /usr/lib64/libicui18n.so.55.1\r\n7ff3b279d000-7ff3b279e000 rw-p 00000000 00:00 0 \r\n7ff3b279e000-7ff3b2930000 r-xp 00000000 fc:01 10846379                   /lib64/libc-2.21.so\r\n7ff3b2930000-7ff3b2b30000 ---p 00192000 fc:01 10846379                   /lib64/libc-2.21.so\r\n7ff3b2b30000-7ff3b2b34000 r--p 00192000 fc:01 10846379                   /lib64/libc-2.21.so\r\n7ff3b2b34000-7ff3b2b36000 rw-p 00196000 fc:01 10846379                   /lib64/libc-2.21.so\r\n7ff3b2b36000-7ff3b2b3a000 rw-p 00000000 00:00 0 \r\n7ff3b2b3a000-7ff3b2b3c000 r-xp 00000000 fc:01 10849261                   /lib64/libdl-2.21.so\r\n7ff3b2b3c000-7ff3b2d3c000 ---p 00002000 fc:01 10849261                   /lib64/libdl-2.21.so\r\n7ff3b2d3c000-7ff3b2d3d000 r--p 00002000 fc:01 10849261                   /lib64/libdl-2.21.so\r\n7ff3b2d3d000-7ff3b2d3e000 rw-p 00003000 fc:01 10849261                   /lib64/libdl-2.21.so\r\n7ff3b2d3e000-7ff3b2e40000 r-xp 00000000 fc:01 10849256                   /lib64/libm-2.21.so\r\n7ff3b2e40000-7ff3b303f000 ---p 00102000 fc:01 10849256                   /lib64/libm-2.21.so\r\n7ff3b303f000-7ff3b3040000 r--p 00101000 fc:01 10849256                   /lib64/libm-2.21.so\r\n7ff3b3040000-7ff3b3041000 rw-p 00102000 fc:01 10849256                   /lib64/libm-2.21.so\r\n7ff3b3041000-7ff3b3074000 r-xp 00000000 fc:01 7416371                    /usr/lib64/libfuse.so.2.9.4\r\n7ff3b3074000-7ff3b3274000 ---p 00033000 fc:01 7416371                    /usr/lib64/libfuse.so.2.9.4\r\n7ff3b3274000-7ff3b3286000 r--p 00033000 fc:01 7416371                    /usr/lib64/libfuse.so.2.9.4\r\n7ff3b3286000-7ff3b3287000 rw-p 00045000 fc:01 7416371                    /usr/lib64/libfuse.so.2.9.4\r\n7ff3b3287000-7ff3b328d000 r-xp 00000000 fc:01 10849270                   /lib64/librt-2.21.so\r\n7ff3b328d000-7ff3b348d000 ---p 00006000 fc:01 10849270                   /lib64/librt-2.21.so\r\n7ff3b348d000-7ff3b348e000 r--p 00006000 fc:01 10849270                   /lib64/librt-2.21.so\r\n7ff3b348e000-7ff3b348f000 rw-p 00007000 fc:01 10849270                   /lib64/librt-2.21.so\r\n7ff3b348f000-7ff3b34fc000 r-xp 00000000 fc:01 7733437                    /usr/lib64/libcurl.so.4.3.0\r\n7ff3b34fc000-7ff3b36fc000 ---p 0006d000 fc:01 7733437                    /usr/lib64/libcurl.so.4.3.0\r\n7ff3b36fc000-7ff3b36fe000 r--p 0006d000 fc:01 7733437                    /usr/lib64/libcurl.so.4.3.0\r\n7ff3b36fe000-7ff3b36ff000 rw-p 0006f000 fc:01 7733437                    /usr/lib64/libcurl.so.4.3.0\r\n7ff3b36ff000-7ff3b3718000 r-xp 00000000 fc:01 7070671                    /lib64/libz.so.1.2.8\r\n7ff3b3718000-7ff3b3917000 ---p 00019000 fc:01 7070671                    /lib64/libz.so.1.2.8\r\n7ff3b3917000-7ff3b3918000 r--p 00018000 fc:01 7070671                    /lib64/libz.so.1.2.8\r\n7ff3b3918000-7ff3b3919000 rw-p 00019000 fc:01 7070671                    /lib64/libz.so.1.2.8\r\n7ff3b3919000-7ff3b3930000 r-xp 00000000 fc:01 10849273                   /lib64/libpthread-2.21.so\r\n7ff3b3930000-7ff3b3b2f000 ---p 00017000 fc:01 10849273                   /lib64/libpthread-2.21.so\r\n7ff3b3b2f000-7ff3b3b30000 r--p 00016000 fc:01 10849273                   /lib64/libpthread-2.21.so\r\n7ff3b3b30000-7ff3b3b31000 rw-p 00017000 fc:01 10849273                   /lib6libpthread-2.21.so\r\n7ff3b3b31000-7ff3b3b35000 rw-p 00000000 00:00 \r\n7ff3b3b35000-7ff3b3c3f000 r-xp 00000000 fc:0b64/libsqlite3.so.0.8.6\r\n7ff3b3c3f000-7ff3b3e3f000 ---p 0010a000 fc:0b64/libsqlite3.so.0.8.6\r\n7ff3b3e3f000-7ff3b3e41000 r--p 0010a000 fc:0b64/libsqlite3.so.0.8.6\r\n7ff3b3e41000-7ff3b3e44000 rw-p 0010c000 fc:0b64/libsqlite3.so.0.8.6\r\n7ff3b3e44000-7ff3b3e65000 r-xp 00000000 fc:0ld-2.21.so\r\n7ff3b3f64000-7ff3b4030000 rw-p 00000000 00:0\r\n7ff3b4051000-7ff3b4065000 rw-p 00000000 00:0\r\n7ff3b4065000-7ff3b4066000 r--p 00021000 fc:0ld-2.21.so\r\n7ff3b4066000-7ff3b4067000 rw-p 00022000 fc:0ld-2.21.so\r\n7ff3b4067000-7ff3b4068000 rw-p 00000000 00:0\r\n7fff293d0000-7fff293f2000 rw-p 00000000 00:0\r\n7fff293fd000-7fff293fe000 r-xp 00000000 00:0\r\n7fff293fe000-7fff29400000 r--p 00000000 00:0\r\nffffffffff600000-ffffffffff601000 r-xp 00000ll]\r\nAborted\r\n```\r\n\r\nTo get more debugging info I tried the following:\r\n```\r\n.opam/system/bin/google-drive-ocamlfuse -o allow_root -skiptrash -debug /mnt/googledrive/ -cc\r\nStarting application setup (label=default, base_dir=/home/raven/.gdfuse).\r\nOpening log file: /home/raven/.gdfuse/default/gdfuse.log\r\nClearing cache...done\r\nSegmentation fault\r\n```\r\n\r\n(segfault happens on very first access to /mnt/googledrive)\r\nwith the following ending up in .gdata/default/gdfuse.log:\r\n```\r\n[0.000246] TID=0: Setting up default filesystem...\r\n[0.000300] TID=0: Loading configuration from /home/raven/.gdfuse/default/config...done\r\nSaving configuration in /home/raven/.gdfuse/default/config...done\r\n[0.022403] TID=0: Loading application state from /home/raven/.gdfuse/default/state...done\r\nCurrent version: 0.5.18\r\nCleaning up cache...done\r\nSetting up cache db...done\r\nSetting up CURL...done\r\nRefresh token already present.\r\n[0.266650] TID=0: Starting filesystem /mnt/googledrive/\r\n[0.296761] TID=0: init_filesystem\r\n[27.324326] TID=0: getattr /container\r\nLoading metadata from db...not found\r\nRefreshing metadata...\r\n```\r\n\r\nThen the segfault happens. Whenever I specify \"-debug\" on the commandline, it segfaults right on very first access\r\nI tried to debug that:\r\n\r\n```\r\n(gdb) set args -o allow_root -skiptrash -debug /mnt/googledrive/ -cc\r\n(gdb) run\r\nStarting program: /home/raven/.opam/system/bin/google-drive-ocamlfuse -o allow_root -skiptrash -debug /mnt/googledrive/ -cc\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib64/libthread_db.so.1\".\r\nStarting application setup (label=default, base_dir=/home/raven/.gdfuse).\r\nOpening log file: /home/raven/.gdfuse/default/gdfuse.log\r\nClearing cache...done\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x0000000000692940 in caml_absf_mask ()\r\n(gdb) bt\r\n#0  0x0000000000692940 in caml_absf_mask ()\r\n#1  0x00007ffff36c5468 in ?? ()\r\n#2  0x00007ffff3641048 in ?? ()\r\n#3  0x000000000000000d in ?? ()\r\n#4  0x0000000000938780 in camlConfig__104 ()\r\n#5  0x00007ffff36c5488 in ?? ()\r\n#6  0x0000000000692516 in caml_start_program ()\r\n#7  0x0000000000aea260 in ?? ()\r\n#8  0x000000000000000d in ?? ()\r\n#9  0x00007ffff36c5488 in ?? ()\r\n#10 0x00007fffffffcea0 in ?? ()\r\n#11 0x0000000000000003 in ?? ()\r\n#12 0x0000000000000001 in ?? ()\r\n#13 0x00007fffffffc0b8 in ?? ()\r\n#14 0x00007fffffffc0c0 in ?? ()\r\n#15 0x00007fffffffc0c8 in ?? ()\r\n#16 0x0000000000000001 in ?? ()\r\n#17 0x00007fffffffc280 in ?? ()\r\n#18 0x0000000000c4f440 in ?? ()\r\n#19 0x0000000000b2eb10 in ?? ()\r\n#20 0x0000000000000000 in ?? ()\r\n```\r\n\r\nbut the backtrace is not very helpful. Unfortunately I don't really know how to debug ocaml programs, I'm used to C and C++\r\n\r\nMy system is gentoo linux (64 bit) kernel 3.16.5 , fuse version 2.9.4 google-drive-ocamlfuse installed via \"opam install google-drive-ocamlfuse\"\r\n```\r\n .opam/system/bin/google-drive-ocamlfuse -version\r\ngoogle-drive-ocamlfuse, version 0.5.18\r\nCopyright (C) 2012-2015 Alessandro Strada\r\nLicense MIT\r\n```\r\n\r\nis there any other info I can provide to debug this?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/comments/161955737","html_url":"https://github.com/astrada/google-drive-ocamlfuse/issues/148#issuecomment-161955737","issue_url":"https://api.github.com/repos/astrada/google-drive-ocamlfuse/issues/148","id":161955737,"user":{"login":"CorvusCorax","id":569222,"avatar_url":"https://avatars.githubusercontent.com/u/569222?v=3","gravatar_id":"","url":"https://api.github.com/users/CorvusCorax","html_url":"https://github.com/CorvusCorax","followers_url":"https://api.github.com/users/CorvusCorax/followers","following_url":"https://api.github.com/users/CorvusCorax/following{/other_user}","gists_url":"https://api.github.com/users/CorvusCorax/gists{/gist_id}","starred_url":"https://api.github.com/users/CorvusCorax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CorvusCorax/subscriptions","organizations_url":"https://api.github.com/users/CorvusCorax/orgs","repos_url":"https://api.github.com/users/CorvusCorax/repos","events_url":"https://api.github.com/users/CorvusCorax/events{/privacy}","received_events_url":"https://api.github.com/users/CorvusCorax/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T12:30:36Z","updated_at":"2015-12-04T12:30:36Z","body":"awesome, thanks, that sounds like it would be quite a useful improvement as far as performance is concerned"}}