View Issue Details

IDProjectCategoryView StatusLast Update
0002813Ham Radio DeluxeBugpublic2018-07-25 20:47
Assigned ToK7ZCZ 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version6.4.0.873 
Summary0002813: Logbook: crashes when freeing REQUEST_SIGNAL_DATA structure in CountryLookup() function
DescriptionThe logbook sometimes crashes with this stack shape:

0:008> .ecxr
eax=122eccfc ebx=775f48c0 ecx=00000001 edx=775f4890 esi=00000002 edi=005b0000
eip=775ccbab esp=122eccd8 ebp=122ecd6c iopl=0         nv up ei pl zr na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
775ccbab eb36            jmp     ntdll!RtlReportCriticalFailure+0xc0 (775ccbe3)
0:008> kb
  *** Stack trace for last set context - .thread/.cxr resets it
 # ChildEBP RetAddr  Args to Child              
00 122ecd6c 775d4e2e 00000001 00000009 775d2bb3 ntdll!RtlReportCriticalFailure+0x88
01 122ecd78 775d2bb3 00000002 77582a5f 1daee892 ntdll!RtlpReportHeapFailure+0x2f
02 122ecd80 77582a5f 1daee892 00000000 18bbfb54 ntdll!RtlpHeapHandleError+0x11
03 122ecdb4 775d9af9 18bbfb54 18bbfb54 00000009 ntdll!RtlpHpHeapHandleError+0x65
04 122ecdc8 7758fb7d 18bbfb54 00000000 00000000 ntdll!RtlpLogHeapFailure+0x41
05 122ece24 00dcdb82 005b0000 00000000 18bbfb54 ntdll!RtlFreeHeap+0x74fad
06 122ece38 0115287d 18bbfb54 79a51e82 1bfe7980 HRDLogbook!free+0x1a [f:\dd\vctools\crt\crtw32\heap\free.c @ 51] 
07 122ef9b4 0113a20d 18bbfb54 18bbf9cc 79a51ed2 HRDLogbook!CBackgroundProcessingThread::CountryLookup+0x894d [c:\ham radio\logbook\hrdlogbook\backgroundprocessingthreadlookups.cpp @ 5259] 
08 122ef9e4 0113a526 1bfe7980 ffffffff 79a51d2a HRDLogbook!CBackgroundProcessingThread::ProcessData+0x36d [c:\ham radio\logbook\hrdlogbook\backgroundprocessingthread.cpp @ 582] 
09 122efa1c 0131e210 79a51d72 06109b40 006153c8 HRDLogbook!CBackgroundProcessingThread::DoWork+0xa6 [c:\ham radio\logbook\hrdlogbook\backgroundprocessingthread.cpp @ 311] 
0a 122efa44 0131e156 79a51db6 00dd2da7 06109b40 HRDLogbook!CThinThread::Run+0x80 [c:\ham radio\logbook\hrdlogbook\thinthread.cpp @ 188] 
0b 122efa80 00dd2cfb 015fa808 79a51d8e 00dd2da7 HRDLogbook!CThinThread::Start+0x46 [c:\ham radio\logbook\hrdlogbook\thinthread.cpp @ 236] 
0c 122efab8 00dd2e23 00dd2da7 122efad8 766ba1a4 HRDLogbook!_callthreadstartex+0x1b [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 376] 
0d 122efac4 766ba1a4 06109b40 766ba180 1c5eb76a HRDLogbook!_threadstartex+0x7c [f:\dd\vctools\crt\crtw32\startup\threadex.c @ 354] 
0e 122efad8 7754174e 06109b40 1daede06 00000000 kernel32!BaseThreadInitThunk+0x24
0f 122efb20 77541722 ffffffff 7758632e 00000000 ntdll!__RtlUserThreadStart+0x2b
10 122efb30 00000000 00dd2da7 06109b40 00000000 ntdll!_RtlUserThreadStart+0x1b

This call stack indicates that, after performing a "country lookup" request, an attempt to free the data describing the request resulted in an error. In investigating several dumps (see the related Mantis issues) the dumps indicate that either the memory was freed twice, or the memory should never have been freed (eg, it was allocated on the stack).

The CountryLookup request can only be enqueued from a couple of places. One is meant to block; the other is meant to "fire and forget" the result. A blocking thread is not apparent in any of the dumps. But the calling code appears to be correct in both cases, so the problem must indicate that synchronization isn't working as intended.

TagsNo tags attached.
Sub-ModuleCall lookup
Testing N/A


related to 0002735 feedbackK7ZCZ 1 - Backlog Logbook Lockup 
related to 0002732 closedPD9FER 4 - Closed w/o Action Logbook crashing when idle 



2018-07-25 00:48

manager   ~0005781

Fixed with this checkin:


2018-07-25 07:56

administrator   ~0005782

Passing it. Unable to test it. Running 873 for a day to ensure there are no new crashes. Then ship.

This is a release build.

Issue History

Date Modified Username Field Change
2018-07-23 10:52 K7ZCZ New Issue
2018-07-23 10:52 K7ZCZ Relationship added related to 0002735
2018-07-23 10:53 K7ZCZ Relationship added related to 0002732
2018-07-25 00:48 K7ZCZ Note Added: 0005781
2018-07-25 00:49 K7ZCZ Assigned To => K7ZCZ
2018-07-25 00:49 K7ZCZ Status new => resolved
2018-07-25 00:49 K7ZCZ Resolution open => fixed
2018-07-25 00:49 K7ZCZ Fixed in Version =>
2018-07-25 07:56 WA9PIE Status resolved => closed
2018-07-25 07:56 WA9PIE Testing Not Started => N/A
2018-07-25 07:56 WA9PIE Note Added: 0005782
2018-07-25 20:47 WA9PIE Project 3 - Current Dev List => Ham Radio Deluxe