Re: async requests blocking mainloop on networking issues
- From: Dan Winship <danw gnome org>
- To: "marcin saepia net" <marcin saepia net>, libsoup-list gnome org
- Subject: Re: async requests blocking mainloop on networking issues
- Date: Mon, 8 Aug 2016 10:41:01 -0400
Sorry, just noticed this message...
On 07/24/2016 07:41 AM, marcin saepia net wrote:
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:
That is the handshake thread, but that happens in a different thread
from the main loop, specifically so that it won't block anything.
soup_session_queue_message() should not ever block. I'd need to see the
stack trace from all threads in your app to be able to say what was
going on there.
-- Dan
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
_______________________________________________
libsoup-list mailing list
libsoup-list gnome org
https://mail.gnome.org/mailman/listinfo/libsoup-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]