increased stack size for queue threads
authorMichal Voců <michal@ruk.cuni.cz>
Fri, 3 Sep 2010 18:08:26 +0000 (18:08 +0000)
committerMichal Voců <michal@ruk.cuni.cz>
Fri, 3 Sep 2010 18:08:26 +0000 (18:08 +0000)
org.glite.lb.logger/Makefile
org.glite.lb.logger/interface/interlogd.h
org.glite.lb.logger/src/interlogd.c
org.glite.lb.logger/src/plugin_mgr.c
org.glite.lb.logger/src/queue_thread.c

index b6f57a9..5120efe 100644 (file)
@@ -135,7 +135,7 @@ glite-lb-interlogd: ${INTERLOG_OBJS}
        ${LINK} -o $@ ${INTERLOG_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
 
 glite-lb-notif-interlogd: ${INTERLOG_NOTIF_OBJS}
-       ${LINK} -export-dynamic -o $@ ${INTERLOG_NOTIF_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
+       ${LINK} -export-dynamic -o $@ ${INTERLOG_NOTIF_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB} 
 
 glite-lb-interlogd-perf: ${INTERLOG_PERF_OBJS}
        ${LINK} -o $@ ${INTERLOG_PERF_OBJS} ${COMMON_LIB}_${thrflavour} ${EXT_LIB}
index bdf0146..fc8d95f 100644 (file)
@@ -162,9 +162,7 @@ struct event_store {
        pthread_rwlock_t commit_lock;      /* lock to prevent simultaneous updates to last_committed_* */
        pthread_rwlock_t offset_lock;      /* lock to prevent simultaneous updates offset */
        pthread_rwlock_t use_lock;         /* lock to prevent struct deallocation */
-#if defined(IL_NOTIFICATIONS)
        char     *dest;                    /* host:port destination */
-#endif
 };
 
 
@@ -177,11 +175,9 @@ struct server_msg {
        struct event_store     *es;             /* cache for corresponding event store */
        int                     generation;     /* event store genereation */
        long                    receipt_to;     /* receiver (long local-logger id - LLLID) of delivery confirmation (for priority messages) */
-#if defined(IL_NOTIFICATIONS)
        char                   *dest_name;
        int                     dest_port;
        char                   *dest;
-#endif
        time_t                  expires;        /* time (in seconds from epoch) the message expires */
 };
 
@@ -194,20 +190,16 @@ struct event_queue {
        int                     timeout;        /* queue timeout */
        struct event_queue_msg *tail;           /* last message in the queue */
        struct event_queue_msg *head;           /* first message in the queue */
-#if defined(INTERLOGD_EMS)
        struct event_queue_msg *tail_ems;       /* last priority message in the queue (or NULL) */
        struct event_queue_msg *mark_this;      /* mark message for removal */
        struct event_queue_msg *mark_prev;      /* predecessor of the marked message */
-#endif
        pthread_t               thread_id;      /* id of associated thread */
        pthread_rwlock_t        update_lock;    /* mutex for queue updates */
        pthread_mutex_t         cond_lock;      /* mutex for condition variable */
        pthread_cond_t          ready_cond;     /* condition variable for message arrival */
-#if defined(INTERLOGD_HANDLE_CMD) && defined(INTERLOGD_FLUSH)
        int                     flushing;
        int                     flush_result;   /* result of flush operation */
        pthread_cond_t          flush_cond;     /* condition variable for flush operation */
-#endif
        /* statistics */
        int                     times_empty;    /* number of times the queue was emptied */
        int                     max_len;        /* max queue length */
index f8002ec..c6db23b 100644 (file)
@@ -413,7 +413,6 @@ void do_handle_signal() {
 }
 
 
-
 int
 main (int argc, char **argv)
 {
index 0611ba8..b1a7633 100644 (file)
@@ -63,6 +63,7 @@ int plugin_mgr_init(const char *plugin_name, char *cfg)
 
        plugin->next = plugins;
        plugins = plugin;
+
        DL_RESOLVESYM(plugin->plugin_def.plugin_init, dl_handle, "plugin_init", int(*)(char *));
        DL_RESOLVESYM(plugin->plugin_def.plugin_supports_scheme, dl_handle,  "plugin_supports_scheme", int(*)(const char *));
        DL_RESOLVESYM(plugin->plugin_def.event_queue_connect, dl_handle, "event_queue_connect", int (*)(struct event_queue*));
index 7817d75..8aae585 100644 (file)
@@ -265,7 +265,7 @@ event_queue_create_thread(struct event_queue *eq)
 
        /* create the thread itself */
        pthread_attr_init(&attr);
-       pthread_attr_setstacksize(&attr, 16384);
+       pthread_attr_setstacksize(&attr, 65536); 
        if(pthread_create(&eq->thread_id, &attr, queue_thread, eq) < 0) {
                eq->thread_id = 0;
                set_error(IL_SYS, errno, "event_queue_create_thread: error creating new thread");