Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: sometimes hangs in CurlAgent::ExecCurl #306

Closed
Tatsh opened this issue Feb 16, 2020 · 0 comments · May be fixed by #308
Closed

macOS: sometimes hangs in CurlAgent::ExecCurl #306

Tatsh opened this issue Feb 16, 2020 · 0 comments · May be fixed by #308

Comments

@Tatsh
Copy link

Tatsh commented Feb 16, 2020

I have Grive as a scheduled task via launchctl and sometimes it freezes, forever. Here is a traceback from LLDB:

* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff6dcb15be libsystem_kernel.dylib`__select + 10
    frame #1: 0x00000001094c8a42 libcurl.4.dylib`Curl_poll + 553
    frame #2: 0x00000001094c3ff2 libcurl.4.dylib`Curl_multi_wait + 705
    frame #3: 0x00000001094c4168 libcurl.4.dylib`curl_multi_poll + 26
    frame #4: 0x00000001094bea0f libcurl.4.dylib`curl_easy_perform + 284
    frame #5: 0x00000001093d95a2 grive`gr::http::CurlAgent::ExecCurl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gr::DataStream*, gr::http::Header const&) + 452
    frame #6: 0x00000001093d9cb4 grive`gr::http::CurlAgent::Request(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gr::SeekStream*, gr::DataStream*, gr::http::Header const&, unsigned long long) + 266
    frame #7: 0x00000001093e6f0a grive`gr::AuthAgent::Request(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gr::SeekStream*, gr::DataStream*, gr::http::Header const&, unsigned long long) + 180
    frame #8: 0x00000001093d89ed grive`gr::http::Agent::Get(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, gr::DataStream*, gr::http::Header const&, unsigned long long) + 79
    frame #9: 0x00000001093d42fa grive`gr::v2::Feed2::GetNext(gr::http::Agent*) + 110
    frame #10: 0x00000001093a9f23 grive`gr::Drive::DetectChanges() + 241
    frame #11: 0x00000001093a0235 grive`Main(int, char**) + 5016
    frame #12: 0x00000001093a0f39 grive`main + 16
    frame #13: 0x00007fff6db687fd libdyld.dylib`start + 1

I think it's this line: https://github.com/vitalif/grive2/blob/master/libgrive/src/http/CurlAgent.cc#L198

I definitely don't get this on my Linux machine, but maybe it would be good to add a CURLOPT_TIMEOUT option (and perhaps expose this in the CLI options too)? I don't know yet if that will solve this issue, but also in this area, if the request fails due to timeout, I think it should retry a few times in a loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant