logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: 2.4.20 no OPENSSL_Applink error
Author
Steady



Joined: 11 May 2016
Posts: 2
Location: USA, PHL

PostPosted: Wed 11 May '16 21:04    Post subject: 2.4.20 no OPENSSL_Applink error Reply with quote

Hi,

I haven't used abs in some time but trying to use it in the 2.4.20 release I get

OPENSSL_Uplink(000007FEDF828000,08): no OPENSSL_Applink

Does anyone else experience this error? I do have httpd running without any issues using mod_ssl.

Thanks
Ed
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Thu 12 May '16 11:25    Post subject: Reply with quote

yep same error here. Never tested with the latest OpenSSL versions. Known error with OpenSSL, see https://www.openssl.org/docs/faq.html#PROG2



Please try:

Download removed, new abs.exe with Applink is now in 2.4.23+


Thanks for letting us know !
Back to top
Steady



Joined: 11 May 2016
Posts: 2
Location: USA, PHL

PostPosted: Thu 12 May '16 16:02    Post subject: Reply with quote

Hi Steffen,

Confirming it works as expected, thanks for that quick fix!

Ed
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 12 May '16 18:30    Post subject: Reply with quote

Off forum I was told that AH builds suffer the same fate but I cannot duplicate.

Code:
c:\Apache24ah-2\bin>abs.exe -n 250 -c 15 -i https://localhost/:443
This is ApacheBench, Version 2.3 <$Revision: 1706008 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Finished 250 requests


So, how do I duplicate this to get the Applink error?

I have no problem adding the shim if needed but I have yet to see a need since mod_ssl never fails for me (or any of our users as far as I know).

EDIT: Or is this it?
Code:
Benchmarking www.apachehaus.net (be patient)
Completed 100 requests
SSL read failed (5) - closing connection
apr_pollset_add(): Not enough space (12)
Total of 184 requests completed
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 13 May '16 15:55    Post subject: Reply with quote

I was using a VC9 build when I tested it first. I am surprised it works without Applink yet VC14 builds do not.

I also found that if built with LibreSSL it is also not needed even in VC14.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Sat 14 May '16 12:23    Post subject: Reply with quote

openssl/applink.c is only required for VC14. The PHP guys ran into the issue when compiling PHP 7.0.0 Beta 1 switched to using VC14.

Their original patch is here:
http://git.php.net/?p=php-src.git;a=commitdiff;h=3d7343f609b81ebac95d94480a2615df530806e7

For abs.exe you could use something like this inside the #if defined(HAVE_OPENSSL) block of support/ab.c:

Code:
# if defined(_MSC_VER) && _MSC_VER >= 1900
#  include <openssl/applink.c>
# endif


@Steffen: would it be an idea to make sure this patch gets included in the Apache httpd sources?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 24 May '16 20:52    Post subject: Reply with quote

Jan open a bug at https://bz.apache.org/bugzilla/ with a unified diff file attached.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 25 May '16 3:15    Post subject: Reply with quote

https://bz.apache.org/bugzilla/show_bug.cgi?id=59630

I had the usual troubles with Windows line-endings. My SlikSVN added \r's. I switched to cygwin's svn.

If this one is merged, I have got another one for ApacheMonitor. See http://mail-archives.apache.org/mod_mbox/httpd-dev/201505.mbox/%3CD52AAC5911334A719DB2FAAF2D1C1C7C@father%3E
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 25 May '16 4:59    Post subject: Reply with quote

Can I see the patch?
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 25 May '16 6:13    Post subject: Reply with quote

YM the patch for ApacheMonitor? Sure. I tested this even yesterday, while compiling httpd with mod_h2 v1.5.6 in all the 6 variants.

Code:
Index: support/win32/ApacheMonitor.c
===================================================================
--- support/win32/ApacheMonitor.c   (revision 1745423)
+++ support/win32/ApacheMonitor.c   (working copy)
@@ -1586,7 +1586,9 @@
 #ifdef UNICODE
     __wargv = CommandLineToArgvW(GetCommandLineW(), &__argc);
 #else
