This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project iwhd.git.
The branch, dyn-providers-gc has been updated
discards 7074a530e1d93d3a071684ac1d8fc55347a1f74d (commit)
via 5bd9b0f67ffbd4af4ef7681db8948de7c1ae97c5 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (7074a530e1d93d3a071684ac1d8fc55347a1f74d)
N -- N -- N (5bd9b0f67ffbd4af4ef7681db8948de7c1ae97c5)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/iwhd.git/commit/5bd9b0f67ffbd4af4ef7681db8948de7c1ae97c5
commit 5bd9b0f67ffbd4af4ef7681db8948de7c1ae97c5
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Jan 18 08:51:59 2011 +0100
microhttpd may also spawn threads to call prov_list_generator; tell GC
Just as done for access_handler (registered via MHD_start_daemon),
we have to tell the garbage collector about the thread that runs
MHD_connection_handle_idle and calls prov_list_generator.
The symptom is an abort when the MHD_connection_handle_idle runs.
To diagnose, invoke gdb on the resulting core file, then type
"thread apply all bt" and note the functions at the base of the
stack on the losing thread. That's the one that hasn't yet been
registered for GC.
* rest.c (gc_register_thread): New macro, factored out of...
(access_handler): ...here.
(prov_list_generator): Use it here, too.
diff --git a/rest.c b/rest.c
index ff87c65..290dfd1 100644
--- a/rest.c
+++ b/rest.c
@@ -58,6 +58,14 @@
#define MY_MHD_FLAGS MHD_USE_THREAD_PER_CONNECTION
#endif
+#define gc_register_thread() + { + struct GC_stack_base
gc_stack_base; + int st = GC_get_stack_base (&gc_stack_base); + assert (st
== GC_SUCCESS); + GC_register_my_thread (&gc_stack_base); + }
+
typedef enum {
URL_ROOT=0, URL_BUCKET, URL_OBJECT, URL_ATTR, URL_INVAL,
URL_QUERY, URL_PROVLIST, URL_PROVIDER, URL_PROVIDER_SET_PRIMARY
@@ -1548,6 +1556,7 @@ prov_fmt (provider_t *prov, void *ms_v)
static ssize_t
prov_list_generator (void *ctx, uint64_t pos, char *buf, size_t max)
{
+ gc_register_thread();
my_state *ms = ctx;
(void)pos;
@@ -2011,10 +2020,7 @@ access_handler (void *cctx, struct MHD_Connection *conn, const char
*url,
struct MHD_Response *resp;
my_state *ms = *rctx;
- struct GC_stack_base gc_stack_base;
- int st = GC_get_stack_base (&gc_stack_base);
- assert (st == GC_SUCCESS);
- GC_register_my_thread (&gc_stack_base);
+ gc_register_thread();
if (ms) {
return ms->handler(cctx,conn,url,method,version,
-----------------------------------------------------------------------
Summary of changes:
repo.or.cz automatic notification. Contact project admin jim(a)meyering.net
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
iwhd.git ("image warehouse daemon")