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: Service application hang in python25.dll
Type: performance Stage:
Components: Windows Versions:
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, chandra, terry.reedy
Priority: normal Keywords:

Created on 2011-11-03 12:53 by chandra, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg146928 - (view) Author: Chandra Sekhar Reddy (chandra) Date: 2011-11-03 12:53
Service application hanged in python25.dll, below are the environment details.

Operating System : Windows server 2008 R2 (Virtual Machine) Application Type : Service Application

We have got the process dump from the customer environment and after analyzing the dump using the Windbg tool.

Below is the status of the 4 running threads.
 
 Last error for thread 0:
 LastErrorValue: (Win32) 0 (0) - The operation completed successfully.
 LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
 
 Last error for thread 1:
 LastErrorValue: (Win32) 0 (0) - The operation completed successfully.
 LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
 
 Last error for thread 2:
 LastErrorValue: (Win32) 0 (0) - The operation completed successfully.
 LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0

Last error for thread 3:
 LastErrorValue: (Win32) 0 (0) - The operation completed successfully.
 LastStatusValue: (NTSTATUS) 0 - STATUS_WAIT_0
 
 But as part of the hang analysis the command "!analyze -hang" shows
 some problem with thread 1
 
 Probably caused by : python25.dll ( python25!PyList_New+62 )
 
 03dff250 1e072c5b python25!PyFuture_FromAST+0x873
 03dff25c 1e073307 python25!PyFuture_FromAST+0xbcb
 03dff264 1e07332e python25!PyObject_GC_Malloc+0x67
 03dff270 1e081502 python25!PyObject_GC_New+0xe
 00000000 00000000 python25!PyList_New+0x62

Thanks,
-Chandra
msg146930 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-11-03 13:10
This information is far too incomplete, but as a first step, did you check the memory usage of the process? Is the computer constantly swapping memory to disk?
msg147056 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-11-04 22:48
2.5 in no longer maintained. 2.6 only gets security patches.
So please test with the latest 2.7 (currently 2.7.2).
If you cannot do that, please close.
msg147218 - (view) Author: Chandra Sekhar Reddy (chandra) Date: 2011-11-07 12:28
Hi Amaury and Terry,

Thanks for your feedback, actually the product that we have delivered to customer is now in support phase, so currently there is no development going on, so we cannot use the latest python. 

It would be of great help if you could provide your inputs by looking at the process call stack. So that I can proceed further.

From the call stack the function appears to be like memory allocation related functions from python module. Is it possible for a process to hang if memory request to OS is not satisfied.

Awaiting for your valuable inputs,
-Chandra
msg147219 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-11-07 12:44
Unfortunately there is not much in the process call stack: the creation of a list (PyList_New) needs to allocate some memory (not much: sizeof(PyListObject) + gc overhead, probably 32 bytes).

If the system malloc() function fails and returns NULL, Python will raise a MemoryError.  But if malloc() blocks and freezes the process, there is not much Python can do.
msg147263 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-11-07 23:06
I am closing this because there is no issue for currently maintained CPython. If you have further questions, try python-list or a question-answer forum such as StackOverflow.
History
Date User Action Args
2022-04-11 14:57:23adminsetgithub: 57544
2011-11-07 23:06:18terry.reedysetstatus: open -> closed
resolution: out of date
messages: + msg147263
2011-11-07 12:44:45amaury.forgeotdarcsetmessages: + msg147219
2011-11-07 12:28:56chandrasetmessages: + msg147218
2011-11-04 22:48:00terry.reedysetnosy: + terry.reedy

messages: + msg147056
versions: - Python 2.6
2011-11-03 13:10:13amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg146930
2011-11-03 12:53:48chandracreate