[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Serf crashes on fork

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 19 Nov 2012 11:24:19 +0000

Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com> writes:

> As it turns out, your commit has only be the trigger but
> not the root cause.
> serf_trunk/allocator.c, serf_bucket_allocator_create(), line 147:
> /* ### this implies buckets cannot cross a fork/exec. desirable?
> *
> * ### hmm. it probably also means that buckets cannot be AROUND
> * ### during a fork/exec. the new process will try to clean them
> * ### up and figure out there are unfreed blocks...
> */
> apr_pool_cleanup_register(pool, allocator,
> allocator_cleanup, allocator_cleanup);
> Since we fork() for hooks, we can't use hooks in ra_local
> while there is an open serf connection. Otherwise, we get
> into trouble with pool cleanups:

Does it ever make sense for the child process to run that handler? Is
that to allow a parent process to allocate a serf connection and then
fork off a child process to use the connection?

Certified & Supported Apache Subversion Downloads:
Received on 2012-11-19 12:24:59 CET

This is an archived mail posted to the Subversion Dev mailing list.