This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: process finished with exit code -1073740940 (0xc0000374)
Type: crash Stage: resolved
Components: Windows Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: eric.smith, eryksun, kunduruanil, paul.moore, steve.dower, tim.golden, vstinner, xtreak, zach.ware
Priority: normal Keywords:

Created on 2019-01-16 08:18 by kunduruanil, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (8)
msg333752 - (view) Author: Anil kunduru (kunduruanil) Date: 2019-01-16 08:18
function contains of long loop each iteration it will do get data from different website using request.get and do analysis, loop will take one minute for 10 iteration.
after completed some 100 to 400 iteration it will exit with process finished with exit code -1073740940 (0xc0000374) do no what is this unexpected behavior!
msg333753 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-01-16 09:07
Please include a minimal code snippet without external dependencies to reproduce the issue. Describe what you have done (script, traceback, operating system environment etc) and what you are expecting. Without these information it's unclear to debug a crash and especially if it's a bug in Python or the logic in the code.

Thanks
msg333754 - (view) Author: Anil kunduru (kunduruanil) Date: 2019-01-16 09:43
i am figuring out as heap memory issue because i am using multiple data frames and online web scrap data as well , may be memory is overloaded and it cause this issue .
please correct me it may not be changes or not.
msg333760 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2019-01-16 11:32
I assume this is on Windows? 0xc0000374 is a heap corruption error on Windows.

I agree that without a way to reproduce this it will be impossible to track down any error.
msg333761 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-01-16 11:38
You can enable faulthandler to get the Python traceback where the bug occurs. It might help a little bit. Either write the traceback into a file (file argument of faulthandler.enable()) or run your program in a terminal to see the traceback on the terminal.

http://docs.python.org/dev/library/faulthandler.html

I also suggest you to try to run your program using "python -X dev program.py" to enable more debug checks:
https://pythondev.readthedocs.io/debug_tools.html

PYTHONMALLOC=debug environment variable may help.
msg333762 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2019-01-16 11:40
A crash with the code STATUS_HEAP_CORRUPTION (0xC0000374) is due to a bug, not memory exhaustion. The bug may not be the fault of the interpreter or standard library if you're working with extension modules or ctypes. It's easy to corrupt the internal structures of a heap. For example:

    >>> import ctypes
    >>> b = (ctypes.c_char * 100000)()
    >>> ctypes.POINTER(ctypes.c_int)(b)[-1] = 0
    >>> del b

[crashed]

    C:\>echo %errorlevel%
    -1073740940

Heap corruption is best examined with a debugger (e.g. windbg or cdb) attached to the faulting process, with full page heap checking enabled for the executable in the registry (usually set via gflags). This reserves a page before and after each heap allocation to ensure that writes that would otherwise corrupt the heap will instead immediately raise an access violation.
msg333828 - (view) Author: Anil kunduru (kunduruanil) Date: 2019-01-17 07:38
thanks Eryk Sun i am able to solve the problem, it was extension modules problem. it was helpful great.
msg333829 - (view) Author: Anil kunduru (kunduruanil) Date: 2019-01-17 07:40
Thanks guys for quick responses.  Eryk Sun  comment wa very help full.
History
Date User Action Args
2022-04-11 14:59:10adminsetgithub: 79931
2019-01-17 08:08:22eryksunsetstatus: open -> closed
resolution: fixed -> third party
stage: resolved
2019-01-17 07:40:04kunduruanilsetresolution: fixed
messages: + msg333829
2019-01-17 07:38:08kunduruanilsetmessages: + msg333828
2019-01-16 11:40:01eryksunsetnosy: + paul.moore, tim.golden, eryksun, zach.ware, steve.dower
messages: + msg333762
components: + Windows
2019-01-16 11:38:57vstinnersetnosy: + vstinner
messages: + msg333761
2019-01-16 11:32:51eric.smithsetnosy: + eric.smith
messages: + msg333760
2019-01-16 09:43:17kunduruanilsetmessages: + msg333754
2019-01-16 09:07:46xtreaksetnosy: + xtreak
messages: + msg333753
2019-01-16 08:18:22kunduruanilcreate