divinity76 / cacdrive

harddrive emulator using cloudatcost's "cloud storage" as a storage backend.
The Unlicense
9 stars 4 forks source link

Sector File Index Bug #6

Open Ammar7347 opened 5 years ago

Ammar7347 commented 5 years ago

Hi,

I'm getting the following errors. You can find the logs below:

root@debian9pt:~/cacdrive# sudo ./a.out config.conf api-tests downloadcacapi tests.. logging in: terminate called after throwing an instance of 'std::runtime_error' what(): curl_easy_perform() error 1: Unsupported protocol ./a.out(+0x544f)[0x55d41efc044f] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f8b2d90f0c0] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f8b2ccf4fff] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f8b2ccf642a] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27verbose_terminate_handlerEv+0x15d)[0x7f8b2d60d0ad] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f066)[0x7f8b2d60b066] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0b1)[0x7f8b2d60b0b1] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f2c9)[0x7f8b2d60b2c9] ./a.out(+0x8219)[0x55d41efc3219] ./a.out(+0x8c9b)[0x55d41efc3c9b] ./a.out(+0x9a26)[0x55d41efc4a26] ./a.out(+0xa514)[0x55d41efc5514] ./a.out(+0xf425)[0x55d41efca425] ./a.out(+0x4be2)[0x55d41efbfbe2] /lib/x86_64-linux-gnu/libc.so.6(libc_start_main+0xf1)[0x7f8b2cce22e1] ./a.out(+0x4d8a)[0x55d41efbfd8a] ./a.out:src/main.cpp:1891: received shutdown signal 6 (Aborted) from PID 9993 / UID 0. shutting down..

shutting down, cleaning up.. thread doing the cleanup: 140235748472640 root@debian9pt:~/cacdrive# sudo ./a.out config.conf starting 3 worker thread(s)... done. pausing mainthread.. terminate called after throwing an instance of 'std::runtime_error' what(): curl_easy_perform() error 1: Unsupported protocol ./a.out(+0x544f)[0x563b108aa44fterminate called recursively ./a.out(+0x544f)[0x563b108aa44f] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)terminate called recursively ./a.out(+0x544f)[0x563b108aa44f] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7fe65101c0c0] [0x/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7fe650401fff] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fe65040342a] 7fe65101c0c0/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9gnu_cxx27verbose_terminate_handlerEv+0xed)[0x7fe650d1a03d] ] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7fe65101c0c0] 8f066)[0x7fe650d18066] /lib/x86_64-linux-gnu/libc.so.6/lib/x86_64-linux-gnu/libc.so.6(/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0b1)[0x7fe650d180b1] gsignal+0x/usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb9e9e)[0x7fe650d42e9e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7fe651012494] (gsignal+0xcf)[0x7fe650401fff] cf)[0x7fe650401fff] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fe65040342a] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9gnu_cxx27verbose_terminate_handlerEv+0x15d)[0x7fe650d1a0ad] /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fe65040342a] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f066)[0x7fe650d18066] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0b1)[0x7fe650d180b1] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0xb9e9e)[0x7fe650d42e9e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x7494)[0x7fe651012494] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fe6504b7acf] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZN9__gnu_cxx27__verbose_terminate_handlerEv+0xed)[0x7fe650d1a03d] ./a.out:src/main.cpp:1891: received shutdown signal 6 (Aborted) from PID 9995 / UID 0. shutting down..

shutting down, cleaning up.. thread doing the cleanup: 140627165374208 /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f066)[0x7fe650d18066] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f0b1)[0x7fe650d180b1] /usr/lib/x86_64-linux-gnu/libstdc++.so.6(+0x8f2c9)[0x7fe650d182c9] ./a.out(+0x/lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7fe6504b7acf] ./a.out:src/main.cpp:1891: received shutdown signal 6 (Aborted) from PID 9995 / UID 0. shutting down..

root@debian9pt:~/cacdrive#

P.S. I think it only happens when I try to make a sector file with a huge size (like 987 GB) but I'm not sure though.

divinity76 commented 5 years ago

P.S. I think it only happens when I try to make a sector file with a huge size (like 987 GB) but I'm not sure though.

no i don't think so, this has to do with how libcurl was compiled.

i made some changes to better detect this issue, can you run git pull, then re-compile, and try again?

Ammar7347 commented 5 years ago

Okay here's what I get now :

root@debian9pt:~/cacdrive# sudo ./a.out config.conf api-tests
error: libcurl was not compiled with SSL/TLS support, which cacdrive requires (TLS is required to login @cac cloud storage system)
root@debian9pt:~/cacdrive# sudo ./a.out config.conf
error: libcurl was not compiled with SSL/TLS support, which cacdrive requires (TLS is required to login @cac cloud storage system)
root@debian9pt:~/cacdrive#
divinity76 commented 5 years ago

thought so, you have a custom compiled libcurl, and the person compiling it did not run ./configure --with-ssl when compiling your libcurl. cacdrive requires a libcurl compiled with --with-ssl (or 1 of the ssl alternatives, --with-ssl if you have OpenSSL, --with-gnutls if you have GnuTLS, --with-nss if you have NSS, --with-polarssl if you have PolarSSL, --with-mbedtls if you have mbedTLS) given to ./configure during libcurl compilation. did you compile libcurl yourself?

Ammar7347 commented 5 years ago

Yes, I compiled libcurl myself but I compiled with the SSL option. For the troubleshooting purpose, I deleted the libcurl completely and compiled the libcurl again using ./configure --with-ssl but I get the same error. Maybe it has to do with the path of my libcurl?

divinity76 commented 5 years ago

what do you get from find / -iname "*curl*.so" 2>/dev/null ? and what do you get from sudo ldd ./a.out config.conf api-tests ?

Ammar7347 commented 5 years ago

image

divinity76 commented 5 years ago

ok, best guess: you have multiple versions of libcurl installed, the version that get loaded automatically upon execution is /usr/local/lib/libcurl.so.4, which was not compiled with ssl/tls support. your custom compiled libcurl is in /root/curl/curl-7.63.0/lib/.libs/libcurl.so, which is compiled with ssl/tls support.

if the 2 versions are otherwise incompatible, the following commands could theoretically break some other programs, but check if this helps:

mv '/usr/local/lib/libcurl.so.4' '/usr/local/lib/libcurl.so.4.backup' ;
cp '/root/curl/curl-7.63.0/lib/.libs/libcurl.so' '/usr/local/lib/libcurl.so.4' ;
chown --reference='/usr/local/lib/libcurl.so.4.backup' '/usr/local/lib/libcurl.so.4' ;
chmod --reference='/usr/local/lib/libcurl.so.4.backup' '/usr/local/lib/libcurl.so.4' ;

then run ./a.out api-tests again

Ammar7347 commented 5 years ago

image I had to manually install the libcurl because the latest version of libcurl which is required for this cacdrive isn't available in Deb 9 repos.

divinity76 commented 5 years ago

... can you try to contact me on facebook or discord? i want to check this personally, contact info at https://stackoverflow.com/users/1067003/hanshenrik?tab=profile

Ammar7347 commented 5 years ago

I've sent you a friend request on Discord. Thanks for helping me out. I really appreciate it :)