[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Doesn't the pdb prompt use the builtin input()?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor

STINNER Victor  added the comment:

Oh. I also got this surprising (Pdb) prompt when running "python -m test" on 
Windows.

The prompt doesn't display any output, I only get the prompt display 

(...)
0:34:05 load avg: 1.06 [300/426/2] test_select
0:34:08 load avg: 1.03 [301/426/2] test_selectors
0:34:13 load avg: 0.94 [302/426/2] test_set
0:34:24 load avg: 0.80 [303/426/2] test_setcomps
0:34:26 load avg: 0.78 [304/426/2] test_shelve
0:34:30 load avg: 0.74 [305/426/2] test_shlex
0:34:32 load avg: 0.70 [306/426/2] test_shutil
0:34:36 load avg: 0.66 [307/426/2] test_signal
(Pdb) help
(Pdb) l
(Pdb) ?
(Pdb) help
(Pdb) where
(Pdb) down
(Pdb) p 1
(Pdb) p 2
(Pdb)  


*But* I managed to get more info about that issue:

(Pdb) f=open("debug.txt", "w")
(Pdb) import traceback
(Pdb) traceback.print_stack(file=f)
(Pdb) f.flush()

C:\vstinner\python\master\build\test_python_6260æ\debug.txt content:

(...)
  File "C:\vstinner\python\master\lib\test\libregrtest\runtest.py", line 154, 
in _runtest
result = _runtest_inner(ns, test_name,
(...)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 549, in 
_callTestMethod
method()
  File "C:\vstinner\python\master\lib\test\test_signal.py", line 1345, in 
test_sigint
signal.raise_signal(signal.SIGINT)
  File "C:\vstinner\python\master\lib\unittest\case.py", line 216, in __exit__
def __exit__(self, exc_type, exc_value, tb):
  File "C:\vstinner\python\master\lib\bdb.py", line 92, in trace_dispatch
return self.dispatch_call(frame, arg)
  File "C:\vstinner\python\master\lib\bdb.py", line 136, in dispatch_call
self.user_call(frame, arg)
  File "C:\vstinner\python\master\lib\pdb.py", line 252, in user_call
self.interaction(frame, None)
  File "C:\vstinner\python\master\lib\pdb.py", line 357, in interaction
self._cmdloop()
  File "C:\vstinner\python\master\lib\pdb.py", line 322, in _cmdloop
self.cmdloop()
  File "C:\vstinner\python\master\lib\cmd.py", line 138, in cmdloop
stop = self.onecmd(line)
  File "C:\vstinner\python\master\lib\pdb.py", line 423, in onecmd
return cmd.Cmd.onecmd(self, line)
  File "C:\vstinner\python\master\lib\cmd.py", line 216, in onecmd
return self.default(line)
  File "C:\vstinner\python\master\lib\pdb.py", line 381, in default
exec(code, globals, locals)
  File "", line 1, in 


Using debug.txt, I also see that in test_signal, sys.gettrace() = >.

Lib/test/libregrtest/save_env.py is supposed to mark a test as "env changed" 
(ENV_CHANGED) if sys.gettrace() is changed between two tests.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

For test_logging test_namer_rotator_inheritance() error: I created bpo-43961 
"[Windows] test_logging.test_namer_rotator_inheritance() logs a logging error". 
It doesn't like like an error and it only happens on Windows.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

> To make it more confusing, all 4 tests passed when I ran with `-j` (to force 
> parallel test execution) - but then test_compileall failed instead :-)

bpo-37387 "test_compileall fails randomly on Windows when tests are run in 
parallel" about random PermissionError.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Tim Peters


Tim Peters  added the comment:

Shreyan Avigyan:
> And the "(Pdb) continue (...) actually is manually entered by me.

Victor Stinner:
Do you mean that you modified the Python source code?

Me:
Doubt it. For me, with more words: the "(Pdb) " prompt appears all by itself, 
by magic, and the test run is stuck then. I bet Shreyan meant to say "so I 
manually entered 'continue [RETURN]' at the pdb prompt to get it unstuck again".

> Does the issue go away if you revert your change or
> if you test a newly installed Python?

For me, I was using Win10 x64 CPython built from yesterday's github master/main.

And thanks for the distutils clue! I bet that one is a distinct issue.

To make it more confusing, all 4 tests passed when I ran with `-j` (to force 
parallel test execution) - but then test_compileall failed instead :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Steve Dower


Steve Dower  added the comment:

I think the test failures cascade, and some state is not being cleaned up. I'm 
trying to work through them now, but if someone else is as well, do say so and 
I'll find something else to do.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

Shreyan Avigyan:
> And the "(Pdb) continue (...) actually is manually entered by me.

Do you mean that you modified the Python source code? Does the issue go away if 
you revert your change or if you test a newly installed Python?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread STINNER Victor


STINNER Victor  added the comment:

File "C:\github\cpython\lib\test\test_distutils.py", line 15, in 
import distutils.tests
  File "C:\github\cpython\lib\contextlib.py", line 140, in __exit__
next(self.gen)
  File "C:\github\cpython\lib\test\support\warnings_helper.py", line 179, in 
_filterwarnings
raise AssertionError("filter (%r, %s) did not catch any warning" %
AssertionError: filter ('The distutils package is deprecated', 
DeprecationWarning) did not catch any warning

Ah, test_distutils fails if distutils was already imported previously. The test 
should be fixed.

"""
test test_pdb failed -- Traceback (most recent call last):
  File "C:\github\cpython\lib\doctest.py", line 2205, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for test.test_pdb.test_pdb_issue_20766
  File "C:\github\cpython\lib\test\test_pdb.py", line 1270, in 
test_pdb_issue_20766
"""

This is a surprising failure. No clue why test_pdb fails when other tests are 
run previously (when tests are run sequentially).

See also bpo-43960

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Yes, I also see that pdb prompt. I recommend looking at what different
configurations are used by test.libregrtest.main() when no tests are passed
on the command line.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Yes you're right. Running the failed tests individually does not trigger the 
errors. And the

(Pdb) continue
(Pdb) continue
(Pdb) continue
(Pdb) continue

actually is manually entered by me. My tests also stop at that prompt but 
somehow entering these commands again allow us to continue. Why are the errors 
triggering at all? The tests that are failing when ran alongside the test suite 
haven't been messed with for a very long time now and still somehow out of the 
blue they are failing. Any thoughts?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Tim Peters


Tim Peters  added the comment:

I expect parallelism is a red herring: early in the test output attached to 
this report:

0:00:04 Run tests sequentially

and there's no other evidence in the output that multiple tests are running 
simultaneously.

Also on Win10, the 4 failing tests here pass for me if I run them one at a 
time, so it's not obvious.

I _suspect_ that what's going wrong with test_pdb is the root cause: every now 
& again, for some weeks now, when I try to run tests on Windows I come back to 
the cmd.exe window and see that it's just sitting there, waiting at a pdb 
prompt.

In the output attached to this report, note that after test_threading starts, 

(Pdb) continue
(Pdb) continue
(Pdb) continue
(Pdb) continue

appears out of the blue. But test_pdb is long finished by that time.

But I'm clueless about current pdb internals.

--
nosy: +tim.peters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

Can you submit a PR that fixes it?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

The test expects the  but gets sigint_handler 
method of a pdb.Pdb instance instead.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


Shreyan Avigyan  added the comment:

Pdb error source - 
https://github.com/python/cpython/blob/9aea31deddf7458be3546f72185740f3cd06687f/Lib/test/test_pdb.py#L1270

This is where the error in Pdb is originating from.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Guido van Rossum


Guido van Rossum  added the comment:

I wonder if these four tests do something that affects all threads? The test 
driver module runs tests in parallel (if you ask it to run all or most tests, 
like the default).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Christian Heimes


Change by Christian Heimes :


--
nosy:  -christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Erlend Egeberg Aasland


Change by Erlend Egeberg Aasland :


--
nosy:  -erlendaasland

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43955] Test Failures on Windows 10

2021-04-27 Thread Shreyan Avigyan


New submission from Shreyan Avigyan :

Recent test failures have been noticed on Windows 10. The full test log has 
been attached. The tests test_distutils, test_pdb, test_signal and 
test_threading require a little bit of attention since there seems to be some 
kind of error.

--
components: Windows
files: tests_log.txt
messages: 392104
nosy: Guido.van.Rossum, Mark.Shannon, christian.heimes, corona10, 
erlendaasland, gvanrossum, pablogsal, paul.moore, serhiy.storchaka, shihai1991, 
shreyanavigyan, steve.dower, tim.golden, vstinner, zach.ware
priority: normal
severity: normal
status: open
title: Test Failures on Windows 10
versions: Python 3.10
Added file: https://bugs.python.org/file49995/tests_log.txt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com