celery / billiard

Multiprocessing Pool Extensions
Other
417 stars 252 forks source link

_subprocess error on windows with python 2.7 #198

Open achNJ opened 7 years ago

achNJ commented 7 years ago

Hi !

I'm having an issue when with billard when called for a celery task and can't figure out why ... i suspect it to be related with the way the process are created on one side and opened on the other side .

here is the traceback:

Traceback (most recent call last):
File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\worker\worker.py", line 203, in start
    self.blueprint.start(self)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\bootsteps.py", line 119, in start
    step.start(parent)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\bootsteps.py", line 370, in start
    return self.obj.start()
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\concurrency\base.py", line 131, in start
    self.on_start()
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\celery\concurrency\prefork.py", line 112, in on_start
    **self.options)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\pool.py", line 1008, in __init__
    self._create_worker_process(i)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\pool.py", line 1117, in _create_worker_process
    w.start()
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\process.py", line 122, in start
    self._popen = self._Popen(self)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\context.py", line 383, in _Popen
    return Popen(process_obj)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\popen_spawn_win32.py", line 64, in __init__
    _winapi.CloseHandle(ht)
TypeError: argument 1 must be an integer, not _subprocess_handle

> Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\spawn.py", line 159, in spawn_main
    new_handle = steal_handle(parent_pid, pipe_handle)
  File "c:\users\ign572\appdata\local\continuum\anaconda\envs\nemo-optim\lib\site-packages\billiard\reduction.py", line 121, in steal_handle
    _winapi.PROCESS_DUP_HANDLE, False, source_pid)
WindowsError: [Error 87]
ghostviper commented 7 years ago

I've had the same problem..。

RamolaWeb commented 7 years ago

@ask what should we do??

heloyue commented 7 years ago

i met same problem

kaijianwang commented 7 years ago

I met the same problem on celery v4.0.2 in py 2.7.11

kaijianwang commented 7 years ago

It seems it's an official action that Windows is no longer supported since 4.x

ghostviper commented 7 years ago

I think the reason is celery 4+ didn't work in windows, so i change the env

linar-jether commented 6 years ago

Trying to use billiard (upgraded from 3.3.0.23 to 3.5.0.3) on windows, and can't get it to work, anyone has any input on this issue? i'm still seeing recent pull requests regarding windows support so i'm assuming windows is supposed to work?