+ #if defined(_MSC_VER) && _MSC_VER < 1900
     _setargv();
+ #endif
 #endif
 
     if ((__argc == 2) && (_tcscmp(__targv[1], _T("--kill")) == 0))

The patch for fixing the Applink error is here:
https://bz.apache.org/bugzilla/attachment.cgi?id=33886&action=diff
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 25 May '16 10:02    Post subject: Reply with quote

Jan_E, your proposed patch with abs is:

+#if defined(_MSC_VER) && _MSC_VER >= 1900
+#include <openssl/applink.c>
+#endif
+

So applink is included also for ab.exe and when you do not use OpenSSL (like LibreSSL)

So better to add condition:

#if defined(HAVE_OPENSSL)
#include <openssl/applink.c>
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 25 May '16 10:15    Post subject: Reply with quote

@Steffen: the added lines are already inside a block with

#if defined(HAVE_OPENSSL)

That block starts at line 159 and ends just after the addition.
Back to top
Steffen
Moderator


Joined: 15 Oct 2005
Posts: 3092
Location: Hilversum, NL, EU

PostPosted: Wed 25 May '16 10:34    Post subject: Reply with quote

I see now.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Wed 25 May '16 18:45    Post subject: Reply with quote

RE: Your apachemonitor patch, it needs to exclude from VC12 (_MSC_VER < 1800) as well Very Happy

Also, I would like to retain VC6 compat as long as possible, IIRC it has troubles when the # is not the first character of a line but I deal with that if needed next time I build VC6. Anyhow, Apachemonitor is "non-unix, single platform" code and qualifies as CTR in 2.4.

This has been on my TODO list for awhile now, thanks for the push.
Commit to trunk: r1745516
Commit to 2.4: r1745517

I tried every possible way to get the setargv.obj included an no go until I created a static lib from it, then it gladly linked it all. If there's a way to figure out what the location of anyone's VC we could do this during a prebuild step but so far I haven't found a good way to find VC's LIB folder. I have an idea, just haven't tried it yet.
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 25 May '16 20:58    Post subject: Reply with quote

@Gregg: could you commit the on-topic patch as well? The one in https://bz.apache.org/bugzilla/show_bug.cgi?id=59630

W.r.t setargv.obj: I just did a dir *.obj in VC14's lib dir. 24 files, some with intriguing names like notelemetry.obj.
There must be a simple way to link those files. A creative use of %lib% or something like that.

Code:
C:\php-sdk\php70dev>echo %lib%
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64; \
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64; \
C:\Program Files (x86)\Windows Kits\10\lib\10.0.10240.0\ucrt\x64; \
C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64; \
C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Thu 26 May '16 0:31    Post subject: Reply with quote

RE: Apachemonitor
I think I figured it out. After all I have a pre-build script I use to "do stuff" and it figures out what version of VC I am on and I can use that as a starting point. The Environment is your friend and looking at it again it's even friendlier.

RE: Applink
What about httpd.exe or mod_ssl, whichever? Then again it seems not to need it.

I would actually prefer to add it to the build than make that change to any .c file. I tried this method recently and it worked fine. This can also be targeted to abs.exe only, which is all that needs it.
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Fri 27 May '16 18:09    Post subject: Reply with quote

I think the problem was I should not have been thinking that day I came up with adding it to the build, then all VC version would get it. Rolling Eyes @ myself.

Commited to trunk: r1745767
Proposed for 2.4: r1745768
Back to top
glsmith
Moderator


Joined: 16 Oct 2007
Posts: 2268
Location: Sun Diego, USA

PostPosted: Tue 14 Jun '16 21:29    Post subject: Reply with quote

Committed to 2.4 r1748449
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1266
Location: Amsterdam, NL, EU

PostPosted: Wed 15 Jun '16 21:45    Post subject: Reply with quote

But the discussion continues, I see.
Back to top


Reply to topic   Topic: 2.4.20 no OPENSSL_Applink error View previous topic :: View next topic
Post new topic   Forum Index -> Apache