Message389911
| Author |
Michael.Felt |
| Recipients |
Michael.Felt, vstinner |
| Date |
2021年03月31日.14:56:08 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1b1c38fc-18cf-2f61-df77-21d96ff97c8a@felt.demon.nl> |
| In-reply-to |
<1617090006.69.0.157120669533.issue43665@roundup.psfhosted.org> |
| Content |
On 30/03/2021 09:40, STINNER Victor wrote:
> STINNER Victor <vstinner@python.org> added the comment:
>
> A core dump is a very bad sign of health.
>
> Can you please try to bisect which test is causing the segfault using bisect_cmd? Try the command:
>
> ./python -m test.bisect_cmd -o bisect --fail-env-changed test_importlib
>
> The command should takes 10-60 minutes, and you should see the number of tests decreasing. I hope that at the end, the command will identify a single method triggering the crash.
>
> At the end, the create "bisect" file contains the test methods causing the bug.
>
> Then you can re-run tests with:
>
> ./python -m test --fail-env-changed test_importlib --matchfile=bisect
I like this!:
Fortunately, it did not take 10 minutes:
Writing 1 tests into bisect
Tests (1):
*
test.test_importlib.test_threaded_import.ThreadedImportTests.test_multiprocessing_pool_circular_import
Output written into bisect
Bisection completed in 34 iterations and 0:00:28
>
>
>> The core dump is caused by SIGTRAP. I need help to learn how to stop the core dump from being cleaned up so I can load it into dbx and hopefully understand/learn with sub-test is actually having issues.
> You can re-run the test without libregrtest by running it directly. Example:
>
> ./python -m test.test_importlib test_spec.Frozen_ModuleSpecMethodsTests.test_reload -v
While - to use your example - using the normal verbose test syntax I do
see the test you reference:
* test_reload
(test.test_importlib.test_spec.Frozen_ModuleSpecMethodsTests) ... ok
but, when I run your example (and many variations) I always get
something such as:
So, still - closer - but not quite there with:
+++++
./python -m test.test_importlib
test_spec.Frozen_ModuleSpecMethodsTests.test_reload -v
test_spec (unittest.loader._FailedTest) ... ERROR
======================================================================
ERROR: test_spec (unittest.loader._FailedTest)
----------------------------------------------------------------------
AttributeError: module '__main__' has no attribute 'test_spec'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
+++++
> It should create a core dump in the current directory, or you run the command in your favorite debugger.
>
>
> My notes on debugging a Python crash: https://pythondev.readthedocs.io/debug_tools.html#core-dump
>
> ----------
> nosy: +vstinner
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue43665>
> _______________________________________
> |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2021年03月31日 14:56:09 | Michael.Felt | set | recipients:
+ Michael.Felt, vstinner |
| 2021年03月31日 14:56:09 | Michael.Felt | link | issue43665 messages |
| 2021年03月31日 14:56:08 | Michael.Felt | create |
|