Multiprocess issue on Windows 7

42 views
Skip to first unread message

charle...@gmail.com

unread,
Jan 22, 2013, 5:35:49 PM1/22/13
to closure-lin...@googlegroups.com
I have the current version of closure-linter downloaded and installed against Python 2.7.3 on Windows 7 64-bit.

I am seeing an issue when attempting to enable the --multiprocess flag when running gsjlint.  When I execute gjslint with the multiprocess flag enable, my CPU usage is pegged at 100%, my memory maxes out, and I see constantly spawning python processes.  Eventually, my machine locks up completely.

I have done some searching on this issue, and every post and article I find points back to adding if __name__ == '__main__': to the code surrounding the main method.  I've looked at the source for gjslint and I see that this code is already there.  So I am baffled as to what is going on here.

If I disable multiprocess execution, the tools complete successfully.  I have also attempted using this tool on several different machines, all Windows 7 64-bit.  I have had a colleague use the tool on his OSX machine, and multiprocess works just fine.

Is anyone else seeing this issue on Windows?  Does anyone have any additional thoughts, other than the mainstream __name__ == __main__ idea?

Thanks!

Charlie

Nathan Naze

unread,
Jan 22, 2013, 5:56:29 PM1/22/13
to closure-lin...@googlegroups.com
We disabled multiprocessing on non-Unix systems because of the issues it was causing.  I don't have a Windows machine to debug.  The result of running with or without multiprocessing is the same -- the only difference is that the latter will attempt to parallelize across cores.

Nathan

charle...@gmail.com

unread,
Jan 23, 2013, 10:00:20 AM1/23/13
to closure-lin...@googlegroups.com
Thanks for the quick response!

Is this something that will be looked at in potentially future versions?

In terms of parallelizing across cores, this feature is extremely attractive due to the size of products we are developing.

Charlie

Nathan Naze

unread,
Jan 23, 2013, 12:26:29 PM1/23/13
to closure-lin...@googlegroups.com
> Is this something that will be looked at in potentially future versions?

Probably not, as we develop only for use on Linux workstations.  We'd heard problems in the past with Windows/multiprocessing, and since we didn't have the time/machines to investigate, we just defaulted to false for Windows. Anyone could debug and send a patch to fix.

However, there's no reason you couldn't parallelize the gjslint calls themselves.  xargs on UNIX can do this with xargs


To lint all .js files, one could do, in UNIX:

find . | grep \.js$ | xargs -P 0 path/to/gjslint.py 

There is likely an equivalent in Windows, or one could be scripted.

Nathan

Charles Lukas

unread,
Jan 23, 2013, 12:36:49 PM1/23/13
to closure-lin...@googlegroups.com
Probably not, as we develop only for use on Linux workstations.  We'd heard problems in the past with Windows/multiprocessing, and since we didn't have the time/machines to investigate, we just defaulted to false for Windows.

Fair enough.

Thanks for the help!

Charlie
 
Reply all
Reply to author
Forward
0 new messages