From 2ac553361a868ee1d727e45c574934668da542e0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sun, 10 Jan 2010 19:52:01 +0000 Subject: [PATCH] (trunk libT) #2416 "crash in event_queue_insert" -- I think this is happening if we queue up two changes, one to listen for read/write, and then a second one to delete the polling, in kqueue's event mechanism, at libcurl's request. Let's try disabling kqueue in libevent and use poll/select instead. --- libtransmission/web.c | 3 --- third-party/macosx-libevent-config.h | 4 ++-- third-party/macosx-libevent-event-config.h | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libtransmission/web.c b/libtransmission/web.c index 39e0e4847..b7a4e3d5c 100644 --- a/libtransmission/web.c +++ b/libtransmission/web.c @@ -345,11 +345,8 @@ sock_cb( CURL * e UNUSED, curl_socket_t fd, int curl_what, if( ( io_event != NULL ) && ( curl_what & CURL_POLL_REMOVE ) ) { - CURLMcode m; memset( io_event, TR_MEMORY_TRASH, sizeof( struct event ) ); tr_free( io_event ); - m = curl_multi_assign( web->multi, fd, NULL ); - assert( m == CURLM_OK ); /*fprintf( stderr, "-1 io_events to %d\n", --num_events );*/ } diff --git a/third-party/macosx-libevent-config.h b/third-party/macosx-libevent-config.h index e34ec1d1d..3bbd560d7 100644 --- a/third-party/macosx-libevent-config.h +++ b/third-party/macosx-libevent-config.h @@ -50,7 +50,7 @@ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `kqueue' function. */ -#define HAVE_KQUEUE 1 +/* #define HAVE_KQUEUE 1 */ /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #undef HAVE_LIBNSL */ @@ -194,7 +194,7 @@ #define HAVE_VASPRINTF 1 /* Define if kqueue works correctly with pipes */ -#define HAVE_WORKING_KQUEUE 1 +/* #define HAVE_WORKING_KQUEUE 1 */ /* Define to the sub-directory in which libtool stores uninstalled libraries. */ diff --git a/third-party/macosx-libevent-event-config.h b/third-party/macosx-libevent-event-config.h index 5d2199b69..d30a34af9 100644 --- a/third-party/macosx-libevent-event-config.h +++ b/third-party/macosx-libevent-event-config.h @@ -57,7 +57,7 @@ #define _EVENT_HAVE_INTTYPES_H 1 /* Define to 1 if you have the `kqueue' function. */ -#define _EVENT_HAVE_KQUEUE 1 +/* #define _EVENT_HAVE_KQUEUE 1 */ /* Define to 1 if you have the `nsl' library (-lnsl). */ /* #undef _EVENT_HAVE_LIBNSL */ @@ -201,7 +201,7 @@ #define _EVENT_HAVE_VASPRINTF 1 /* Define if kqueue works correctly with pipes */ -#define _EVENT_HAVE_WORKING_KQUEUE 1 +/* #define _EVENT_HAVE_WORKING_KQUEUE 1 */ /* Define to the sub-directory in which libtool stores uninstalled libraries. */ -- 2.40.0