File name max length exceeded on ecryptfs
pdavydov108 opened this issue · comments
Hello cquery developers! I've noticed a little nasty issue (that unfortunately causes big troubles for me) with cquery file names today. On my work machine (ubuntu 18.04) I have a hard drive that is encrypted with ecryptfs. Cquery compiles most parts of my project just fine, except that for some files, usually from boost (I use boost from conan packet manager), I see this errors (yes, in one line):
Fri 23 Nov 2018 12:07:49 PM MSK:["<---(stderr)",1,"cquery",["( 77.195s) [indexer12 ] utils.cc:366 | Cannot write to /home/pablo/.cquery/@@home@pablo@xxxxxxxxxxx/@home@pablo@.conan@data@boost@1.67.0@conan@stable@package@1124dca6ae937b7297b154408543b9bef46629d7@include@boost@range@detail@any_iterator.hpp.mpack","( 77.198s) [indexer12 ] utils.cc:366 | Cannot write to /home/pablo/.cquery/@@home@pablo@xxxxxxxxxxx/@home@pablo@.conan@data@boost@1.67.0@conan@stable@package@1124dca6ae937b7297b154408543b9bef46629d7@include@boost@range@detail@any_iterator_buffer.hpp","( 77.198s) [indexer12 ] ......
And, later, this:
Fri 23 Nov 2018 12:08:03 PM MSK:["<---(stderr)",1,"cquery",["( 88.423s) [indexer25 ]import_pipeline.cc:383 | Unable to load previous index for already imported index /home/pablo/.conan/data/boost/1.67.0/conan/stable/package/1124dca6ae937b7297b154408543b9bef46629d7/include/boost/intrusive/detail/algorithm.hpp","( 88.423s) [indexer25 ]import_pipeline.cc:383 | Unable to load previous index for already imported index /home/pablo/.conan/data/boost/1.67.0/conan/stable/package/1124dca6ae937b7297b154408543b9bef46629d7/include/boost/intrusive/pointer_rebind.hpp","( ......
Messages of the second kind are usually very long, and they don't even fit into a few monitors, so I think cquery indexer is really in trouble here. I think that the reason of this errors is discussed here. ecryptfs with encrypted file names have a file name length limit around 140 bytes. As you can see, boost files from conan have names longer then 150 bytes in index. So, when indexer attempts to open (or reopen) it, it gets an error from filesystem - file name too long.