Actions
Bug #10526
closedwsdiff tries to spawn 4.8 threads
Start date:
2019-03-10
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
On a system with 4 cores (as visible in psrinfo(1M)
), running wsdiff
outside of nightly
and bldenv
(so DMAKE_MAX_JOBS
is not set), and using python3.5
:
$ /opt/onbld/bin/wsdiff-master-py3 SAMPLE/{a,b} Traceback (most recent call last): File "/opt/onbld/bin/wsdiff-master-py3", line 1530, in <module> main() File "/opt/onbld/bin/wsdiff-master-py3", line 1501, in main for i in range(max_threads) : TypeError: 'float' object cannot be interpreted as an integer
Using the same script but with python2.7
instead:
$ /opt/onbld/bin/wsdiff-master-py2 SAMPLE/{a,b} SAMPLE/a/hlistb
Using the debug output of wsdiff
(i.e., the -d
flag), it seems the difference is that in Python 3.5 the number of threads is not integral!
$ /opt/onbld/bin/wsdiff-master-py2 -d SAMPLE/{a,b} >py2.txt 2>&1 $ /opt/onbld/bin/wsdiff-master-py3 -d SAMPLE/{a,b} >py3.txt 2>&1 $ diff py2.txt py3.txt 16,19c16,22 < ## Spawning 4 threads < ## Waiting for the threads to finish < SAMPLE/a/hlistb < ## Performing cleanup (0) --- > ## Spawning 4.8 threads > Traceback (most recent call last): > File "/opt/onbld/bin/wsdiff-master-py3", line 1530, in <module> > main() > File "/opt/onbld/bin/wsdiff-master-py3", line 1501, in main > for i in range(max_threads) : > TypeError: 'float' object cannot be interpreted as an integer
Updated by Andy Fiddaman about 3 years ago
- Status changed from New to In Progress
- Assignee set to Andy Fiddaman
Updated by Electric Monk about 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 2f7dba3e6747cbaaf1deb86e6ca1e2a5c96332ac
commit 2f7dba3e6747cbaaf1deb86e6ca1e2a5c96332ac Author: Andy Fiddaman <omnios@citrus-it.co.uk> Date: 2019-03-14T20:01:47.000Z 10524 wsdiff much slower after move from deprecated commands module 10448 wsdiff explodes on encoding error 10525 wsdiff output is not correct for a binary file 10526 wsdiff tries to spawn 4.8 threads Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net> Approved by: Rich Lowe <richlowe@richlowe.net>
Actions