AssertionError: daemonic processes are not allowed to have children

1,766 views
Skip to first unread message

Valery Khamenya

unread,
Jan 14, 2010, 8:20:52 AM1/14/10
to Unladen Swallow
Hi all, 

a hint is wanted.

I get an error 

Traceback (most recent call last):
 [...]
  File "/home/wrk/unladen-trunk/Lib/multiprocessing/pool.py", line 148, in map
    return self.map_async(func, iterable, chunksize).get()
  File "/home/wrk/unladen-trunk/Lib/multiprocessing/pool.py", line 422, in get raise self._value
  AssertionError: daemonic processes are not allowed to have children

However I fail to reproduce it within a simpler mockup-code like:

def f(x):
        return x+1

if __name__ == "__main__":
    from multiprocessing import Pool
    p = Pool(50)
    print sum(p.map(f, range(150)))

The former runs OK. 
Well, my function "f" is much more heavy and return more data, but there is neither any daemon processes nor recursion at all.

Any ideas?

P.S. I try u-s, because recently I start to get an error also with CPython. It is different though:

Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/process.py", line 232, in _bootstrap
    self.run()
  File "/usr/lib/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 71, in worker
    put((job, i, result))
  File "/usr/lib/python2.6/multiprocessing/queues.py", line 366, in put
    return send(obj)
RuntimeError: maximum recursion depth exceeded while calling a Python object


best regards
--
Valery A.Khamenya

Valery

unread,
Jan 14, 2010, 9:13:47 AM1/14/10
to Unladen Swallow
OK. guys, ignore it, please. Sorted out. Trying to follow the
restrictions of multiprocessing module I've got mess of Pools in my
app ;)

The life with pprocess has been much simplier than with this built-in
multiprocessing Pool.map

regards,
Valery

Jesse Noller

unread,
Jan 14, 2010, 10:44:32 AM1/14/10
to Valery, Unladen Swallow
On Thu, Jan 14, 2010 at 9:13 AM, Valery <kham...@gmail.com> wrote:
> OK. guys, ignore it, please. Sorted out. Trying to follow the
> restrictions of multiprocessing module I've got mess of Pools in my
> app ;)
>
> The life with pprocess has been much simplier than with this built-in
> multiprocessing Pool.map
>
> regards,
> Valery

If you have a bug for multiprocessing in regards to python-core (given
this is not an unladen-swallow issue), please file it on
bugs.python.org. If the documentation is unclear, file a bug on
bugs.python.org. If you have an enhancement request, please file it at
bugs.python.org.

jesse

Reply all
Reply to author
Forward
0 new messages