Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot #74355

Closed
vstinner opened this issue Apr 26, 2017 · 6 comments
Closed
Labels
3.7 (EOL) end of life OS-windows stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump

Comments

@vstinner
Copy link
Member

BPO 30169
Nosy @Yhg1s, @pfmoore, @vstinner, @tjguk, @zware, @zooba, @applio

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2017-05-02.14:40:04.458>
created_at = <Date 2017-04-26.12:54:26.686>
labels = ['tests', '3.7', 'library', 'OS-windows', 'type-crash']
title = 'test_multiprocessing_spawn crashed on AMD64 Windows8.1 Non-Debug 3.x buildbot'
updated_at = <Date 2017-05-02.14:40:04.457>
user = 'https://github.com/vstinner'

bugs.python.org fields:

activity = <Date 2017-05-02.14:40:04.457>
actor = 'vstinner'
assignee = 'none'
closed = True
closed_date = <Date 2017-05-02.14:40:04.458>
closer = 'vstinner'
components = ['Library (Lib)', 'Tests', 'Windows']
creation = <Date 2017-04-26.12:54:26.686>
creator = 'vstinner'
dependencies = []
files = []
hgrepos = []
issue_num = 30169
keywords = []
message_count = 6.0
messages = ['292337', '292338', '292339', '292341', '292359', '292767']
nosy_count = 7.0
nosy_names = ['twouters', 'paul.moore', 'vstinner', 'tim.golden', 'zach.ware', 'steve.dower', 'davin']
pr_nums = []
priority = 'normal'
resolution = 'out of date'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'crash'
url = 'https://bugs.python.org/issue30169'
versions = ['Python 3.7']

@vstinner
Copy link
Member Author

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/670/steps/test/logs/stdio

0:05:37 [255/404/1] test_multiprocessing_spawn crashed (Exit code 3221225477)
Windows fatal exception: access violation

Current thread 0x00001644 (most recent call first):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\_test_multiprocessing.py", line 3997 in ManagerMixin
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\_test_multiprocessing.py", line 3988 in <module>
File "<frozen importlib._bootstrap>", line 205 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 679 in exec_module
File "<frozen importlib._bootstrap>", line 655 in _load_unlocked
File "<frozen importlib._bootstrap>", line 950 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 961 in _find_and_load
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\test_multiprocessing_spawn.py", line 2 in <module>
File "<frozen importlib._bootstrap>", line 205 in _call_with_frames_removed
File "<frozen importlib._bootstrap_external>", line 679 in exec_module
File "<frozen importlib._bootstrap>", line 655 in _load_unlocked
File "<frozen importlib._bootstrap>", line 950 in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 961 in _find_and_load
File "<frozen importlib._bootstrap>", line 978 in _gcd_import
File "D:\buildarea\3.x.ware-win81-release\build\lib\importlib\init.py", line 127 in import_module
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest.py", line 152 in runtest_inner
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest.py", line 119 in runtest
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\runtest_mp.py", line 71 in run_tests_slave
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 470 in _main
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 463 in main
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\libregrtest\main.py", line 527 in main
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\regrtest.py", line 46 in _main
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\regrtest.py", line 50 in <module>
File "D:\buildarea\3.x.ware-win81-release\build\lib\runpy.py", line 85 in _run_code
File "D:\buildarea\3.x.ware-win81-release\build\lib\runpy.py", line 193 in _run_module_as_main

Note: same crash in test_multiprocessing_fork, even if Windows has no os.fork(): the crash occurs at lib\test\test_multiprocessing_fork.py:2 "import test._test_multiprocessing", before check if os.fork() exists.

@vstinner vstinner added 3.7 (EOL) end of life stdlib Python modules in the Lib dir tests Tests in the Lib/test dir OS-windows type-crash A hard crash of the interpreter, possibly with a core dump labels Apr 26, 2017
@vstinner
Copy link
Member Author

The crash is probably random. I looked at the last 250 builds. Since build 421, the first crash occurred at build 578 (commit a00c3fd, no idea if it's related):

http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Non-Debug%203.x/builds/578/

I found 8 test_multiprocessing_spawn crashes in builds:

  • 578
  • 579
  • 659
  • 660
  • 661
  • 664
  • 665
  • 670

@vstinner
Copy link
Member Author

Current thread 0x00001644 (most recent call first):
File "D:\buildarea\3.x.ware-win81-release\build\lib\test\_test_multiprocessing.py", line 3997 in ManagerMixin

Line 3997 is:
Condition = property(operator.attrgetter('manager.Condition'))

I don't understand how creating operator.attrgetter() or property() object can crash? Maybe the memory was corrupted before?

Extract of _test_multiprocessing.py around this line:

class ManagerMixin(object):
    TYPE = 'manager'
    Process = multiprocessing.Process
    Queue = property(operator.attrgetter('manager.Queue'))
    JoinableQueue = property(operator.attrgetter('manager.JoinableQueue'))
    Lock = property(operator.attrgetter('manager.Lock'))
    RLock = property(operator.attrgetter('manager.RLock'))
    Semaphore = property(operator.attrgetter('manager.Semaphore'))
    BoundedSemaphore = property(operator.attrgetter('manager.BoundedSemaphore'))
    Condition = property(operator.attrgetter('manager.Condition'))
    Event = property(operator.attrgetter('manager.Event'))
    Barrier = property(operator.attrgetter('manager.Barrier'))
    Value = property(operator.attrgetter('manager.Value'))
    Array = property(operator.attrgetter('manager.Array'))
    list = property(operator.attrgetter('manager.list'))
    dict = property(operator.attrgetter('manager.dict'))
    Namespace = property(operator.attrgetter('manager.Namespace'))

@vstinner
Copy link
Member Author

I also checked the last 250 builds of AMD64 Windows8 3.x: test_multiprocessing_spawn never crashed.

http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x

We got 8 crashed on "AMD64 Windows8.1 Non-Debug 3.x", but 0 crash on "AMD64 Windows8 3.x" (similar Windows version, but it's a different buildbot slave, so different hardware, version, etc.)... So *maybe* it's related to the commit a00c3fd and the issue bpo-29941 since this patch changed the behaviour of Python compiled in release mode.

@Yhg1s
Copy link
Member

Yhg1s commented Apr 26, 2017

Eh, commit a00c3fd wasn't supposed to affect any behaviour in release builds, just in non-debug builds *with asserts enabled*, and only in making them build.

(There is a bug in that commit that was fixed right after, commit 06bb487, but there shouldn't be any behavioural change since that went in.)

What kind of behaviour change do you think the change caused?

@vstinner
Copy link
Member Author

vstinner commented May 2, 2017

Sadly, the random issue didn't reoccur in the following 13 builds. So I close the issue. I will reopen it if I see the crash again.

@vstinner vstinner closed this as completed May 2, 2017
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 (EOL) end of life OS-windows stdlib Python modules in the Lib dir tests Tests in the Lib/test dir type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

No branches or pull requests

2 participants