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]

Re: Cygwin 2.6.0 Fork issue


(Apologies if multiple copies of this show up. Not getting feedback on what the issue is. This attempt just has my comments on the strace file, without the strace itself.)

Rashi Singhal wrote:
Please help me on this. This is strace output of my sample program
which is failing to open files after fork in child process.

I am using 2.26 (32 bit) version of cygwin with Pervasive 12 . Windows
Os is win-2012.

My sample program name is btrsamp.exe.

Please give me some clue on what could be issue here.

I see several unusual things in the strace.  They're noted below...

--- Process 6704 created
--- Process 6704 loaded C:\Windows\SysWOW64\ntdll.dll at 771A0000
--- Process 6704 loaded C:\Windows\SysWOW64\KernelBase.dll at 74C00000
--- Process 6704 loaded \\blrvswdbm01\bmpc226\misys\bin\cygwin1.dll at 61000000

...

--- Process 6704 loaded
C:\Windows\WinSxS\x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.6910_none_d089c358442de345\msvcr80.dll
at 6F2D0000

The main process loaded cygwin1.dll further above, but is here loading the MS C
runtime, which is incompatible with cygwin1.dll.

...

--- Process 6704 loaded C:\Program Files
(x86)\Actian\PSQL\bin\w3mif190.dll at 67D00000
--- Process 6704 loaded C:\Windows\SysWOW64\clusapi.dll at 6FEC0000
--- Process 6704 loaded C:\Windows\SysWOW64\cryptdll.dll at 70090000
--- Process 6704 loaded C:\Program Files
(x86)\Actian\PSQL\bin\clientrb.dll at 02530000
--- Process 6704, exception 000006d9 at 74C10192

Main process caused an exception in KernelBase.dll

--- Process 6704 loaded C:\Windows\SysWOW64\NapiNSP.dll at 74260000
--- Process 6704 loaded C:\Windows\SysWOW64\nlaapi.dll at 74250000
--- Process 6704 loaded C:\Windows\SysWOW64\mswsock.dll at 74180000
--- Process 6704 thread 5568 created
--- Process 6704 loaded C:\Windows\SysWOW64\dnsapi.dll at 74100000
--- Process 6704 loaded C:\Windows\SysWOW64\winrnr.dll at 740E0000
--- Process 6704, exception e06d7363 at 74C10192

Main process caused another exception in KernelBase.dll

...

--- Process 6704, exception e06d7363 at 74C10192

And another exception, either a new one or a second-chance reporting of the
previous one.  Haven't even gotten to the fork() yet...

...

    58  629941 [main] btrsamp 6704 fork: entering

Main process has just entered fork().

...

--- Process 5876 created

...

--- Process 5876 loaded C:\Program Files
(x86)\Actian\PSQL\bin\clientrb.dll at 02530000
--- Process 5876, exception 000006d9 at 74C10192

Child process causes an exception in KernelBase.dll just like the parent did at
first...

--- Process 5876 thread 4956 exited with status 0x6d9
--- Process 5876 thread 1212 exited with status 0x6d9
--- Process 5876 thread 3544 exited with status 0x6d9
--- Process 5876 thread 5868 created
--- Process 5876 exited with status 0x6d9

But this was enough to kill the child process.  Not sure if relevant but the
first exception reported by both parent and child came just after loading
clientrb.dll.  Is this DLL Cygwin-specific or Windows-native?

487729 1281052 [waitproc] btrsamp 6704
pinfo::maybe_set_exit_code_from_windows: pid 5876, exit value - old
0x0, windows 0x6D9, cygwin 0x800D900
   131 1281183 [waitproc] btrsamp 6704 sig_send: sendsig 0xAC, pid

...

    44 15806380 [main] btrsamp 6704 normalize_posix_path:
/cygdrive/l/bmpcunix/etc/gmon.out = normalize_posix_path (gmon.out)
    51 15806431 [main] btrsamp 6704 mount_info::conv_to_win32_path:
conv_to_win32_path (/cygdrive/l/bmpcunix/etc/gmon.out)
    52 15806483 [main] btrsamp 6704 mount_info::cygdrive_win32_path:
src '/cygdrive/l/bmpcunix/etc/gmon.out', dst
'L:\bmpcunix\etc\gmon.out'
    44 15806527 [main] btrsamp 6704 set_flags: flags: binary (0x2)
    42 15806569 [main] btrsamp 6704 mount_info::conv_to_win32_path:
src_path /cygdrive/l/bmpcunix/etc/gmon.out, dst
L:\bmpcunix\etc\gmon.out, flags 0x4022, rc 0
   433 15807002 [main] btrsamp 6704 symlink_info::check: 0x0 =
NtCreateFile (\??\L:\bmpcunix\etc\gmon.out)

Above are several lines mentioning gmon.out.  If you're trying to profile, you
should postpone that until after you get the program working.

In addition to what Brian and Eliot have suggested, you might try moving the
cygwin/bin directory from the end of your PATH to the start of your PATH.  I'm
also wondering if every DLL being associated with your program was built for
Cygwin, or if you might be mistakenly pulling in one or more Windows-native DLLs.

..mark

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


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