This crash is, in my opinion, going to be hard to fix. It is a race
condition if a subprocess goes away at about the same time
mswindows_need_event is called. The handle for the subprocess may be in
the vector of things it waits on even though the subprocess is gone. The
only real way to fix this is to treat mswindows_need_event and the code
that manipulates mswindows_waitable_handles as a critical section using a
semaphore to control access to mswindows_waitable_handles.
I submitted a patch some time ago [1] that solves the problem by detecting
the failure and repeating the wait. Since the vector of waitable handles
has been updated in the meantime, repeating the wait works fine. This
really seems like a reasonable solution to the problem. I don't think it
is worth the time to add code that avoids the race condition. My patch
could be improved by limiting the number of times it will repeat the wait
so that it will fail instead of looping if mswindows_waitable_handles gets
permanently screwed up.
Mike Alexander <mailto:mtaï¼ arbortext.com>
Arbortext, Inc. +1-734-997-0200
[1] <
--On Saturday, July 28, 2001 1:46 PM +0200 Adrian Aichner
<Adrian.Aichner(a)t-online.de> wrote:
This bug report will be sent to the XEmacs Development Team,
not to your local site managers!!
Please write in English, because the XEmacs maintainers do not have
translators to read other languages for them.
In XEmacs 21.4 (patch 4) "Artificial Intelligence (candidate 3)" [Lucid]
(i586-pc-win32) of Fri Jul 27 2001 on D5DC120J configured using
`configure UNKNOWN'
Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:
I was using zenirc at the time.
The crash occured while I was idle.
Adrian
Recent keystrokes:
n RET SPC q RET c y SPC q g RET SPC n n SPC SPC SPC
SPC SPC SPC DEL DEL DEL DEL DEL DEL DEL DEL DEL DEL
DEL DEL DEL DEL DEL DEL DEL DEL SPC q s RET n SPC n
SPC n n SPC SPC C-x o M-< C-s a i c h n e r RET C-s
C-s C-s C-s RET M-> n SPC q s RET c y SPC q RET SPC
q s g s p p p g s misc-user M-x r e p o SPC - e m SPC
RET
Recent messages (most recent first):
Loading iso-acc...
Loading lazy-lock...done
Loading lazy-lock...
Loading emacsbug...done
Loading emacsbug...
Making completion list...
Checking new news...done
Checking new news...
Reading active file via nnfolder...done
Reading active file via nnfolder...
NTDLL! 77fa018c()
mswindows_need_event(int 1) line 1518 + 52 bytes event-msw.c
active -1
badly_p 1
mswindows_waitable_count 9
- mswindows_waitable_handles 0x011c7cc4 mswindows_waitable_handles
[0] 0x00000824
[1] 0x00000804
[2] 0x0000080c
[3] 0x00000764
[4] 0x00000c00
[5] 0x00000dd0
[6] 0x00000e50
[7] 0x00000e6c
[8] 0x00000e84
[9] 0x00000000
[10] 0x00000000
[11] 0x00000000
[12] 0x00000000
[13] 0x00000000
[14] 0x00000000
[15] 0x00000000
[16] 0x00000000
[17] 0x00000000
[18] 0x00000000
[19] 0x00000000
[20] 0x00000000
[21] 0x00000000
[22] 0x00000000
[23] 0x00000000
[24] 0x00000000
[25] 0x00000000
[26] 0x00000000
[27] 0x00000000
[28] 0x00000000
[29] 0x00000000
[30] 0x00000000
[31] 0x00000000
[32] 0x00000000
[33] 0x00000000
[34] 0x00000000
[35] 0x00000000
[36] 0x00000000
[37] 0x00000000
[38] 0x00000000
[39] 0x00000000
[40] 0x00000000
[41] 0x00000000
[42] 0x00000000
[43] 0x00000000
[44] 0x00000000
[45] 0x00000000
[46] 0x00000000
[47] 0x00000000
[48] 0x00000000
[49] 0x00000000
[50] 0x00000000
[51] 0x00000000
[52] 0x00000000
[53] 0x00000000
[54] 0x00000000
[55] 0x00000000
[56] 0x00000000
[57] 0x00000000
[58] 0x00000000
[59] 0x00000000
[60] 0x00000000
[61] 0x00000000
[62] 0x00000000
what_events 255
emacs_mswindows_next_event(Lisp_Event * 0x051e4720) line 3363 + 7 bytes
event-msw.c - emacs_event 0x051e4720
- lheader {...}
type 29
mark 0
c_readonly 0
lisp_readonly 0
next 20494704
event_type 0
channel 20494704
timestamp 0
- event {...}
- key {...}
keysym 0
modifiers 0
- button {...}
button 0
modifiers 0
x 0
y 0
- motion {...}
x 0
y 0
modifiers 0
- process {...}
process 0
- timeout {...}
interval_id 0
id_number 0
function 0
object 0
- eval {...}
function 0
object 0
- misc {...}
function 0
object 0
button 0
modifiers 0
x 0
y 0
- magic {...}
underlying_mswindows_event 0
- magic_eval {...}
internal_function 0x00000000
object 0
event 44
event2 31583720
event_stream_next_event(Lisp_Event * 0x051e4720) line 499 + 13 bytes
event-stream.c emacs_is_blocking 1
- event 0x051e4720
- lheader {...}
type 29
mark 0
c_readonly 0
lisp_readonly 0
next 20494704
event_type 0
channel 20494704
timestamp 0
- event {...}
- key {...}
keysym 0
modifiers 0
- button {...}
button 0
modifiers 0
x 0
y 0
- motion {...}
x 0
y 0
modifiers 0
- process {...}
process 0
- timeout {...}
interval_id 0
id_number 0
function 0
object 0
- eval {...}
function 0
object 0
- misc {...}
function 0
object 0
button 0
modifiers 0
x 0
y 0
- magic {...}
underlying_mswindows_event 0
- magic_eval {...}
internal_function 0x00000000
object 0
next_event_internal(long 85870368, int 0) line 1959 + 9 bytes
event-stream.c - e 0x051e4720
- lheader {...}
type 29
mark 0
c_readonly 0
lisp_readonly 0
next 20494704
event_type 0
channel 20494704
timestamp 0
- event {...}
- key {...}
keysym 0
modifiers 0
- button {...}
button 0
modifiers 0
x 0
y 0
- motion {...}
x 0
y 0
modifiers 0
- process {...}
process 0
- timeout {...}
interval_id 0
id_number 0
function 0
object 0
- eval {...}
function 0
object 0
- misc {...}
function 0
object 0
button 0
modifiers 0
x 0
y 0
- magic {...}
underlying_mswindows_event 0
- magic_eval {...}
internal_function 0x00000000
object 0
target_event 85870368
Faccept_process_output(long 146624416, long 20494704, long 20494704) line
2614 + 11 bytes event-stream.c event 85870368
process 146624416
timeout_secs 20494704
timeout_msecs 20494704
timeout_enabled 0
event 85870368
+ old_buffer 0x08cbc840
+ gcpro2 {...}
+ gcpro1 {...}
done 0
timeout_id -1
count 197
result 20494704
Ffuncall(int 2, long * 0x0082332c) line 3528 + 127 bytes
execute_optimized_program(const unsigned char * 0x00823528, int 10, long
* 0x0146ec80) line 746 + 16 bytes Fbyte_code(long 20652560, long
21425264, long 21) line 2405 + 38 bytes Feval(long 21219336) line 3331 +
187 bytes
internal_catch(long 20397672, long (long)* 0x01071b4c Feval(long), long
21219336, int * volatile 0x00000000) line 1317 + 7 bytes
execute_rare_opcode(long * 0x00823838, const unsigned char * 0x027edad5,
int 141) line 1252 + 22 bytes execute_optimized_program(const unsigned
char * 0x027eda40, int 9, long * 0x0146ed70) line 656 + 17 bytes
funcall_compiled_function(long 21595376, int 6, long * 0x00823b24) line
518 + 53 bytes Ffuncall(int 7, long * 0x00823b20) line 3563 + 17 bytes
Fapply(int 6, long * 0x00823c18) line 3804 + 13 bytes
Ffuncall(int 7, long * 0x00823c14) line 3549 + 14 bytes
execute_optimized_program(const unsigned char * 0x027ed9c8, int 7, long *
0x0146ee44) line 746 + 16 bytes funcall_compiled_function(long 21595404,
int 6, long * 0x00823efc) line 518 + 53 bytes Ffuncall(int 7, long *
0x00823ef8) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x080c60e0, int 14, long
* 0x0235d328) line 746 + 16 bytes funcall_compiled_function(long
37077156, int 2, long * 0x008241fc) line 518 + 53 bytes Ffuncall(int 3,
long * 0x008241f8) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x05239ab8, int 5, long *
0x0235d290) line 746 + 16 bytes funcall_compiled_function(long 37077128,
int 1, long * 0x008245b0) line 518 + 53 bytes Ffuncall(int 2, long *
0x008245ac) line 3563 + 17 bytes
Fapply(int 2, long * 0x008245ac) line 3747 + 13 bytes
Ffuncall(int 3, long * 0x008245a8) line 3549 + 14 bytes
execute_optimized_program(const unsigned char * 0x05337858, int 4, long *
0x02372378) line 746 + 16 bytes funcall_compiled_function(long 36852852,
int 3, long * 0x00824884) line 518 + 53 bytes Ffuncall(int 4, long *
0x00824880) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x053377a8, int 4, long *
0x0235d238) line 746 + 16 bytes funcall_compiled_function(long 37077100,
int 1, long * 0x00824b5c) line 518 + 53 bytes Ffuncall(int 2, long *
0x00824b58) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x05337750, int 3, long *
0x0235d728) line 746 + 16 bytes funcall_compiled_function(long 37077464,
int 1, long * 0x00824e34) line 518 + 53 bytes Ffuncall(int 2, long *
0x00824e30) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x052f7e50, int 4, long *
0x0235d6c0) line 746 + 16 bytes funcall_compiled_function(long 37077436,
int 5, long * 0x00825114) line 518 + 53 bytes Ffuncall(int 6, long *
0x00825110) line 3563 + 17 bytes
call5(long 36856812, long 20429856, long 148715964, long 148712668, long
20493552, long 20493552) line 4255 + 11 bytes Fcopy_file(long 148715964,
long 148712668, long 20493552, long 20493552) line 1707 + 31 bytes
Ffuncall(int 5, long * 0x0082928c) line 3528 + 168 bytes
execute_optimized_program(const unsigned char * 0x00829474, int 5, long *
0x014751f4) line 746 + 16 bytes Fbyte_code(long 20692320, long 21451236,
long 11) line 2405 + 38 bytes Feval(long 21272268) line 3331 + 187 bytes
condition_case_1(long 21272220, long (long)* 0x01071b4c Feval(long), long
21272268, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20494704) line 1651 + 7 bytes condition_case_3(long 21272268,
long 20494704, long 21272220) line 1732 + 27 bytes
execute_rare_opcode(long * 0x00829764, const unsigned char * 0x00829970,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x00829948, int 4, long * 0x0147525c) line 656 + 17 bytes
Fbyte_code(long 20692432, long 21451340, long 9) line 2405 + 38 bytes
Feval(long 21272328) line 3331 + 187 bytes
condition_case_1(long 21272124, long (long)* 0x01071b4c Feval(long), long
21272328, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20494704) line 1651 + 7 bytes condition_case_3(long 21272328,
long 20494704, long 21272124) line 1732 + 27 bytes
execute_rare_opcode(long * 0x00829c9c, const unsigned char * 0x00829e9f,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x00829e84, int 5, long * 0x014752b8) line 656 + 17 bytes
Fbyte_code(long 20692464, long 21451432, long 11) line 2405 + 38 bytes
Feval(long 21272364) line 3331 + 187 bytes
condition_case_1(long 21271812, long (long)* 0x01071b4c Feval(long), long
21272364, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20494704) line 1651 + 7 bytes condition_case_3(long 21272364,
long 20494704, long 21271812) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082a1cc, const unsigned char * 0x01d78a16,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x01d789c8, int 6, long * 0x01475574) line 656 + 17 bytes
funcall_compiled_function(long 21605960, int 0, long * 0x0082a588) line
518 + 53 bytes Ffuncall(int 1, long * 0x0082a584) line 3563 + 17 bytes
Fapply(int 2, long * 0x0082a584) line 3742 + 16 bytes
Ffuncall(int 3, long * 0x0082a580) line 3549 + 14 bytes
execute_optimized_program(const unsigned char * 0x052f7e50, int 4, long *
0x0235d6c0) line 746 + 16 bytes funcall_compiled_function(long 37077436,
int 1, long * 0x0082a85c) line 518 + 53 bytes Ffuncall(int 2, long *
0x0082a858) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x01d789c8, int 6, long *
0x01475574) line 746 + 16 bytes funcall_compiled_function(long 21605960,
int 0, long * 0x0082ab3c) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082ab38) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x0289c718, int 7, long *
0x014755dc) line 746 + 16 bytes funcall_compiled_function(long 21605988,
int 0, long * 0x0082ae20) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082ae1c) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x02957250, int 7, long *
0x014759b4) line 746 + 16 bytes funcall_compiled_function(long 21606212,
int 0, long * 0x0082b104) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082b100) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x01d78940, int 6, long *
0x01475a7c) line 746 + 16 bytes funcall_compiled_function(long 21606240,
int 0, long * 0x0082b3e4) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082b3e0) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04fe6e98, int 4, long *
0x0146fc60) line 746 + 16 bytes funcall_compiled_function(long 21596552,
int 1, long * 0x0082b6bc) line 518 + 53 bytes Ffuncall(int 2, long *
0x0082b6b8) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04fe6fd0, int 5, long *
0x04fd67b0) line 746 + 16 bytes funcall_compiled_function(long 84004908,
int 0, long * 0x0082b998) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082b994) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x0082bb78, int 4, long *
0x04fca448) line 746 + 16 bytes Fbyte_code(long 83769492, long 83665976,
long 9) line 2405 + 38 bytes Feval(long 83990948) line 3331 + 187 bytes
Fprogn(long 83130220) line 775 + 9 bytes
unbind_to_hairy(int 114) line 4977 + 18 bytes
execute_optimized_program(const unsigned char * 0x050202e8, int 7, long *
0x04fca4b0) line 759 + 259 bytes funcall_compiled_function(long 83751720,
int 1, long * 0x0082c070) line 518 + 53 bytes Ffuncall(int 2, long *
0x0082c06c) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x0082c248, int 2, long *
0x028b2ab8) line 746 + 16 bytes Fbyte_code(long 43033476, long 42674856,
long 5) line 2405 + 38 bytes Feval(long 42451600) line 3331 + 187 bytes
condition_case_1(long 42450432, long (long)* 0x01071b4c Feval(long), long
42451600, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20470320) line 1651 + 7 bytes condition_case_3(long 42451600,
long 20470320, long 42450432) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082c538, const unsigned char * 0x04f26c16,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x04f26b70, int 15, long * 0x02a2c6c0) line 656 + 17 bytes
funcall_compiled_function(long 82528796, int 2, long * 0x0082c83c) line
518 + 53 bytes Ffuncall(int 3, long * 0x0082c838) line 3563 + 17 bytes
Feval(long 43178420) line 3357 + 20 bytes
condition_case_1(long 43174160, long (long)* 0x01071b4c Feval(long), long
43178420, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20470320) line 1651 + 7 bytes condition_case_3(long 43178420,
long 20470320, long 43174160) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082cb00, const unsigned char * 0x04f249b4,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x04f24980, int 5, long * 0x04e2adf8) line 656 + 17 bytes
funcall_compiled_function(long 82528488, int 2, long * 0x0082cddc) line
518 + 53 bytes Ffuncall(int 3, long * 0x0082cdd8) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04f32410, int 15, long
* 0x02a2fbf8) line 746 + 16 bytes funcall_compiled_function(long
37208748, int 4, long * 0x0082d0e0) line 518 + 53 bytes Ffuncall(int 5,
long * 0x0082d0dc) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04f32340, int 5, long *
0x04ef9cd0) line 746 + 16 bytes funcall_compiled_function(long 82943932,
int 2, long * 0x0082d3bc) line 518 + 53 bytes Ffuncall(int 3, long *
0x0082d3b8) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04f322c8, int 4, long *
0x04e32fa8) line 746 + 16 bytes funcall_compiled_function(long 81956340,
int 2, long * 0x0082d694) line 518 + 53 bytes Ffuncall(int 3, long *
0x0082d690) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04f0c050, int 7, long *
0x028b2cb8) line 746 + 16 bytes funcall_compiled_function(long 43875772,
int 2, long * 0x0082d8f4) line 518 + 53 bytes Feval(long 43819332) line
3388 + 20 bytes
condition_case_1(long 43819680, long (long)* 0x01071b4c Feval(long), long
43819332, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20494704) line 1651 + 7 bytes condition_case_3(long 43819332,
long 20494704, long 43819680) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082dbb4, const unsigned char * 0x04e3b258,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x04e3b220, int 5, long * 0x029760e8) line 656 + 17 bytes
funcall_compiled_function(long 43875744, int 0, long * 0x0082de94) line
518 + 53 bytes Ffuncall(int 1, long * 0x0082de90) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x04fc4c28, int 3, long *
0x04f1a968) line 746 + 16 bytes funcall_compiled_function(long 82942588,
int 0, long * 0x0082e168) line 518 + 53 bytes Ffuncall(int 1, long *
0x0082e164) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x0082e33c, int 1, long *
0x04ebdea0) line 746 + 16 bytes Fbyte_code(long 42198260, long 82566800,
long 3) line 2405 + 38 bytes Feval(long 82565128) line 3331 + 187 bytes
Fprogn(long 43158760) line 775 + 9 bytes
execute_rare_opcode(long * 0x0082e594, const unsigned char * 0x0551a347,
int 139) line 1239 + 11 bytes execute_optimized_program(const unsigned
char * 0x0551a340, int 1, long * 0x04ebdee8) line 656 + 17 bytes
funcall_compiled_function(long 44090412, int 0, long * 0x0082e864) line
518 + 53 bytes Ffuncall(int 1, long * 0x0082e860) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x0082ea38, int 1, long *
0x02a1a678) line 746 + 16 bytes Fbyte_code(long 42406092, long 44148328,
long 3) line 2405 + 38 bytes Feval(long 42235472) line 3331 + 187 bytes
condition_case_1(long 82563916, long (long)* 0x01071b4c Feval(long), long
42235472, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20494704) line 1651 + 7 bytes condition_case_3(long 42235472,
long 20494704, long 82563916) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082ed24, const unsigned char * 0x02a2afb9,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x02a2af50, int 8, long * 0x04ebd9e8) line 656 + 17 bytes
funcall_compiled_function(long 37209364, int 0, long * 0x0082ef8c) line
518 + 53 bytes Feval(long 139659544) line 3388 + 20 bytes
Fprogn(long 139659592) line 775 + 9 bytes
funcall_lambda(long 139660372, int 0, long * 0x0082f1ec) line 3856 + 9
bytes Ffuncall(int 1, long * 0x0082f1e8) line 3571 + 17 bytes
execute_optimized_program(const unsigned char * 0x0082f3d0, int 5, long *
0x01473008) line 746 + 16 bytes Fbyte_code(long 20680320, long 21442552,
long 11) line 2405 + 38 bytes Feval(long 21257832) line 3331 + 187 bytes
condition_case_1(long 21257712, long (long)* 0x01071b4c Feval(long), long
21257832, long (long, long)* 0x0106ee25 run_condition_case_handlers(long,
long), long 20419896) line 1651 + 7 bytes condition_case_3(long 21257832,
long 20419896, long 21257712) line 1732 + 27 bytes
execute_rare_opcode(long * 0x0082f71c, const unsigned char * 0x02898be5,
int 143) line 1271 + 19 bytes execute_optimized_program(const unsigned
char * 0x02898b30, int 8, long * 0x01473178) line 656 + 17 bytes
funcall_compiled_function(long 21602376, int 1, long * 0x0082fa08) line
518 + 53 bytes Ffuncall(int 2, long * 0x0082fa04) line 3563 + 17 bytes
execute_optimized_program(const unsigned char * 0x02898a20, int 6, long *
0x01473310) line 746 + 16 bytes funcall_compiled_function(long 21602544,
int 1, long * 0x0082fcf4) line 518 + 53 bytes Ffuncall(int 2, long *
0x0082fcf0) line 3563 + 17 bytes
call1(long 20421000, long 20494704) line 4183 + 11 bytes
execute_internal_event(long 135383268) line 3034 + 19 bytes
Fdispatch_event(long 135383268) line 4252 + 9 bytes
Fcommand_loop_1() line 583 + 9 bytes
command_loop_1(long 20494704) line 495
condition_case_1(long 20494344, long (long)* 0x01051306
command_loop_1(long), long 20494704, long (long, long)* 0x01050d20
cmd_error(long, long), long 20494704) line 1651 + 7 bytes
command_loop_3() line 256 + 35 bytes
command_loop_2(long 20494704) line 269
internal_catch(long 20322480, long (long)* 0x01050e70
command_loop_2(long), long 20494704, int * volatile 0x00000000) line 1317
+ 7 bytes initial_command_loop(long 20494704) line 305 + 25 bytes
STACK_TRACE_EYE_CATCHER(int 1, char * * 0x00e64148, char * * 0x00e62d60,
int 0) line 2346 main(int 1, char * * 0x00e64148, char * * 0x00e62d60)
line 2714
mainCRTStartup() line 338 + 17 bytes
KERNEL32! 77e97d08()
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/