apachebench aborts with a strange error message - apache

I run a very simple php file on apache. Then I benchmark apache, using
ab -n 10000 -c 5 http://localhost/~me/hello.php?name=Niko
But I get this error message, depending on c (for c=1, things are fine):
apr_socket_connect(): Operation already in progress (37)
I'm using ApacheBench, Version 2.3 on OSX 10.5.7.
The very simple PHP file would be this one:
<h1>Hello <?=$_REQUEST['name']?></h1>

This might be connected with http://www.nabble.com/ab(1)-fix-(Operation-already-in-progress-(37))-td22821642.html.
This might be it. The post says:
fixed in trunk
Changes were significant, so I have no
plans to propose for backport to the
2.2.x branch in the short term. With some testing/everyday use in trunk on
various platforms, it may be
appropriate to backport later.
Well. That means I would have to wait for 2.3 or work straight with the trunk. I'm just doing hobby stuff, so: no thanks.

Related

Could not find List::Util

I'm trying to compile some raku code I saw on https://replit.com/languages/raku. The code is from Why is Raku reporting "two terms in a row" when I define a new operator?.
It begins like this:
unit module Format;
use List::Util;
...
It fails to compile with:
 raku ./main.raku
===SORRY!=== Error while compiling /home/runner/l4gp3hvdnhd/./main.raku
Could not find List::Util in:
inst#/home/runner/.raku
inst#/opt/rakudo-pkg/share/perl6/site
inst#/opt/rakudo-pkg/share/perl6/vendor
inst#/opt/rakudo-pkg/share/perl6/core
ap#
nqp#
perl5#
at /home/runner/l4gp3hvdnhd/./main.raku:3
exit status 1
On the other hand I see this is a valid module - https://raku.land/zef:lizmat/List::Util.
Why is it failing?
TL;DR Run zef install --/test List::Util in the console, put use lib '.'; at the top of your Raku main.raku, and run, don't walk, with your program, before gremlins gleefully render your efforts in vain. Or maybe just listen to Liz and Rawley.
As Liz and Rawley have noted, you need List::Util installed.
But while I largely agree with them in practice (it may be a pain to use replit to do what you're trying to do) I think a different response to complement theirs might be helpful.
One of the ways replit is trying to distinguish itself from other online evaluators, is that it is trying to be akin to a full dev environment.
In reality it's early days in their ambitious project, and beggars can't be choosers (if you're not paying, it's hard to complain if things don't work out as you might want), but of particular relevance for this SO it is worth noting that it does have console/shell facilities and they've installed Rakudo Star, or perhaps just something like it, including the Raku package manager pretty much everyone uses (zef).
Thus this command, which I just ran in replit's console of a new raku session, worked:
zef install --/test List::Util;
(The --/test tells zef not to run tests. I've only got a free account and it looked like replit killed zef's process when I ran just zef install List::Util during its running of tests. Presumably they take too long, but I don't know.)
And then this main.raku also worked:
use lib '.'; # Tell Raku(do) libs are in current directory.
use List::Util <notall>; # Load and import `notall` from module.
say notall { 42 }, 99; # Try it.
But now the rub. As I was composing this answer, the expected happened. My internet connection momentarily flaked out, the replit rebooted the session, and while my main.raku code was rescued, both List::Util and my console history had disappeared, so I had to paste the install command again and rerun it to get the module installed again.
It's all just throwaway container magic, and there's only so much replit has done thus far to make the simulation of a real full local dev environment really work.
Maybe if your Internet connection is rock solid and/or you're using a paid replit account and/or it's the full moon, it'll all work out. Or maybe you're best off following Rawley's advice.
Speaking of which (I mean Rawley's advice to set up your Raku dev environment locally), if you do install locally you can also install the awesome free version of CommaIDE.
You do not have List::Util installed. Since you're using an online interpreter you will most likely have a lot of trouble doing this. Instead I recommend installing Raku on your local machine with rakubrew.
Then run the following commands:
rakubrew build # Make sure to follow the instructions at the end
rakubrew build-zef
zef install List::Util
Now you should be able to run your code on your local machine, and you'll have access to the List::Util library.

What is diff in apache svn version 6.0.38 vs 6.0.389418

I want to collect some buggy files.
So, I found data-set that present which file has a bug.
In data set, document said that Tomcat,6.0.389418,org.apache.jasper.compiler.Compiler file has a bug
In order to get bug file, i visit apache svn repository. And I found archive tomcat version 6_0_38 (http://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38)
But I cant get file more detail version (6.0.389418) there is only 6_0_38
Can I think of two versions as the same?
Thank you.
Most importantly, you should know that Tomcat 6 has seen its end of life in December 2016, and the latest version that I can find in the archives is 6.0.53.
Based on this alone: Upgrade! First to the latest version in the 6.0 branch, then to a version that actually will continue to get security fixes. I've never seen any problems when upgrading within the same major version - the tomcat developers do a great job keeping their upgrades compatible.
And last, to the letters of your question instead of the spirit: The third digit of Tomcat version numbers is counting up, one by one. There is no 6.0.389418. As Tomcat uses Subversion, and subversion counts up the commits one by one, you might be lucky to find something around commit #389418 or #9418. Note: I've not even looked at their SVN to check if these are legitimate commits in the time that you're referring to (not even what the current commit is).
Eh, it might be quite hard to really nail this build number, but there is also a good chance this is a build you are asking for. Read for explanation.
You are asking for version: 6.0.389418
If you look into this file:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/dist.xml
You can learn how build number is being built:
<property name="version.number" value="${version.major}.${version.minor}.${version.build}.${version.patch}"/>
values are taken from:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/build.properties.default
# ----- Version Control Flags -----
version.major=6
version.minor=0
version.build=38
version.patch=0
version.suffix=
So the missing part of your version is 9418 which is should correspond to ${version.build} or (more unlikely) to ${version.patch}
In either case it might be not unambiguous, because often there is a build script used which performs multiple actions and as a result, appends its own version at the end of real package. I'd lean towards this explanation, because if this were to be a patch number, there would be some /patches directory in SVN, which I don't see in any other directories for more recent development.
But then, there is:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/bin/version.sh -> running function from:
https://svn.apache.org/repos/asf/tomcat/archive/tc6.0.x/tags/TOMCAT_6_0_38/bin/catalina.sh
elif [ "$1" = "version" ] ; then
"$_RUNJAVA" \
-classpath "$CATALINA_HOME/lib/catalina.jar" \
org.apache.catalina.util.ServerInfo
else
Try to download it and run ./bin/version.sh

Unable to install Selenium::WebDriver in perl6

I'm doing this:
zef install Selenium::WebDriver
And I'm getting it stuck at:
===> Searching for: Selenium::WebDriver
===> Testing: Selenium::WebDriver:ver('0.0.1')
Cannot obtain a session after 10 attempts
in submethod BUILD at /home/user123/.zef/store/perl6-selenium-webdriver.git/5e3ff320d2f392e44df1433f0544201c154f2590/lib/Selenium/WebDriver/Wire.pm6 (Selenium::WebDriver::Wire) line 66
in block <unit> at t/05-firefox.t line 45
# Looks like you planned 91 tests, but ran 1
JavaScript error: , line 0: NS_ERROR_FILE_NOT_FOUND: Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIAppStartup.trackStartupCrashEnd]
My OS -- arch linux -- is up to date.
Summary
Like all Perl 5 or Perl 6 packages, the Selenium::WebDriver package includes a suite of tests that check that it appears to work properly on your system.1 This test suite gets run at the end of installation, i.e. the installer downloads the package, runs its builder code and only then runs its test suite. If there's an error, then (by default2) the installer displays error information and exits immediately. That's what it's done in your case.
The current Selenium::WebDriver package was successfully installing 2 months ago complete with the message showing success on an Ubuntu for the same test that is a fail on your system. Then again, a search of the #perl6 logs for 'selenium' suggests that there may be an intermittent error with one of the modules that Selenium::WebDriver uses; this may indeed be the root of the problem.
The README of the repo for Selenium::WebDriver begins with a link to a document that says the protocol it describes is "obsolete". The most recent item in the issue queue of the Selenium::WebDriver repo is titled "Add support for Firefox Marionette WebDriver". Please consider adding a comment to that issue pointing to this SO question if you think it's relevant.
If you look at the error messages you'll see a Firefox test failed. One possibility is that there's an error in Firefox, or some related software, beyond official latest arch linux.
Some plausibly simple responses to the Firefox error message:
Try manually loading Firefox before trying to install the Perl 6 package. Does that fix the problem?
I don't know what options you have for making the Selenium::WebDriver package not see your Firefox other than completely uninstalling it, but maybe you can do that? Then try installing again (and the package will presumably then test/use, say, Chrome instead of Firefox).
If that doesn't work, consider posting a new Selenium::WebDriver repo issue (and link to this SO question).
The top level error message is "Cannot obtain a session after 10 attempts". It's generated by line 66 of the package's lib/Selenium/WebDriver/Wire.pm6 file. I don't think that line helps much in this case but imo it's always worth taking at least a quick glance at the source code corresponding to error messages.
Looking at the next level down we see the error comes from "t/05-firefox.t line 45" which is my $driver = Selenium::WebDriver::Firefox.new;. It looks like it's trying to connect to Firefox and failing. Looking further up in that test script one can see that it thinks it found Firefox on your system (because the code block in unless which('firefox') { ... } clearly didn't trigger).
The deepest part of the error information shows that a "Javascript error" has been encountered, something to do with nsIAppStartup.trackStartupCrashEnd.
Often a problem is specific to the versions of software involved. The Selenium::WebDriver package version is clearly 0.0.1 but it would be nice to see the version info from the other main pieces involved including your Perl 6 compiler (perl 6 -V iirc), the installer (zef -V iirc), and your OS and Firefox. In this particular case I'm pretty sure the problem is not in your Perl 6 compiler (Rakudo) nor in the installer (zef) but I might be wrong and I still recommend you always consider including generous version info when you post your first version of a question.
1 The test suite for the Selenium::WebDriver package work as per Perl 6 testing guidelines in general and per the Testing section of the Selenium::WebDriver's repo README in particular.
2 You can usually force Perl installers to continue regardless if you know an error doesn't matter in your case. I think it's -force-test to force zef to continue testing rather than stop after the first error and -force-install to complete the install despite errors.

poclbm not reporting hashes to deepbit or slush

I run poclbm on my system but for some reason both deepbit and slush don't "see" the work being performed. My system reports about 200 megabashes per second being done. I tried mining with my cpu using the same settings, and then both deepbit and slush recognized that work was being performed.
These are the errors I am getting out of the respective mining hardware (every minute or so):
poclbm error: pit.deepbit.net:8332 22/02/2013 21:50:59, Verification failed, check hardware! (0:0:Cypress, d47b7ba0)
cgminer error: [2013-02-22 22:18:51] GPU0: invalid nonce - HW error
I am using Ubuntu 12.10 (Quantal Quetzal) with the 12.10 version poclbm with an ATI 5800 series video card. The video drivers are installed and work as far as I can tell. When I run a "aticonfig --odgc --adapter=all", the gpu does seem to be utilized with poclbm (around 70% utilization or so).
I found the solution through an irc channel (Freenode on channcel #cgminer). Basically, at least on the version of Ubuntu that I have (12.10), the 2.8 version of the SDK does NOT work properly with cgminer or poclbm. I was instructed to download the 2.4 version of the SDK. Here:
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx32.tgz
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.4-lnx64.tgz
Some distributions require the "2.7" version so I'll put the links here:
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.7-lnx32.tgz
http://developer.amd.com/Downloads/AMD-APP-SDK-v2.7-lnx64.tgz
I compiled it. There is no "make install" for this Makefile, apparently, so you have to manually copy the files to your lib directory:
for 32 bit: $ cp -pv lib/x86/* /usr/lib/
for 64 bit: $ cp -pv lib/x86_64/* /usr/lib/
Also copy the include files: $ rsync -avl include/CL/ /usr/include/CL/
With the libraries installed in the appropriate directories, I recompiled cgminer and then it worked. I also tried it with poclbm and it worked with that too.
Hm, I experienced the same error with pclbm and cgminer. Then I found https://bitcointalk.org/index.php?topic=139406.msg1502120#msg1502120 .. I tried phoenix and all is ok now. Hope it helps. Sry my bad english.

Using bitbake to build a custom gumstix kernel

I've a gumstix Overo which I am configuring to work with a e-CAM camera. The documentation provided by camera manufacture asks me to patch a 2.6.34 kernel and compile in Video For Linux support. When I look at gumstix user documentation they say I should execute:
bitbake -c menuconfig virtual/linux
However when I run this command I get
bacon:~/proj/overo-oe$ bitbake -c menuconfig virtual/linux
NOTE: Handling BitBake files: \ (7100/7100) [100 %]
NOTE: Parsing finished. 6382 cached, 413 parsed, 305 skipped, 2 masked.
ERROR: Nothing PROVIDES 'virtual/linux'
I'm not altogether sure about how I provide virtual/linux. Any ideas about how to fix this error?
This might be a case of out-of-date documentation. In any case, my current work around is to name the kernel explicitly: bitbake -c menuconfig linux-omap3-2.6.34
I can help with a step-by-step procedure to bitbake 3.0 kernel.
If that may be helpful for you. Using a WMware Ubuntu ...
I would stay away from convoluted build systems as bitbake. Every one seems to be inventing one... making the 'tool' to get more of your time then the thing you want to do with the tool. All of them are the same. Linus would quote on those guys:
Just don't do it...!