Project

General

Profile

Bug #10526

wsdiff tries to spawn 4.8 threads

Added by Joshua Clulow 4 months ago. Updated 4 months 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:

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

History

#1

Updated by Andy Fiddaman 4 months ago

  • Status changed from New to In Progress
  • Assignee set to Andy Fiddaman
#2

Updated by Electric Monk 4 months 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>

Also available in: Atom PDF