Project

General

Profile

Actions

Bug #10526

closed

wsdiff tries to spawn 4.8 threads

Added by Joshua M. Clulow over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
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
Actions

Also available in: Atom PDF