Subject: multiple dll's cause app to hang
From: John Jones <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Wed, 19 Dec 2001 16:23:08 +0000

dear all

I have what I would call a major problem.
(common across all machine types I have here)

when I compile a application such as sed and cygwin1.dll everything 
works but if I try and mix my dll with the net version it hangs

say I have a normal net install

I compile cygwin prefix=/install
I compile sed prefix=/install

now if I remove cygwin1.dll from /install/bin/ sed executes fine
if I replace /bin/cygwin1.dll with my compiled version from /install 
everything works

but if I mix the two it just hangs and causes DrWatson to complain if I 
ctrl-C it.

(this is not common to sed ps.exe fails also)

I have strace'd it and it seems to do with the shared memory. As it does 
not even get to executing the program I put in some debug prints so that 
I could find out the mode but I am unsure of what's going on after the 
_P_OVERLAY.

so what this says to me is that if someone installs a cygwin net over a 
different release then it will invalidate the previous install

should I just change the version numbers ? as they are the same at the 
moment, so they don't try and share memory and if so the API version 
number or the major

what's the sensible way of going about this ?

or is something really broken ?
(its not like I am changing the source or using custom programs but the 
ones supplied with cygwin)

regards

john jones

p.s. for your viewing pleasure I have attached the snippets from strace 
and cygcheck

 >>>>>>>>>>>>>>>>>>>>>> strace -ofails.log bash <<<<<<<<<<<<<<<<<<<<<<<<

  6497  443770 [main] bash 128! spawn_guts: spawned windows pid 162
  1723  445493 [main] bash 128! spawn_guts: malloc check
  1500  446993 [main] bash 128! spawn_guts: mode == _P_OVERLAY
  4147  451140 [sig] bash 128! wait_sig: sigcatch_nonmain 0x50, 
sigcatch_main 0x48
  1613  452753 [sig] bash 128! wait_sig: Ready.  dwProcessid 128
**********************************************
Program name: C:\cygwin\usr\src\bin\ps.exe (128)
App version:  1003.5, api: 0.47
DLL version:  1003.6, api: 0.47
DLL build:    2001-12-08 17:02
OS version:   Windows NT-4.0
Date/Time:    2001-12-18 13:41:36
**********************************************
  2584   11255 [main] ps 128 handle_exceptions: In cygwin_except_handler 
exc 0xC0000005 at 0x1 sp 0x22FE94
  1487   12742 [main] ps 128 handle_exceptions: In cygwin_except_handler 
sig = 11 at 0x1
  1217   13959 [main] ps 128 handle_exceptions: signal 11, masked 0x73807EDB
  1206   15165 [main] ps 128 handle_exceptions: In cygwin_except_handler 
calling 0x428F10
  1559   16724 [main] ps 128 sig_send: returning 1 from sending signal 11
  2213   18937 [main] ps 128 handle_exceptions: In cygwin_except_handler 
exc 0xC0000005 at 0x1 sp 0x22FE94
  1328   20265 [main] ps 128 handle_exceptions: In cygwin_except_handler 
sig = 11 at 0x1
  1454   21719 [main] ps 128 handle_exceptions: signal 11, masked 0x73807EDB
  1227   22946 [main] ps 128 handle_exceptions: In cygwin_except_handler 
calling 0x428F10
  1329   24275 [main] ps 128 sig_send: returning 1 from sending signal 11
  2428   26703 [main] ps 128 handle_exceptions: In cygwin_except_handler 
exc 0xC0000005 at 0x1 sp 0x22FE94
  1363   28066 [main] ps 128 handle_exceptions: In cygwin_except_handler 
sig = 11 at 0x1
  1216   29282 [main] ps 128 handle_exceptions: signal 11, masked 0x73807EDB
  1205   30487 [main] ps 128 handle_exceptions: In cygwin_except_handler 
calling 0x428F10
  1454   31941 [main] ps 128 sig_send: returning 1 from sending signal 11

 >>>>>>>>>>>>>>>>>>> strace -oworks.log bash <<<<<<<<<<<<<<<<<<<<<<<<<

  3274  452828 [sig] bash 136 wait_sig: Ready.  dwProcessid 136
17735  470563 [main] bash 136 spawn_guts: 136 = spawn_guts (./ps.exe, 
C:\cygwin\usr\src\bin\ps.exe)
  6483  477046 [main] bash 136! spawn_guts: spawned windows pid 234
  1516  478562 [main] bash 136! spawn_guts: malloc check
  1418  479980 [main] bash 136! spawn_guts: mode == _P_OVERLAY
