Discussion:
Entry point not found issues with cygwin DLLs
Heavenly Avenger
2018-07-02 19:08:06 UTC
Permalink
Hello!

First post in the list, I hope I am not mistaken in the place to post
the question, but let's give it a try.

I'm having hard times with cygwin here, random libraries stop working
once I update or install new ones.

Today I run 'rebaseall' and it detected a lot of completely missing DLLs
from packages. So I wrote a script to build up the list of packages that
contained the DLLs to use setup-x86_64 to reinstall them.

After reinstalling, 'rebaseall' ran without apparent issues. But still
ssh and perl are unusable.

If I run the ssh client, it simply returns to the command prompt. Perl
likewise. Passing any commandline parameters does not change it.

If I run ssh with 'strace' ('strace ssh'), it pops up a windows dialog
saying:

'the procedure entry point __memcpy_chk could not be located in the
dynamic link library c:\cygwin\bin\cygcrypto-1.0.0.dll'

I found this file is located in the 'openssl100-1.0.2o-1' package. The
file is present and has about 2.3MB in size. I've deleted the package's
tar from within my local cygwin packages cache and reinstalled. Still
the same.

With perl I get the same, but the complained file is called
c:\cygwin\bin\cygperl5_26.dll.

Maybe I should be looking for that __memcpy_chk from another DLL; it may
be missing and strace/cygwin informs a misleading DLL name?

I'm using Windows 10 1709 / 16299.248.
cygwin's dll is: cygwin1.dll file version: 2008.0.0.0, version: 2.8.0.

Thanks in advance to whoever has suggestions on how to tackle with this
issue, it's been plaguing me for months now.


--
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
Heavenly Avenger
2018-07-02 19:35:24 UTC
Permalink
Hi! Uh... I seem to have been able to solve the issue using
'cygcheck.exe -c' (found a suggestion on using it here:
https://stackoverflow.com/questions/42591821, so credits for them,
although it was just a mention he ran 'cygcheck.exe').

It parsed all packages that were missing files in the system, and I
reinstalled each package, and voila, all works.

Here's the list of the corrupted packages I had:

aria2                                 1.32.0-1 Incomplete
binutils 2.29-1                Incomplete
cygwin 2.10.0-1              Incomplete
cygwin-debuginfo 2.10.0-1              Incomplete
cygwin32 2.10.0-1              Incomplete
ghostscript 9.23-1                Incomplete
libgcrypt-devel 1.8.2-1               Incomplete
libgpg-error-devel 1.28-1                Incomplete
libmcrypt-doc 2.5.8-1               Incomplete
ruby-doc 2.3.6-1               Incomplete
ruby-json 2.0.4-1               Incomplete
ruby-rdoc 5.1.0-1               Incomplete
rubygems-doc 2.6.13-1              Incomplete
subversion-tools 1.10.0-2              Incomplete
urw-base35-fonts 20170801-5            Incomplete
vim-common 8.0.1567-1            Incomplete
whois 5.2.10-1              Incomplete

(yes, whois didn't work either, annoying but could live with that! the
-doc ones weren't quite a problem, but I wonder how they went missing
files!)

The most worrysome ones were: binutils, cygwin, cygwin32,
libgcrypt-devel, libgpg-error-devel

And I am especially suspicious of the main one being the
libgcrypt-devel, although the cygwin and cygwin32 ones being very likely
too.

Besides, now version info from cygwin1.dll reads 2010.0.0, 2.10.0. I
have no idea how that 2.8.0 survived there throught updates. :)

Sorry for the first message being a known and easy issue. I had
exhausted my searches when I delivered it .. just by luck I found that
cygcheck tip and it worked, as murphy's laws dictate (after I poked the
big guys I found myself I didn't really need to).

Anyway, I hope the experience and solution helps others around!


-------- Forwarded Message --------
Subject: Entry point not found issues with cygwin DLLs
Date: Mon, 2 Jul 2018 16:08:06 -0300
From: Heavenly Avenger <***@avenger.ws>
To: ***@cygwin.com



Hello!

First post in the list, I hope I am not mistaken in the place to post
the question, but let's give it a try.

I'm having hard times with cygwin here, random libraries stop working
once I update or install new ones.

Today I run 'rebaseall' and it detected a lot of completely missing DLLs
from packages. So I wrote a script to build up the list of packages that
contained the DLLs to use setup-x86_64 to reinstall them.

After reinstalling, 'rebaseall' ran without apparent issues. But still
ssh and perl are unusable.

If I run the ssh client, it simply returns to the command prompt. Perl
likewise. Passing any commandline parameters does not change it.

If I run ssh with 'strace' ('strace ssh'), it pops up a windows dialog
saying:

