parser

Написать ответ на текущее сообщение

 

 
   команды управления поиском

--enable-threaded-resolver

MoKo 22.07.2013 15:20

Пока удалось выяснить, что проблему вызывает опция сборки curl Threaded resolver:

Threaded resolver: Uses some variant of system's standard gethostbyname() or
getaddrinfo() function. Uses either pthreads or Windows threads (on Windows)
and creates one new thread per resolve. Non-blocking due to threads and has
no issues with timeouts. Threaded model means resource issues handling
hundreds or thousands of simultaneous connections (i.e. resolves).

Если эту опцию в меню при сборке выключить (MTHREADED_RESOLVER), то все работает.
Раньше (в 7.24) такой опции и не было, всегда было --disable-threaded-resolver.

Почему подвисает - особых идей нет, но больше похоже на проблему в curl, чем в парсере.

(gdb) info threads
* 1 Thread 801c14400 (LWP 101004/parser3) 0x0000000802a2287a in pthread_kill () from /lib/libthr.so.3
(gdb) bt
#0 0x0000000802a2287a in pthread_kill () from /lib/libthr.so.3
#1 0x0000000802a1ca6c in pthread_getschedparam () from /lib/libthr.so.3
#2 0x0000000802a20e6a in pthread_mutex_getprioceiling () from /lib/libthr.so.3
#3 0x0000000802a2152e in pthread_mutex_trylock () from /lib/libthr.so.3
#4 0x00000008013f5b58 in posix_memalign () from /lib/libc.so.7
#5 0x00000008013f508a in _malloc_prefork () from /lib/libc.so.7
#6 0x00000008013f6f32 in calloc () from /lib/libc.so.7
#7 0x0000000802a20c44 in pthread_mutexattr_init () from /lib/libthr.so.3
#8 0x0000000802a20f14 in pthread_mutex_getprioceiling () from /lib/libthr.so.3
#9 0x0000000802a2152e in pthread_mutex_trylock () from /lib/libthr.so.3
#10 0x00000008013f5b58 in posix_memalign () from /lib/libc.so.7
#11 0x00000008013f508a in _malloc_prefork () from /lib/libc.so.7
#12 0x00000008013f6f32 in calloc () from /lib/libc.so.7
#13 0x0000000802a234bd in pthread_kill () from /lib/libthr.so.3
#14 0x0000000802a1b12d in pthread_create () from /lib/libthr.so.3
#15 0x000000080192f3ae in Curl_thread_create () from /usr/local/lib/libcurl.so
#16 0x0000000801930986 in Curl_resolver_getaddrinfo () from /usr/local/lib/libcurl.so
#17 0x00000008018f5d93 in Curl_resolv () from /usr/local/lib/libcurl.so
#18 0x0000000801905258 in resolve_server () from /usr/local/lib/libcurl.so
#19 0x0000000801907261 in create_conn () from /usr/local/lib/libcurl.so
#20 0x0000000801907919 in Curl_connect () from /usr/local/lib/libcurl.so
#21 0x000000080191d544 in multi_runsingle () from /usr/local/lib/libcurl.so
#22 0x000000080191e60c in curl_multi_perform () from /usr/local/lib/libcurl.so
#23 0x0000000801916570 in curl_easy_perform () from /usr/local/lib/libcurl.so
#24 0x0000000000463fc1 in _curl_load_action (r=@0x7fffffffd7f0, params=Variable "params" is not available.) at curl.C:576

ktrace:
3971 parser3 RET clock_gettime 0
3971 parser3 CALL _umtx_op(0x7fffffffb208,0x3,0x1,0,0)
3971 parser3 RET _umtx_op 0
3971 parser3 CALL mprotect(0,0,0<PROT_NONE>)
3971 parser3 RET mprotect 0
3971 parser3 CALL sigprocmask(SIG_BLOCK,0x802a268f0,0x801c144e8)
3971 parser3 RET sigprocmask 0
3971 parser3 CALL sigprocmask(SIG_SETMASK,0x801c144e8,0)
3971 parser3 RET sigprocmask 0
3971 parser3 CALL _umtx_op(0x802c33e80,0x11,0,0,0)

(парсер и висит в состоянии umtxn)