Sally, Thank you for the additional information. The problem is different from the issue fixed in the 8-20 beta release.
The VirtualAllocEx and copytochild error messages are from UWIN attempting to duplicate a process' address space. Windows is now doing some randomization of process address space, so when UWIN copies from the virtual address in one process to the child, the virtual addresses don't match and get the 'attempt to access invalid address'. As you note the in the message parent_fork failed - try again, UWIN does continue to execute the fork code until success. The maxtry is the number of times left to try to fork the process before UWIN considers the fork to fail. There were some problems with this that was corrected in the 8-20 beta release. But apparently issues when the ksh is started from a Windows process (runcmd or java or cmd shell) that need to be corrected. I'm have narrowed the problem down to one area, and am working on a solution to the problem. Your example is another way to verify the solution. Jeff fellin -----Original Message----- From: Sally Chase [mailto:[email protected]] Sent: Tuesday, September 11, 2012 16:59 To: Jon Pile; FELLIN, JEFFREY K (JEFF) Cc: [email protected] Subject: RE: [uwin-users] Deadlock in $( foo | bar ) I'm seeing something similar, also with the 8-20 patch, in case this is useful information. I have a java scheduler that kicks off some ksh processes. When the ksh in question does things similar to this: if [[ $(uname -s | cut -c 1-4) = "UWIN" ]]; then sep=";" else sep=":" fi I often end up with a hung ksh; usually I see cut.exe but occasionally uname.exe in the process list (from ps or task manager). If I kill these, things proceed for a while until it hangs again. The process output contains a lot of this: 2012-09-11+16:46:11 6124 195971 1 2304 276 0 (ksh) spawnve.c:2416: VirtualAllocEx addr=0x02232000 size=253952 [487:Attempt to access invalid address] 2012-09-11+16:46:11 6124 195971 1 2304 276 0 (ksh) spawnve.c:2968: copytochild minfo failed [487:Attempt to access invalid address] 2012-09-11+16:46:11 6124 195971 1 2304 276 0 (ksh) spawnve.c:4525: parent_fork failed - try again maxtry=24 exitval=51 2012-09-11+16:46:11 6124 195971 1 2304 276 0 (ksh) spawnve.c:2416: VirtualAllocEx addr=0x02232000 size=253952 [487:Attempt to access invalid address] 2012-09-11+16:46:11 6124 195971 1 2304 276 0 (ksh) spawnve.c:2968: copytochild minfo failed [487:Attempt to access invalid address] Also, sometimes I see a bunch of init.exe processes that seem to be stuck in the process list. Without the pipe, it's a lot more successful. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jon Pile Sent: Thursday, September 06, 2012 9:23 PM To: FELLIN, JEFFREY K (JEFF) Cc: [email protected] Subject: Re: [uwin-users] Deadlock in $( foo | bar ) >> $ uname -a >> UWIN-XP dt-Fellin 5.0/5.1 2012-08-20 i686 x86 32/32 UWIN > > > Thanks Jeff, I can confirm the 08/20 beta fixes it for me too. On to > the next thing :) Looks like there may still be a race condition in there. The following hangs eventually, usually every 30 or so iterations. The record is 82 tries before hanging: $ typeset -i i=0 $ while [ i -lt 1000 ] > do > i=$i+1 > print $i > runcmd "ksh -c /tmp/rep.ksh" > done $ uname -a UWIN-W7 jpile-w510 5.0/6.1 2012-08-20 i686-64 x64 64/64 UWIN -jP _______________________________________________ uwin-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/uwin-users _______________________________________________ uwin-users mailing list [email protected] https://mailman.research.att.com/mailman/listinfo/uwin-users
