python / python/cpython

AssertionError in test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt

Đang mở
#133,651 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

tests topic-multiprocessing type-bug
Ngôn ngữ chính
Python
Star
77.2k
Fork
35.9k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

Bug report

Bug description:

I try to build Python 3.14.0b1 on Fedora Linux 42, 41, 40, the test has failed so far (the list is incomplete) for debug and freethreading-debug builds, on x86_64, i686, aarch64 arches. Traceback is in all cases similar with the difference of pipe_handle argument value.

Re-running test.test_multiprocessing_spawn.test_processes in verbose mode (matching: test_interrupt)
test_interrupt (test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt) ... Traceback (most recent call last):
  File "<string>", line 1, in <module>
    from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=5, pipe_handle=7)
                                                  ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/multiprocessing/spawn.py", line 122, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/multiprocessing/spawn.py", line 131, in _main
    prepare(preparation_data)
    ~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/multiprocessing/spawn.py", line 244, in prepare
    _fixup_main_from_name(data['init_main_from_name'])
    ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/multiprocessing/spawn.py", line 268, in _fixup_main_from_name
    main_content = runpy.run_module(mod_name,
                                    run_name="__mp_main__",
                                    alter_sys=True)
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/runpy.py", line 226, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/runpy.py", line 98, in _run_module_code
    _run_code(code, mod_globals, init_globals,
    ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              mod_name, mod_spec, pkg_name, script_name)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/runpy.py", line 88, in _run_code
    exec(code, run_globals)
    ~~~~^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/test/libregrtest/worker.py", line 8, in <module>
    from .setup import setup_process, setup_test_dir
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/test/libregrtest/setup.py", line 12, in <module>
    from .runtests import RunTests
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/test/libregrtest/runtests.py", line 194, in <module>
    @dataclasses.dataclass(slots=True, frozen=True)
     ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/dataclasses.py", line 1362, in wrap
    return _process_class(cls, init, repr, eq, order, unsafe_hash,
                          frozen, match_args, kw_only, slots,
                          weakref_slot)
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/dataclasses.py", line 1163, in _process_class
    func_builder.add_fns_to_class(cls)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/dataclasses.py", line 507, in add_fns_to_class
    fns = ns['__create_fn__'](**self.locals)
  File "<string>", line 28, in __create_fn__
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/reprlib.py", line 32, in decorating_function
    wrapper.__type_params__ = getattr(user_function, '__type_params__', ())
                              ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt
FAIL
======================================================================
FAIL: test_interrupt (test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.14.0b1/Lib/test/_test_multiprocessing.py", line 578, in test_interrupt
    self.assertEqual(exitcode, 1)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
AssertionError: -2 != 1
CPython versions tested on:

3.14

Operating systems tested on:

Linux

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với test.test_multiprocessing_spawn.test_processes.WithProcessesTestProcess.test_interrupt trong Lib/test/_test_multiprocessing.py và tái hiện nó trên bản build Linux debug hoặc freethreading-debug bị ảnh hưởng. Theo dõi tiến trình được tạo qua Lib/multiprocessing/spawn.py và đường dẫn dataclass trong Lib/test/libregrtest/runtests.py và Lib/reprlib.py; hoàn tất khi test kết thúc với exit code dự kiến trên các cấu hình đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
linux, python
Lĩnh vực
operating-systems, testing-qa
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.