**********************************************
Program name: C:\cygwin\install\bin\ps.exe (136)
App version:  1003.5, api: 0.47
DLL version:  1003.5, api: 0.47
DLL build:    2001-12-18 17:19
OS version:   Windows NT-4.0
Date/Time:    2001-12-19 10:42:13
**********************************************
24359   94260 [main] ps 136 open_shared: name (null), shared 0x930000 
(wanted 0x0), h 0x80
16030  110290 [main] ps 136 fhandler_console::open: opened conin$ 0x47, 
conout$ 0x4B
  5801  116091 [main] ps 136 fhandler_console::open: opened conin$ 0x17, 
conout$ 0x3B
  4395  120486 [main] ps 136 fhandler_console::open: opened conin$ 0x2B, 
conout$ 0x2F

 >>>>>>>>>>>>>>>>>>>>>>the ol cygcheck output<<<<<<<<<<<<<<<

Cygnus Win95/NT Configuration Diagnostics
Current System Time: Wed Dec 19 16:14:43 2001

Windows NT Ver 4.0 Build 1381 Service Pack 6

Path: 
C:\cygwin\usr\local\bin
	C:\cygwin\bin
	C:\cygwin\bin
	c:\WINNT\system32
	c:\WINNT

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

HOME = `C:\cygwin\home\Administrator'
MAKE_MODE = `unix'
PWD = `/'
USER = `Administrator'

