ford icon indicating copy to clipboard operation
ford copied to clipboard

ford.graphs.Prognode crash

Open gpeytavi opened this issue 7 years ago • 6 comments

Previously I had the pip installation in our server, but couldn't get LaTeX to work. I installed the current version on git, and I get such an error for each of the pool workers (here only the output for one worker).

Processing documentation comments...
Correlating information from different parts of your project...

Creating HTML documentation...
Generating graphs...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:10<00:00, 18.55/s]
Creating search index...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:07<00:00, 25.63/s]

Writing resulting documentation.
Process PoolWorker-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
    task = get()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 378, in get
    return recv()
  File "/usr/local/lib/python2.7/dist-packages/FORD-5.0.6-py2.7.egg/ford/graphs.py", line 198, in __hash__
    return hash(self.ident)
AttributeError: ("'ProgNode' object has no attribute 'ident'", <type 'set'>, ([<ford.graphs.ProgNode object at 0x7f26af976350>],))

Any idea what this could be?

gpeytavi avatar Jun 19 '18 11:06 gpeytavi

Hmm... Not sure off the top of my head. Does the error persist if you run in serial?

On 19/06/18 12:36, gpeytavi wrote:

Previously I had the pip installation in our server, but couldn't get LaTeX to work. I installed the current version on git, and I get such an error for each of the pool workers (here only the output for one worker).

Processing documentation comments... Correlating information from different parts of your project...

|Creating HTML documentation... Generating graphs... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:10<00:00, 18.55/s] Creating search index... 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 196/196 [00:07<00:00, 25.63/s] Writing resulting documentation. Process PoolWorker-1: Traceback (most recent call last): File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker task = get() File "/usr/lib/python2.7/multiprocessing/queues.py", line 378, in get return recv() File "/usr/local/lib/python2.7/dist-packages/FORD-5.0.6-py2.7.egg/ford/graphs.py", line 198, in hash return hash(self.ident) AttributeError: ("'ProgNode' object has no attribute 'ident'", <type 'set'>, ([<ford.graphs.ProgNode object at 0x7f26af976350>],)) |

Any idea what this could be?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cmacmackin/ford/issues/242, or mute the thread https://github.com/notifications/unsubscribe-auth/AHxJPdb-7acYgwX7Nbc12n2eQLMr-9Ndks5t-OI_gaJpZM4UtVnO.

-- Chris MacMackin cmacmackin.github.io https://cmacmackin.github.io

cmacmackin avatar Jun 19 '18 11:06 cmacmackin

How could I specify this in the call to ford?

gpeytavi avatar Jun 19 '18 11:06 gpeytavi

Add parallel: 0 to the project file metadata.

On 19/06/18 12:41, gpeytavi wrote:

How could I specify this in the call to ford?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cmacmackin/ford/issues/242#issuecomment-398369362, or mute the thread https://github.com/notifications/unsubscribe-auth/AHxJPSQ5GAcNkYu3StgXsYE5Sw3LcLafks5t-ONQgaJpZM4UtVnO.

-- Chris MacMackin cmacmackin.github.io https://cmacmackin.github.io

cmacmackin avatar Jun 19 '18 11:06 cmacmackin

Everything smooth in serial. Thanks for that hint and your quick response!

What's happening with the process pool remains a mystery...

gpeytavi avatar Jun 19 '18 11:06 gpeytavi

I'll do some digging. I wasn't the one to implement multithreading, so I don't know off the top of my head. I'm guessing there's something the threads need to communicate with each other at some point, but can't.

On 19/06/18 12:57, gpeytavi wrote:

Everything smooth in serial. Thanks for that hint and your quick response!

What's happening with the process pool remains a mystery...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cmacmackin/ford/issues/242#issuecomment-398373299, or mute the thread https://github.com/notifications/unsubscribe-auth/AHxJPY1IglMoOswaNBtvoX__MIJsnxMLks5t-OctgaJpZM4UtVnO.

-- Chris MacMackin cmacmackin.github.io https://cmacmackin.github.io

cmacmackin avatar Jun 19 '18 12:06 cmacmackin

I've just had a similar issue with v6.0.0 with the following output

Writing resulting documentation.
Traceback (most recent call last):
  File "~/.local/bin/ford", line 11, in <module>
    load_entry_point('FORD==6.0.0', 'console_scripts', 'ford')()
  File "~/.local/lib/python2.7/site-packages/ford/__init__.py", line 391, in run
    main(proj_data,proj_docs,md)
  File "~/.local/lib/python2.7/site-packages/ford/__init__.py", line 379, in main
    docs.writeout()
  File "~/.local/lib/python2.7/site-packages/ford/output.py", line 192, in writeout
    if self.data['graph'].lower() == 'true': self.graphs.output_graphs(self.njobs)
  File "~/.local/lib/python2.7/site-packages/ford/graphmanager.py", line 174, in output_graphs
Process PoolWorker-1:
    results = pool.map(outputFuncWrap,args,len(args)/np)
Traceback (most recent call last):
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 253, in map
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    return self.map_async(func, iterable, chunksize).get()
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 572, in get
    raise self._value
RuntimeError: maximum recursion depth exceeded while pickling an object
    self.run()
  File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python2.7/multiprocessing/pool.py", line 102, in worker
    task = get()
  File "/usr/lib64/python2.7/multiprocessing/queues.py", line 376, in get
    return recv()
  File "~/.local/lib/python2.7/site-packages/ford/graphs.py", line 198, in __hash__
    return hash(self.ident)
AttributeError: 'FileNode' object has no attribute 'ident'

which only occurs when graphs are enabled. This is for quite a large project so I've not determined if there's a particular code pattern that leads to this or if there's some other root cause. This issue doesn't arise when using parallel: 0.

d7919 avatar Oct 02 '18 20:10 d7919