async requests blocking mainloop on networking issues



Hello,

I have found out that in some cases asynchronous request (sent via soup_session_queue_message) may block the whole MainLoop causing application to be unusable to the user.

It seems that if there are connectivity issues, it seems it may block on TLS negotiation.

I have caught the stack trace of such stuck process and there's such thread:

  thread #7: tid = 0xc7588, 0x00007fff8eb9f07a libsystem_kernel.dylib`__select + 10, name = 'pool'
    frame #0: 0x00007fff8eb9f07a libsystem_kernel.dylib`__select + 10
    frame #1: 0x0000000110a580fa libglib-2.0.0.dylib`g_poll + 410
    frame #2: 0x00000001107955ea libgio-2.0.0.dylib`g_socket_condition_timed_wait + 362
    frame #3: 0x00000001107940a7 libgio-2.0.0.dylib`g_socket_receive_with_blocking + 359
    frame #4: 0x0000000110778fef libgio-2.0.0.dylib`g_input_stream_read + 207
    frame #5: 0x000000011119a053 libgiognutls.so`g_tls_connection_gnutls_pull_func + 99
    frame #6: 0x0000000114f62ad1 libgnutls.30.dylib`_gnutls_io_read_buffered + 1393
    frame #7: 0x0000000114f5db3c libgnutls.30.dylib`_gnutls_recv_in_buffers + 268
    frame #8: 0x0000000114f64823 libgnutls.30.dylib`_gnutls_handshake_io_recv_int + 291
    frame #9: 0x0000000114f65d39 libgnutls.30.dylib`_gnutls_recv_handshake + 57
    frame #10: 0x0000000114f67f11 libgnutls.30.dylib`gnutls_handshake + 417
    frame #11: 0x000000011119a6dd libgiognutls.so`handshake_thread + 701
    frame #12: 0x000000011119aa5e libgiognutls.so`async_handshake_thread + 14
    frame #13: 0x00000001107a2037 libgio-2.0.0.dylib`g_task_thread_pool_thread + 247
    frame #14: 0x0000000110a723c2 libglib-2.0.0.dylib`g_thread_pool_thread_proxy + 50
    frame #15: 0x0000000110a7144a libglib-2.0.0.dylib`g_thread_proxy + 90
    frame #16: 0x00007fff8870799d libsystem_pthread.dylib`_pthread_body + 131
    frame #17: 0x00007fff8870791a libsystem_pthread.dylib`_pthread_start + 168
    frame #18: 0x00007fff88705351 libsystem_pthread.dylib`thread_start + 13

Can you give me any guidance, is it rather something invalid within libsoup or rather gio/glib itself?

I am using libsoup 2.52.2, glib 2.46.2 on mac os x.

Marcin


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]