This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

program hangs after a call to malloc


I'd appreciate any input on further diagnosis of this problem.
It happens in the same point of program execution every time,
but the offending line is executed many times before the lockup
occurs. Below is my gdb output.
Thanks,
Paul

(gdb) info threads
* 6 thread 1356.0x928  0x77f813b2 in ntdll!DbgUiConnectToDbg ()
from /cygdrive/c/WINNT/system32/NTDLL.DLL
  5 thread 1356.0x32c  0x77f82870 in ntdll!ZwWaitForSingleObject
() from /cygdrive/c/WINNT/system32/NTDLL.DLL
  4 thread 1356.0x954  0x77f8289c in ntdll!ZwRemoveIoCompletion
() from /cygdrive/c/WINNT/system32/NTDLL.DLL
  3 thread 1356.0x2e8  0x77f8287e in
ntdll!ZwWaitForMultipleObjects () from
/cygdrive/c/WINNT/system32/NTDLL.DLL
  2 thread 1356.0x930  0x77f82926 in ntdll!ZwReadFile () from
/cygdrive/c/WINNT/system32/NTDLL.DLL
  1 thread 1356.0x6a4  0x610ade38 in random () from
/usr/bin/cygwin1.dll

(gdb) thread 1
[Switching to thread 1 (thread 1356.0x6a4)]#0  0x610ade38 in
random () from /usr/bin/cygwin1.dll
(gdb) backtrace
#0  0x610ade38 in random () from /usr/bin/cygwin1.dll
#1  0x610ae74b in random () from /usr/bin/cygwin1.dll
#2  0x610563f6 in dll_entry@12 () from /usr/bin/cygwin1.dll
#3  0x610882af in cygwin1!aclcheck () from /usr/bin/cygwin1.dll
#4  0x0044971c in tl_strndup (
    s=0x101166d1 "meta http-equiv=\"Content-Type\"
content=\"text/html; charset=iso-8859-1\">", n=4)
    at tools.c:929
#5  0x0042fcb2 in html_parser_check_tag (hpinfo=0x10112910,
    tagstart=0x101166d1 "meta http-equiv=\"Content-Type\"
content=\"text/html; charset=iso-8859-1\">")
    at htmlparser.c:324
#6  0x0043033d in html_parser_parse_tag (hpinfo=0x10112910,
    stack=0x101166d0 "<meta http-equiv=\"Content-Type\"
content=\"text/html; charset=iso-8859-1\">", data=0x0)
    at htmlparser.c:529
#7  0x0042fb64 in html_parser_call_funcs (hpinfo=0x10112910,
funcs=0x101241e8) at htmlparser.c:291
#8  0x0043011f in html_parser_parse (hpinfo=0x10112910) at
htmlparser.c:451
#9  0x0042e918 in html_process_document (html_doc=0x22eed0,
formlist=0x22ed9c) at html.c:382
#10 0x00442e81 in process_document (docu=0x22eed0, check_lim=1)
at recurse.c:607
#11 0x004432e8 in recurse (thnr=1) at recurse.c:847
#12 0x00402a44 in absi_restart () at ainterface.c:209
#13 0x00441309 in main (argc=3, argv=0x616e3854) at pavuk.c:526
(gdb) frame 4
#4  0x0044971c in tl_strndup (
    s=0x101166d1 "meta http-equiv=\"Content-Type\"
content=\"text/html; charset=iso-8859-1\">", n=4)
    at tools.c:929
929             p = (char *) _malloc(n + 1);

------------------------------------------------------------
_malloc is a macro that maps to malloc(). Here's info from other
threads' backtrace:
------------------------------------------------------------
(gdb) backtrace
#0  0x77f813b2 in ntdll!DbgUiConnectToDbg ()
   from /cygdrive/c/WINNT/system32/NTDLL.DLL
#1  0x7c57180b in KERNEL32!DebugActiveProcess ()
   from /cygdrive/c/WINNT/system32/KERNEL32.DLL
#2  0x61003e24 in getprogname () from /usr/bin/cygwin1.dll
#3  0x019bf0dc in ?? ()
(gdb) thread 5
[Switching to thread 5 (thread 2352.0x5dc)]#0  0x77f82870 in
ntdll!ZwWaitForSing
leObject () from /cygdrive/c/WINNT/system32/NTDLL.DLL
(gdb) backtrace
#0  0x77f82870 in ntdll!ZwWaitForSingleObject ()
   from /cygdrive/c/WINNT/system32/NTDLL.DLL
#1  0x7c573b28 in WaitForSingleObjectEx ()
   from /cygdrive/c/WINNT/system32/KERNEL32.DLL
#2  0x7c573b50 in WaitForSingleObject ()
   from /cygdrive/c/WINNT/system32/KERNEL32.DLL
#3  0x0000021c in ?? ()
#4  0xffffffff in ?? ()
(gdb) thread 4
[Switching to thread 4 (thread 2352.0x6bc)]#0  0x77f8289c in
ntdll!ZwRemoveIoCom
pletion () from /cygdrive/c/WINNT/system32/NTDLL.DLL
(gdb) backtrace
#0  0x77f8289c in ntdll!ZwRemoveIoCompletion ()
   from /cygdrive/c/WINNT/system32/NTDLL.DLL
#1  0x74fd6363 in StartWsdpService ()
   from /cygdrive/c/WINNT/system32/msafd.dll
#2  0x0000023c in ?? ()
#3  0x0177f0ac in ?? ()
#4  0x0177f0a0 in ?? ()
#5  0x0177f094 in ?? ()
#6  0x74fd6408 in StartWsdpService ()
   from /cygdrive/c/WINNT/system32/msafd.dll
#7  0x00267740 in ?? ()
#8  0x74fd6311 in StartWsdpService ()
   from /cygdrive/c/WINNT/system32/msafd.dll
(gdb) thread 3
[Switching to thread 3 (thread 2352.0x5b4)]#0  0x77f8287e in
ntdll!ZwWaitForMult
ipleObjects () from /cygdrive/c/WINNT/system32/NTDLL.DLL
(gdb) backtrace
#0  0x77f8287e in ntdll!ZwWaitForMultipleObjects ()
   from /cygdrive/c/WINNT/system32/NTDLL.DLL
#1  0x7c573c23 in WaitForMultipleObjectsEx ()
   from /cygdrive/c/WINNT/system32/KERNEL32.DLL
#2  0x7c578f0d in WaitForMultipleObjects ()
   from /cygdrive/c/WINNT/system32/KERNEL32.DLL
#3  0x014eee38 in ?? ()
#4  0x00000001 in ?? ()
(gdb) thread 2
[Switching to thread 2 (thread 2352.0x86c)]#0  0x77f82926 in
ntdll!ZwReadFile
    () from /cygdrive/c/WINNT/system32/NTDLL.DLL
(gdb) backtrace
#0  0x77f82926 in ntdll!ZwReadFile ()
   from /cygdrive/c/WINNT/system32/NTDLL.DLL
#1  0x7c5785d1 in ReadFile () from
/cygdrive/c/WINNT/system32/KERNEL32.DLL
#2  0x6108e1e6 in sigfillset () from /usr/bin/cygwin1.dll
#3  0x610030e6 in getprogname () from /usr/bin/cygwin1.dll




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]