public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Cygwin 2.6.0 Fork issue
@ 2016-12-08  5:37 Rashi Singhal
  2016-12-08  7:17 ` Brian Inglis
  2016-12-16  9:28 ` Rashi Singhal
  0 siblings, 2 replies; 12+ messages in thread
From: Rashi Singhal @ 2016-12-08  5:37 UTC (permalink / raw)
  To: cygwin

Hi,

I am using cygwin 2.6.0 (32 bit) version with Actian Pervasive version 12.

We have a program which will call fork() and in child process Btrieve
file is getting opened.

While using latest version of cygwin, file open call is not working ,
Its not opening file nor displaying any error.

Could you please help me on this .

Regards,
Rashi

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Cygwin 2.6.0 Fork issue
@ 2017-01-03  8:53 Rashi Singhal
  2017-01-05  4:04 ` Rashi Singhal
  0 siblings, 1 reply; 12+ messages in thread
From: Rashi Singhal @ 2017-01-03  8:53 UTC (permalink / raw)
  To: cygwin

Hi,

I am using cygwin 2.6.0 (32 bit) version with Actian Pervasive version 12.

We have a program which will call fork() and in child process Btrieve
file is getting opened.

While using latest version of cygwin, file open call is not working ,
Its not opening file nor displaying any error.

Could you please help me on this .

I checked all installation also . Still problem exist

Regards,
Rashi

--
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

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Cygwin 2.6.0 Fork issue
@ 2017-01-03 11:17 Mark Geisert
  0 siblings, 0 replies; 12+ messages in thread
From: Mark Geisert @ 2017-01-03 11:17 UTC (permalink / raw)
  To: cygwin

(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

^ permalink raw reply	[flat|nested] 12+ messages in thread
[parent not found: <586F5B5F.1070407@maxrnd.com>]

end of thread, other threads:[~2017-01-06 20:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08  5:37 Cygwin 2.6.0 Fork issue Rashi Singhal
2016-12-08  7:17 ` Brian Inglis
2016-12-16  9:28 ` Rashi Singhal
2016-12-30  8:25   ` Rashi Singhal
2016-12-30 19:25     ` Eliot Moss
2017-01-03  8:53 Rashi Singhal
2017-01-05  4:04 ` Rashi Singhal
2017-01-05 10:17   ` Mark Geisert
2017-01-06  2:58   ` Rashi Singhal
2017-01-03 11:17 Mark Geisert
     [not found] <586F5B5F.1070407@maxrnd.com>
2017-01-06  9:05 ` Mark Geisert
2017-01-06 20:34   ` René Berber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).