'the procedure entry point __memcpy_chk could not be located in the
dynamic link library c:\cygwin\bin\cygcrypto-1.0.0.dll'

I found this file is located in the 'openssl100-1.0.2o-1' package. The
file is present and has about 2.3MB in size. I've deleted the package's
tar from within my local cygwin packages cache and reinstalled. Still
the same.

With perl I get the same, but the complained file is called
c:\cygwin\bin\cygperl5_26.dll.

Maybe I should be looking for that __memcpy_chk from another DLL; it may
be missing and strace/cygwin informs a misleading DLL name?

I'm using Windows 10 1709 / 16299.248.
cygwin's dll is: cygwin1.dll file version: 2008.0.0.0, version: 2.8.0.

Thanks in advance to whoever has suggestions on how to tackle with this
issue, it's been plaguing me for months now.


--
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
Ken Brown
2018-07-02 19:35:47 UTC
Permalink
Post by Heavenly Avenger
I'm having hard times with cygwin here, random libraries stop working
once I update or install new ones.
This can happen if you update a package without updating its
dependencies. For example, the dependency might have introduced a new API.
Post by Heavenly Avenger
If I run ssh with 'strace' ('strace ssh'), it pops up a windows dialog
'the procedure entry point __memcpy_chk could not be located
It is in cygwin1.dll as of cygwin-2.10; see
https://cygwin.com/cygwin-ug-net/ov-new.html.
Post by Heavenly Avenger
cygwin's dll is: cygwin1.dll file version: 2008.0.0.0, version: 2.8.0.
You need to update the cygwin package. For best results, you should
update all of your installed packages to their current versions. (If
you're running setup with the --packages option to update or install
certain packages, then it's a good idea to also use the --upgrade-also
option.)

Ken

--
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
Brian Inglis
2018-07-02 20:02:22 UTC
Permalink
I'm having hard times with cygwin here, random libraries stop working once I
update or install new ones.
This can happen if you update a package without updating its dependencies.  For
example, the dependency might have introduced a new API.
'the procedure entry point __memcpy_chk could not be located
It is in cygwin1.dll as of cygwin-2.10; see
https://cygwin.com/cygwin-ug-net/ov-new.html.
cygwin's dll is: cygwin1.dll file version: 2008.0.0.0, version: 2.8.0.
You need to update the cygwin package.  For best results, you should update all
of your installed packages to their current versions.  (If you're running setup
with the --packages option to update or install certain packages, then it's a
good idea to also use the --upgrade-also option.)
Also ensure no processes using Cygwin are running, before starting a freshly
downloaded https://cygwin.com/setup-x86_64.exe, and wait until setup has
finished all processing and exited, before using any Cygwin programs:
otherwise autorebase and other postprocessing may not work properly.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
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
Brian Inglis
2018-07-03 05:03:55 UTC
Permalink
Post by Brian Inglis
I'm having hard times with cygwin here, random libraries stop working once I
update or install new ones.
This can happen if you update a package without updating its dependencies.  For
example, the dependency might have introduced a new API.
'the procedure entry point __memcpy_chk could not be located
It is in cygwin1.dll as of cygwin-2.10; see
https://cygwin.com/cygwin-ug-net/ov-new.html.
cygwin's dll is: cygwin1.dll file version: 2008.0.0.0, version: 2.8.0.
You need to update the cygwin package.  For best results, you should update all
of your installed packages to their current versions.  (If you're running setup
with the --packages option to update or install certain packages, then it's a
good idea to also use the --upgrade-also option.)
Also ensure no processes using Cygwin are running, before starting a freshly
downloaded https://cygwin.com/setup-x86_64.exe, and wait until setup has
otherwise autorebase and other postprocessing may not work properly.
Thanks! I'm almost 100% sure this was the cause, I remember the cygsetup getting
stuck during installation some times, but at the time no immediate issue was
noticed after installation.
For example, ssh client was working until this weekend when I upgraded it, and I
recently had rolled perl back in order to fix it -- which broke once again. :)
so the installation was tainted for some time already. :(
Hopefully with the "cygcheck overhaul" it will become stable.
Running cygcheck with appropriate options just points out the problems, that you
can then fix by doing reinstalls or upgrades with setup.

If anything appears to go wrong during setup, just be patient and let it finish.
If anything seems wrong while testing, just exit all Cygwin processes, and rerun
setup again.

On my last setup run to upgrade packages, I forgot I had a Windows task
scheduled, which runs a Cygwin script, that creates dozens of background Cygwin
processes, each of which runs dozens of Cygwin commands and other scripts. I
just let all processes in that task, and setup, finish; then immediately reran
setup, accepting all the defaults, and allowed that to complete, after which
Cygwin/X with a mintty terminal started normally.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

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