COMPUTERNAME = `TESTNT'
COMSPEC = `C:\WINNT\system32\cmd.exe'
HOMEDRIVE = `C:'
HOMEPATH = `\'
LOGONSERVER = `\\TESTNT'
NUMBER_OF_PROCESSORS = `1'
OLDPWD = `/home/Administrator'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
OS = `Windows_NT'
PATHEXT = `.COM;.EXE;.BAT;.CMD'
PROCESSOR_ARCHITECTURE = `x86'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 6 Stepping 0, GenuineIntel'
PROCESSOR_LEVEL = `6'
PROCESSOR_REVISION = `0600'
PROMPT = `$P$G'
PS1 = `\[\033]0;\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '
SHLVL = `1'
SYSTEMDRIVE = `C:'
SYSTEMROOT = `C:\WINNT'
TEMP = `c:\TEMP'
TERM = `cygwin'
TMP = `c:\TEMP'
USERDOMAIN = `TESTNT'
USERNAME = `administrator'
USERPROFILE = `C:\WINNT\Profiles\Administrator'
WINDIR = `C:\WINNT'
_ = `/usr/bin/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
   (default) = `/cygdrive'
   cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
   (default) = `C:/cygwin'
   flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
   (default) = `C:/cygwin/bin'
   flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
   (default) = `C:/cygwin/lib'
   flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

a:  fd           N/A    N/A
c:  hd  FAT     4094Mb  94% CP    UN
d:  cd           N/A    N/A
h:  net NTFS    3551Mb  92%          PA        john

.              /cygdrive  user    binmode,noumount
C:/cygwin      /          system  binmode
C:/cygwin/bin  /usr/bin   system  binmode
C:/cygwin/lib  /usr/lib   system  binmode

Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\sh.exe

    18k 2000/10/23 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                   "cyggdbm.dll" v0.0 ts=2000/10/23 3:26
    45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                   "cygform5.dll" v0.0 ts=2001/4/25 6:28
    26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                   "cygmenu5.dll" v0.0 ts=2001/4/25 6:27
   156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                   "cygncurses++5.dll" v0.0 ts=2001/4/25 6:29
   226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                   "cygncurses5.dll" v0.0 ts=2001/4/25 6:17
    15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                   "cygpanel5.dll" v0.0 ts=2001/4/25 6:27
    34k 2001/09/30 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
                   "cygform6.dll" v0.0 ts=2001/9/30 3:43
    19k 2001/09/30 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
                   "cygmenu6.dll" v0.0 ts=2001/9/30 3:43
   175k 2001/09/30 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
                   "cygncurses++6.dll" v0.0 ts=2001/9/30 3:45
   201k 2001/09/30 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
                   "cygncurses6.dll" v0.0 ts=2001/9/30 3:42
    12k 2001/09/30 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
                   "cygpanel6.dll" v0.0 ts=2001/9/30 3:43
    17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                   "cyghistory4.dll" v0.0 ts=2001/1/7 4:34
    21k 2001/06/28 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
                   "cyghistory5.dll" v0.0 ts=2001/6/28 3:27
   108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                   "cygreadline4.dll" v0.0 ts=2001/1/7 4:34
   135k 2001/06/28 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
                   "cygreadline5.dll" v0.0 ts=2001/6/28 3:27
    49k 2001/02/03 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                   "cygz.dll" v0.0 ts=2001/2/3 20:35
    56k 2000/12/03 C:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                   "cygbz21.0.dll" v0.0 ts=2000/11/20 23:53
    21k 2001/06/20 C:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                   "cygintl.dll" v0.0 ts=2001/6/20 18:09
    66k 2001/11/20 C:\cygwin\bin\cygregex.dll - os=4.0 img=1.0 sys=4.0
                   "cygregex.dll" v0.0 ts=2001/11/20 14:44
    81k 2001/10/20 C:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                   "cygitcl30.dll" v0.0 ts=2001/10/20 1:25
    35k 2001/10/20 C:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                   "cygitk30.dll" v0.0 ts=2001/10/20 1:25
   390k 2001/10/20 C:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                   "cygtcl80.dll" v0.0 ts=2001/10/20 1:24
     5k 2001/10/20 C:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
    10k 2001/10/20 C:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                   "cygtclreg80.dll" v0.0 ts=2001/10/20 1:24
   623k 2001/10/20 C:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                   "cygtk80.dll" v0.0 ts=2001/10/20 1:25
  5292k 2001/12/18 C:\cygwin\bin\cygwin1-unknowen.dll - os=4.0 img=1.0 
sys=4.0
                   "cygwin1.dll" v0.0 ts=2001/12/17 18:24
   720k 2001/12/08 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                   "cygwin1.dll" v0.0 ts=2001/12/8 22:02
     Cygwin DLL version info:
         DLL version: 1.3.6
         DLL epoch: 19
         DLL bad signal mask: 19005
         DLL old termios: 5
         DLL malloc env: 28
         API major: 0
         API minor: 47
         Shared data: 3
         DLL identifier: cygwin1
         Mount registry: 2
         Cygnus registry name: Cygnus Solutions
         Cygwin registry name: Cygwin
         Program options name: Program Options
         Cygwin mount registry name: mounts v2
         Cygdrive flags: cygdrive flags
         Cygdrive prefix: cygdrive prefix
         Cygdrive default prefix:
         Build date: Sat Dec 8 17:02:30 EST 2001
         CVS tag: cygwin-1-3-6-6
         Shared id: cygwin1S3

Cygwin Package Information
Last downloaded files to: C:\WINNT\Profiles\Administrator\Desktop
Last downloaded files from: 
ftp://ftp.mirror.ac.uk/sites/sourceware.cygnus.com/pub/cygwin

Package             Version
ash                 20011018-1
ash-src             20011018-1
autoconf            2.52-5
autoconf-devel      2.52-4
autoconf-stable     2.13-4
automake            1.5a-1
automake-devel      1.5-5
automake-stable     1.4p5-5
bash                2.05a-2
bash-src            2.05a-2
binutils            20011002-1
bison               1.28-1
bzip2               1.0.1-6
crypt               1.0-1
cvs                 1.11.0-1
cygwin              1.3.6-6
diff                0.0
expect              20010117-1
file                3.33-1
file-src            3.33-1
fileutils           4.1-1
fileutils-src       4.1-1
findutils           4.1
flex                2.5.4-1
gawk                3.0.4-1
gcc                 2.95.3-5
gdb                 20010428-3
gdbm                1.8.0-3
gettext             0.10.38-2
gettext-src         0.10.38-2
grep                2.4.2-1
groff               1.17.2-1
gzip                1.3.2-1
gzip-src            1.3.2-1
less                358-3
less-src            358-3
libncurses5         5.2-1
libncurses6         5.2-2
login               1.4-2
m4                  0.0
make                3.79.1-5
mktemp              1.4-1
ncurses             5.2-7
patch               2.5-2
perl                5.6.1-2
readline            4.2-3
regex               4.4-2
sed                 3.02-1
sed-src             3.02-1
sh-utils            2.0-2
tar                 1.13.19-1
tar-src             1.13.19-1
tcltk               20001125-1
tcltk-src           20001125-1
tcsh                6.10.00-3
tcsh-src            6.10.00-3
termcap             20010825-1
terminfo            5.2-1
textutils           2.0.16-1
unzip               5.41-1
w32api              1.2-1
which               1.5-1
zip                 2.3-1
zlib                1.1.3-6

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/