diff --git a/checkin_notes b/checkin_notes index 6443a470db..fa534a85fe 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5240,3 +5240,20 @@ Rom 29 May 2006 lib/ diagnostics_win.C + +David 31 May 2006 + - database code: the following functions + DB_VALIDATOR_ITEM_SET::enumerate() + DB_WORK_ITEM::enumerate() + were using a left join on (workunit, result) or (result, workunit), + then parsing the result in a way that would crash + if only one item was present + (e.g. if there's a WU without corresponding result, or vice-versa). + + Solution: replaced "left join" with a "natural join", i.e. + select ... from workunit, result where ... + + db/ + boinc_db.C + sched/ + sched_config.C diff --git a/db/boinc_db.C b/db/boinc_db.C index e138d59bf1..d9c0ec1e17 100644 --- a/db/boinc_db.C +++ b/db/boinc_db.C @@ -119,11 +119,11 @@ void DB_PLATFORM::db_print(char* buf){ void DB_PLATFORM::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); - create_time=atol(r[i++]); + id = atoi(r[i++]); + create_time = atoi(r[i++]); strcpy2(name, r[i++]); strcpy2(user_friendly_name, r[i++]); - deprecated=atol(r[i++]); + deprecated = atoi(r[i++]); } void DB_APP::db_print(char* buf){ @@ -138,7 +138,7 @@ void DB_APP::db_print(char* buf){ void DB_APP::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); + id = atoi(r[i++]); create_time = atoi(r[i++]); strcpy2(name, r[i++]); min_version = atoi(r[i++]); @@ -161,7 +161,7 @@ void DB_APP_VERSION::db_print(char* buf){ void DB_APP_VERSION::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); + id = atoi(r[i++]); create_time = atoi(r[i++]); appid = atoi(r[i++]); version_num = atoi(r[i++]); @@ -382,7 +382,7 @@ void DB_HOST::db_print(char* buf){ void DB_HOST::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); + id = atoi(r[i++]); create_time = atoi(r[i++]); userid = atoi(r[i++]); rpc_seqno = atoi(r[i++]); @@ -646,7 +646,7 @@ void DB_WORKUNIT::db_print(char* buf){ void DB_WORKUNIT::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); + id = atoi(r[i++]); create_time = atoi(r[i++]); appid = atoi(r[i++]); strcpy2(name, r[i++]); @@ -758,7 +758,7 @@ int DB_RESULT::mark_as_sent(int old_server_state) { void DB_RESULT::db_parse(MYSQL_ROW &r) { int i=0; clear(); - id=atol(r[i++]); + id = atoi(r[i++]); create_time = atoi(r[i++]); workunitid = atoi(r[i++]); server_state = atoi(r[i++]); @@ -807,9 +807,9 @@ void DB_MSG_FROM_HOST::db_print(char* buf) { void DB_MSG_FROM_HOST::db_parse(MYSQL_ROW& r) { int i=0; clear(); - id = atol(r[i++]); - create_time = atol(r[i++]); - hostid = atol(r[i++]); + id = atoi(r[i++]); + create_time = atoi(r[i++]); + hostid = atoi(r[i++]); strcpy2(variety, r[i++]); handled = atoi(r[i++]); strcpy2(xml, r[i++]); @@ -831,11 +831,11 @@ void DB_MSG_TO_HOST::db_print(char* buf) { void DB_MSG_TO_HOST::db_parse(MYSQL_ROW& r) { int i=0; clear(); - id = atol(r[i++]); - create_time = atol(r[i++]); - hostid = atol(r[i++]); + id = atoi(r[i++]); + create_time = atoi(r[i++]); + hostid = atoi(r[i++]); strcpy2(variety, r[i++]); - handled = atol(r[i++]); + handled = atoi(r[i++]); strcpy2(xml, r[i++]); } @@ -1128,10 +1128,8 @@ int DB_VALIDATOR_ITEM_SET::enumerate( " res.sent_time, " " res.received_time " "FROM " - " workunit AS wu " - " LEFT JOIN result AS res ON wu.id = res.workunitid " - "WHERE " - " wu.appid = %d and wu.need_validate > 0 %s " + " workunit AS wu, result AS res where wu.id = res.workunitid " + " and wu.appid = %d and wu.need_validate > 0 %s " "LIMIT " " %d ", priority, appid, mod_clause, nresult_limit @@ -1227,7 +1225,7 @@ void WORK_ITEM::parse(MYSQL_ROW& r) { int i=0; memset(this, 0, sizeof(WORK_ITEM)); res_id = atoi(r[i++]); - wu.id=atol(r[i++]); + wu.id = atoi(r[i++]); wu.create_time = atoi(r[i++]); wu.appid = atoi(r[i++]); strcpy2(wu.name, r[i++]); @@ -1263,9 +1261,9 @@ int DB_WORK_ITEM::enumerate( MYSQL_ROW row; if (!cursor.active) { sprintf(query, - "select high_priority result.id, workunit.* from result left join workunit " - "on workunit.id = result.workunitid " - "where result.server_state=%d " + "select high_priority result.id, workunit.* from result, workunit " + "where workunit.id = result.workunitid " + "and result.server_state=%d " " %s " " %s " "limit %d", @@ -1280,7 +1278,9 @@ int DB_WORK_ITEM::enumerate( if (!cursor.rp) return mysql_errno(db->mysql); cursor.active = true; } +again: row = mysql_fetch_row(cursor.rp); + if (!row) { mysql_free_result(cursor.rp); cursor.active = false; diff --git a/doc/app_debug_win.php b/doc/app_debug_win.php index 06b9ed7a5b..d4ab5aa3cf 100644 --- a/doc/app_debug_win.php +++ b/doc/app_debug_win.php @@ -2,9 +2,32 @@ require_once("docutil.php"); page_head("Application debugging on Windows"); echo " -

Anatomy of a Windows stack trace

+

Contents

+ -

Debugger version

+

Anatomy of a Windows stack trace

+ +

Introduction

+ +

Debugger version

@@ -32,7 +55,11 @@ find the symbol files related to the modules loaded in memory. Entries prefixed 'srv*' are used to denote a web based symbol store. DbgHelp will use them if symsrv can be loaded at the time of the crash.

-

Module List

+If you see a load library failure for either dbghelp.dll or symsrv.dll then there +is a pretty good chance that most of the data in the dump will be useless. +

+ +

Module List

@@ -56,68 +83,137 @@ was loaded, the second hexdecimal is the size of the module. If a version record was found inside the module, it'll be dumped out as part of the module list dump.

-

Exception Record

+ +

Process Information

+
+ + + +
+
+*** Dump of the Process Statistics: ***
+
+- I/O Operations Counters -
+Read: 24, Write: 0, Other 206
+
+- I/O Transfers Counters -
+Read: 0, Write: 358, Other 0
+
+- Paged Pool Usage -
+QuotaPagedPoolUsage: 29116, QuotaPeakPagedPoolUsage: 29228
+QuotaNonPagedPoolUsage: 6624, QuotaPeakNonPagedPoolUsage: 6640
+
+- Virtual Memory Usage -
+VirtualSize: 64102400, PeakVirtualSize: 71045120
+
+- Pagefile Usage -
+PagefileUsage: 26218496, PeakPagefileUsage: 33697792
+
+- Working Set Size -
+WorkingSetSize: 19210240, PeakWorkingSetSize: 26361856, PageFaultCount: 6729
+      
+
+ +

Thread Information

+ +
-*** UNHANDLED EXCEPTION ****
+*** Dump of the Worker thread (a4): ***
+      
+
+ +
General Information
+ + + + + +
+
+- Information -
+Status: Waiting, Wait Reason: UserRequest, Kernel Time: 0.000000, User Time: 0.000000, Wait Time: 38241696.000000
+      
+
+ +
Unhandled Exception Record
+ + + +
+
+- Unhandled Exception Record -
 Reason: Breakpoint Encountered (0x80000003) at address 0x7C822583
       
-

- -

Stack traces

+
Registers
-*** Dump of the Worker(offending) thread: ***
-eax=00000000 ebx=00000000 ecx=77e4245b edx=7c82ed54 esi=77e424a8 edi=00454f20
-eip=7c822583 esp=00a1fd64 ebp=00a1ffb4
-cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
-
-ChildEBP RetAddr  Args to Child
-00a1fd60 0040203b 00000000 00000000 00000000 00000001 ntdll!_DbgBreakPoint@0+0x0 FPO: [0,0,0] 
-00a1ffb4 004239ce 77e66063 00000000 00000000 00000000 uppercase_5.10_windows_intelx86!worker+0x0 (c:\boincsrc\main\boinc_samples\uppercase\upper_case.c:174) 
-00a1ffb8 77e66063 00000000 00000000 00000000 00000000 uppercase_5.10_windows_intelx86!foobar+0x0 (c:\boincsrc\main\boinc\api\graphics_impl.c:75) FPO: [1,0,0] 
-00a1ffec 00000000 004239c0 00000000 00000000 00000000 kernel32!_BaseThreadStart@8+0x0 (c:\boincsrc\main\boinc\api\graphics_impl.c:75) 
-
-*** Dump of the Timer thread: ***
-eax=0002625a ebx=00000000 ecx=00000000 edx=00b1feb0 esi=00000001 edi=00000000
-eip=7c82ed54 esp=00b1ff0c ebp=00b1ffb8
-cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
-
-ChildEBP RetAddr  Args to Child
-00b1ff08 7c822114 76aba0d3 00000002 00b1ff70 00000001 ntdll!_KiFastSystemCallRet@0+0x0 FPO: [0,0,0] 
-00b1ff0c 76aba0d3 00000002 00b1ff70 00000001 00000001 ntdll!_NtWaitForMultipleObjects@20+0x0 FPO: [5,0,0] 
-00b1ffb8 77e66063 00000000 00000000 00000000 00000000 WINMM!_timeThread@4+0x0 
-00b1ffec 00000000 76aba099 00000000 00000000 49474542 kernel32!_BaseThreadStart@8+0x0 
-
-*** Dump of the Graphics thread: ***
-eax=00000000 ebx=7738e3f7 ecx=00000000 edx=00000000 esi=0012fc00 edi=7739ca9d
-eip=7c82ed54 esp=0012fbb4 ebp=0012fbd8
-cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
-
-ChildEBP RetAddr  Args to Child
-0012fbb0 7739c78d 77392f3a 0012fc00 00000000 00000000 ntdll!_KiFastSystemCallRet@0+0x0 FPO: [0,0,0] 
-0012fbd8 00424c3f 0012fc00 00000000 00000000 00000000 USER32!_NtUserGetMessage@16+0x0 
-0012fcb0 00423ca3 00000001 00000001 00000001 00000001 uppercase_5.10_windows_intelx86!win_graphics_event_loop+0x14 (c:\boincsrc\main\boinc\api\windows_opengl.c:571) FPO: [0,46,0] 
-0012fcd0 004220eb 00401078 0045c3b0 0040233c 00401078 uppercase_5.10_windows_intelx86!boinc_init_graphics_impl+0x30 (c:\boincsrc\main\boinc\api\graphics_impl.c:84) FPO: [2,7,0] 
-0012fcdc 0040233c 00401078 00454f00 004483a4 00000002 uppercase_5.10_windows_intelx86!boinc_init_graphics+0x4b (c:\boincsrc\main\boinc\api\graphics_api.c:45) FPO: [1,0,0] 
-0012fcf4 004023b1 00000002 0012fd0c 00142550 0012fd0c uppercase_5.10_windows_intelx86!main+0xa (c:\boincsrc\main\boinc_samples\uppercase\upper_case.c:233) FPO: [2,0,0] 
-0012fe98 004035b4 00400000 00000000 001425a7 00000001 uppercase_5.10_windows_intelx86!WinMain+0x0 (c:\boincsrc\main\boinc_samples\uppercase\upper_case.c:110) FPO: [4,100,0] 
-0012ffc0 77e523cd 00000000 00000000 7ffd9000 8707adb0 uppercase_5.10_windows_intelx86!WinMainCRTStartup+0x1d (f:\vs70builds\3077\vc\crtbld\crt\src\crt0.c:251) 
-0012fff0 00000000 00403430 00000000 78746341 00000020 kernel32!_BaseProcessStart@4+0x0 (f:\vs70builds\3077\vc\crtbld\crt\src\crt0.c:251) 
+- Registers -
+eax=00000000 ebx=00000000 ecx=77e4245b edx=7c82ed54 esi=77e88bfe edi=00459f40
+eip=7c822583 esp=00aafd64 ebp=00aaffb4
+cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
       
+ +
Callstack
+ + + + + +
+
+- Callstack -
+ChildEBP RetAddr  Args to Child
+00aafd60 00402221 00000000 00000000 00000000 00000001 ntdll!_DbgBreakPoint@0+0x0 FPO: [0,0,0] 
+00aaffb4 0042684e 77e66063 00000000 00000000 00000000 uppercase_5.10_windows_intelx86!worker+0x0 (c:\boincsrc\main\boinc_samples\uppercase\upper_case.c:181) 
+00aaffb8 77e66063 00000000 00000000 00000000 00000000 uppercase_5.10_windows_intelx86!foobar+0x0 (c:\boincsrc\main\boinc\api\graphics_impl.c:75) FPO: [1,0,0] 
+00aaffec 00000000 00426840 00000000 00000000 00000000 kernel32!_BaseThreadStart@8+0x0 (c:\boincsrc\main\boinc\api\graphics_impl.c:75) 
+      
+
+ +

Debug Message Dump

+ + + + + +
+
+*** Debug Message Dump ****
+      
+
+ +

Foreground Window Data

+ + + + + +
+
+*** Foreground Window Data ***
+    Window Name      : 
+    Window Class     : 
+    Window Process ID: 16f8
+    Window Thread ID : ae8
+      
+
+ +

Common Issues

+ "; page_tail(); diff --git a/doc/boinc_news.inc b/doc/boinc_news.inc index 6867103072..8b14e55f36 100644 --- a/doc/boinc_news.inc +++ b/doc/boinc_news.inc @@ -1,6 +1,19 @@ Worldwide, 690,000 help computer effort and + Medical researcher taps the power of home computing." +), +array("May 30, 2006", + "The BOINCStats Account Manager + (BAM!) is now available for use. + BAM! provides 'one-stop shopping' for finding + and attaching to BOINC project; + see the news item of May 11. + Thanks to Willy de Zutter for developing BAM!." +), array("May 25, 2006", "BOINC has added preliminary support for 'low-latency' computing; e.g. delay bounds of minutes rather than days. diff --git a/sched/sched_config.C b/sched/sched_config.C index 3064cc79cd..307bab91ae 100644 --- a/sched/sched_config.C +++ b/sched/sched_config.C @@ -112,6 +112,7 @@ int SCHED_CONFIG::parse(FILE* f) { else if (!strcmp(tag, "output_level")) continue; else if (!strcmp(tag, "profile_screening")) continue; else if (!strcmp(tag, "min_passwd_length")) continue; + else if (!strcmp(tag, "disable_account_creation")) continue; else fprintf(stderr, "unknown tag: %s\n", tag); } return ERR_XML_PARSE;