t5539 fails on ubuntu for v2.0.0-rc2
Hi,
I am getting this in Ubuntu, something wrong with my env? Thanks
root@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository # # git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # git clone $HTTPD_URL/smart/repo.git clone && # ( # cd clone && # git fsck && # git log --format=%s origin/master >actual && # cat <<EOF >expect && # 7 # 6 # 5 # 4 # 3 # EOF # test_cmp expect actual # ) # not ok 3 - no shallow lines after receiving ACK ready # # ( # cd shallow && # for i in $(test_seq 15) # do # git checkout --orphan unrelated$i && # test_commit unrelated$i && # git push -q "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ # refs/heads/unrelated$i:refs/heads/unrelated$i && # git push -q ../clone/.git \ # refs/heads/unrelated$i:refs/heads/unrelated$i || # exit 1 # done && # git checkout master && # test_commit new && # git push "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" master # ) && # ( # cd clone && # git checkout --orphan newnew && # test_commit new-too && # GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch --depth=2 && # grep "fetch-pack< ACK .* ready" ../trace && # ! grep "fetch-pack> done" ../trace # ) # httpd (pid 10653?) not running # failed 2 among 3 test(s) 1..3
Signature · 13 lines
Fabio D'Alfonso 'Enabling Business Through IT' cell. +39.348.059.40.22 *** web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/> email: [email protected] <mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso> twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso> fax: +39.06.874.599.581 BlackBerry® Wireless Enabled Address. ** Hidden numbers are automatically rejected by the phone*
Quoted 16 lines · Fabio D'Alfonso
Hi,
I am getting this in Ubuntu, something wrong with my env? Thanksroot@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository # # git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # git clone $HTTPD_URL/smart/repo.git clone && # ( # cd clone && # git fsck && # git log --format=%s origin/master >actual && # cat <<EOF >expect &&
Quoted 8 lines
# 7 # 6 # 5 # 4 # 3 # EOF # test_cmp expect actual # )
Does not reproduce for me but I am on Ubuntu 12.04.2 LTS, so...
Running it with the -v option might give you more hints, and running it as
$ sh -x ./t5539-fe* -v
might give you more to chew.
I do not think it is wise to run tests as root, though ;-)
Quoted 32 lines
#
not ok 3 - no shallow lines after receiving ACK ready #
# (# cd shallow && # for i in $(test_seq 15) # do # git checkout --orphan unrelated$i && # test_commit unrelated$i && # git push -q "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \# refs/heads/unrelated$i:refs/heads/unrelated$i &&
# git push -q ../clone/.git \
# refs/heads/unrelated$i:refs/heads/unrelated$i ||
# exit 1# done && # git checkout master && # test_commit new && # git push "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" master # ) && # ( # cd clone && # git checkout --orphan newnew && # test_commit new-too && # GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch--depth=2 &&
# grep "fetch-pack< ACK .* ready" ../trace &&
# ! grep "fetch-pack> done" ../trace
# )
#
httpd (pid 10653?) not running# failed 2 among 3 test(s) 1..3
Quoted 8 lines · Junio C Hamano
Quoted 3 lines · Fabio D'Alfonso
root@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository[...]
Does not reproduce for me but I am on Ubuntu 12.04.2 LTS, so...
Nor me on Debian unstable.
Quoted 6 lines
Running it with the -v option might give you more hints, and running it as
$ sh -x ./t5539-fe* -vmight give you more to chew.
Yes, definitely that, but also, from:
Quoted 2 lines
Quoted 2 lines
httpd (pid 10653?) not running
# failed 2 among 3 test(s)
...it looks like the httpd server did not start. Look in httpd/error.log of "trash directory.t5539-fetch-http-shallow" to see the apache log. It may give some reason for failing to start.
-Peff
Hi,
this is the error in httpd error.log
[Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [notice] Apache/2.2.17 (Ubuntu) configured -- resuming normal operations [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:11 2014] [alert] Child 12037 returned a Fatal
error... Apache is exiting!
The 1.9.x versions compiled and tested here, before. It is a natty dektop 11.04.
Thanks
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>
fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.
** Hidden numbers are automatically rejected by the phone*
Quoted 31 lines · Jeff King
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Fabio D'Alfonso
root@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository[...]
Does not reproduce for me but I am on Ubuntu 12.04.2 LTS, so...Nor me on Debian unstable.
Quoted 6 lines
Running it with the -v option might give you more hints, and running it as
$ sh -x ./t5539-fe* -vmight give you more to chew.
Yes, definitely that, but also, from:
Quoted 2 lines
Quoted 2 lines
httpd (pid 10653?) not running
# failed 2 among 3 test(s)...it looks like the httpd server did not start. Look in httpd/error.log of "trash directory.t5539-fetch-http-shallow" to see the apache log. It may give some reason for failing to start.
-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
The message seems common around the apache issues but the previous test t5538 that uses start and stop routines works.
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>
fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.
** Hidden numbers are automatically rejected by the phone*
Quoted 75 lines · Fabio D'Alfonso
Hi,
this is the error in httpd error.log[Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [notice] Apache/2.2.17 (Ubuntu) configured -- resuming normal operations [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:11 2014] [alert] Child 12037 returned a Fatalerror... Apache is exiting!
The 1.9.x versions compiled and tested here, before. It is a natty dektop 11.04.
Thanks
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.** Hidden numbers are automatically rejected by the phone*
Quoted 31 lines · Jeff King
Quoted 7 lines · Junio C Hamano
Quoted 3 lines · Fabio D'Alfonso
root@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository[...]
Does not reproduce for me but I am on Ubuntu 12.04.2 LTS, so...Nor me on Debian unstable.
Quoted 6 lines
Running it with the -v option might give you more hints, and running it as
$ sh -x ./t5539-fe* -vmight give you more to chew.
Yes, definitely that, but also, from:
Quoted 2 lines
Quoted 2 lines
httpd (pid 10653?) not running
# failed 2 among 3 test(s)...it looks like the httpd server did not start. Look in httpd/error.log of "trash directory.t5539-fetch-http-shallow" to see the apache log. It may give some reason for failing to start.
-Peff
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.htmlSignature · 3 lines
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: t5539 fails on ubuntu for v2.0.0-rc2 - the SAME on 12.04 server
In reply to Fabio D'AlfonsoHi,
strange that no one gets the error. I get also on another server 12.04.4 LTS so the problem is not on a single VM or version.
No idea?
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>
fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.
** Hidden numbers are automatically rejected by the phone*
Quoted 56 lines · Fabio D'Alfonso
Hi,
I am getting this in Ubuntu, something wrong with my env? Thanksroot@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository # # git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # git clone $HTTPD_URL/smart/repo.git clone && # ( # cd clone && # git fsck && # git log --format=%s origin/master >actual && # cat <<EOF >expect && # 7 # 6 # 5 # 4 # 3 # EOF # test_cmp expect actual # ) # not ok 3 - no shallow lines after receiving ACK ready # # ( # cd shallow && # for i in $(test_seq 15) # do # git checkout --orphan unrelated$i && # test_commit unrelated$i && # git push -q "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ # refs/heads/unrelated$i:refs/heads/unrelated$i && # git push -q ../clone/.git \ # refs/heads/unrelated$i:refs/heads/unrelated$i || # exit 1 # done && # git checkout master && # test_commit new && # git push "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" master # ) && # ( # cd clone && # git checkout --orphan newnew && # test_commit new-too && # GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch --depth=2 && # grep "fetch-pack< ACK .* ready" ../trace && # ! grep "fetch-pack> done" ../trace # ) # httpd (pid 10653?) not running # failed 2 among 3 test(s) 1..3
Re: t5539 fails on ubuntu for v2.0.0-rc2 - the SAME on 12.04 server - this test was disabled up to 1.9.2
Hi,
this test was disabled up to 1.9.2 so it did not fail as it did not run by default.
I have set the variable to run and got an error also in previous version, while never had problem in use.
So I simply go on as there will no worst than before.
It seems that no one is interested to this issue. Probably I misunderstood the purpose of the list.
Regards
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>
fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.
** Hidden numbers are automatically rejected by the phone*
Quoted 82 lines · Fabio D'Alfonso
Hi,
strange that no one gets the error. I get also on another server 12.04.4 LTS so the problem is not on a single VM or version.No idea?
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.** Hidden numbers are automatically rejected by the phone*
Quoted 56 lines · Fabio D'Alfonso
Hi,
I am getting this in Ubuntu, something wrong with my env? Thanksroot@HDUBVM01:~/builds/git/t# ./t5539-fetch-http-shallow.sh ok 1 - setup shallow clone not ok 2 - clone http repository # # git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # git clone $HTTPD_URL/smart/repo.git clone && # ( # cd clone && # git fsck && # git log --format=%s origin/master >actual && # cat <<EOF >expect && # 7 # 6 # 5 # 4 # 3 # EOF # test_cmp expect actual # ) # not ok 3 - no shallow lines after receiving ACK ready # # ( # cd shallow && # for i in $(test_seq 15) # do # git checkout --orphan unrelated$i && # test_commit unrelated$i && # git push -q "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \ # refs/heads/unrelated$i:refs/heads/unrelated$i && # git push -q ../clone/.git \ # refs/heads/unrelated$i:refs/heads/unrelated$i || # exit 1 # done && # git checkout master && # test_commit new && # git push "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" master # ) && # ( # cd clone && # git checkout --orphan newnew && # test_commit new-too && # GIT_TRACE_PACKET="$TRASH_DIRECTORY/trace" git fetch --depth=2 && # grep "fetch-pack< ACK .* ready" ../trace && # ! grep "fetch-pack> done" ../trace # ) # httpd (pid 10653?) not running # failed 2 among 3 test(s) 1..3Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Fabio D'Alfonso
this is the error in httpd error.log
[Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [notice] Apache/2.2.17 (Ubuntu) configured -- resuming normal operations [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:11 2014] [alert] Child 12037 returned a Fatal error...
Quoted 1 line
Apache is exiting!
Hmm. Some googling turned up a similar case:
http://www.linuxquestions.org/questions/linux-server-73/apache-won%27t-start-because-490312/
It looks like apache is trying to getpwuid (probably as part of doing a setuid on its children), failing, and then crashing. I suspect that this is related to you running as root, as a non-root apache would not want to (nor be able to) call setuid.
Does running the tests as a non-root user fix it? If so, I think we have a few options in git:
1. Add a User directive to our httpd.conf. I doubt this is a good idea to do unconditionally, as a non-root apache would probably be unhappy with it.
2. Add a User directive when we detect that the tests are running as root. This might work, but I'm a bit iffy, as we do not know the appropriate username for the system (e.g., "nobody" versus "www-data" versus something else).
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
-Peff
Hi,
yes, the problem comes from root. I made a make test using "git" user in my 12.04 server where there is a gitlab and the test went on for 5539. I think the 3 could be the better solution.
This is not the place to discuss about the sudo mania, a disease I did not get and hope not to get, but let me share just a short think. Oracle, by product was never made possible to install as a root on linux/unix , while OEL allow the login to made any system / maintenance activity. Such a kind of protection , 'product configuration based' protection, targeted to the needs of the specific usage , always made sense: smoothly configure the system , then stay in the bound of the product.
Why I should manage a possibly try and trash personal desktop (or a 3 backups VM) as the NSA server is a mistery I do not want to solve. So this seems a way to give a box to a dumb, to prevent the breakage. Last but not least, desktop involve shortcuts and other things, that fly to the root when something is set up by sudo, and I used to put software in /opt for out of the tree stuff (e.g. netbeans or smartgit) , and should have to fight with myself to access my setups. The server setup I made for gitlab has quite sense with its user for the same reason the oracle pretends and in both cases it is a server , you get access to your service not being aware of the mechanics of the backend.
In a personal desktop, where confort is the premiere need, all this seems quite stupid to be forced, also any one could use if he wants.
Sorry for the digression, but it is starting to hurt, generally speaking.
Fabio D'Alfonso
'Enabling Business Through IT'
cell. +39.348.059.40.22 ***
web: www.fabiodalfonso.com <http://www.fabiodalfonso.com/>
email: [email protected]
<mailto:[email protected]>linkedin: www.linkedin.com/in/fabiodalfonso <http://it.linkedin.com/in/fabiodalfonso>
twitter: www.twitter.com/#!/fabio_dalfonso <http://www.twitter.com/#%21/fabio_dalfonso>
fax: +39.06.874.599.581
BlackBerry® Wireless Enabled Address.
** Hidden numbers are automatically rejected by the phone*
Quoted 49 lines · Jeff King
Quoted 15 lines · Fabio D'Alfonso
this is the error in httpd error.log
[Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [notice] Apache/2.2.17 (Ubuntu) configured -- resuming normal operations [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:10 2014] [alert] getpwuid: couldn't determine user name from uid 4294967295, you probably need to modify the User directive [Wed May 07 20:44:11 2014] [alert] Child 12037 returned a Fatal error...Quoted 1 line
Apache is exiting!
Hmm. Some googling turned up a similar case:
http://www.linuxquestions.org/questions/linux-server-73/apache-won%27t-start-because-490312/It looks like apache is trying to getpwuid (probably as part of doing a setuid on its children), failing, and then crashing. I suspect that this is related to you running as root, as a non-root apache would not want to (nor be able to) call setuid.
Does running the tests as a non-root user fix it? If so, I think we have a few options in git:
1. Add a User directive to our httpd.conf. I doubt this is a good idea to do unconditionally, as a non-root apache would probably be unhappy with it.
2. Add a User directive when we detect that the tests are running as root. This might work, but I'm a bit iffy, as we do not know the appropriate username for the system (e.g., "nobody" versus "www-data" versus something else).
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 12 lines · Jeff King
Does running the tests as a non-root user fix it? If so, I think we have a few options in git:
1. Add a User directive to our httpd.conf. I doubt this is a good idea to do unconditionally, as a non-root apache would probably be unhappy with it.
2. Add a User directive when we detect that the tests are running as root. This might work, but I'm a bit iffy, as we do not know the appropriate username for the system (e.g., "nobody" versus "www-data" versus something else).
Quoted 4 lines
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
I agree with both the conclusion and the precondition.
Re: t5539 fails on ubuntu for v2.0.0-rc2 - the SAME on 12.04 server - this test was disabled up to 1.9.2
In reply to Fabio D'AlfonsoQuoted 2 lines · Fabio D'Alfonso
this test was disabled up to 1.9.2 so it did not fail as it did not run by default.
Yes, in v1.9.2 we turned on http tests to run by default, but only if we could succeed in setting up the http server automatically (and if we can't, we skip the tests). Unfortunately your case seems to set up the http server fine, but then it dies. It's odd that it's only on this one test, though.
You can manually disable them by setting GIT_TEST_HTTPD=false in your config.mak file. If this sort of spurious failure is common, we may have to consider switching the default back to "false" from "auto".
Quoted 2 lines
It seems that no one is interested to this issue. Probably I misunderstood the purpose of the list.
This is the right place. But your problem is confusing and hard, so it may take time for people to look into it and respond. :)
-Peff
Quoted 6 lines · Junio C Hamano
Quoted 4 lines
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
I agree with both the conclusion and the precondition.
Here's the patch.
The problem starts in v1.9.2, not in v2.0.0, so it's not technically a regression in this cycle. And we are awfully late in the -rc period. But it is just a change in the test script, and one that seems rather unlikely to produce unexpected side effects. I'll leave it you whether you want to queue it for v2.0.0, or for the next maint release.
-- >8 --
Subject: t/lib-httpd: require SANITY prereq
Our test httpd setup will not generally run as root, because Apache will want to setuid, and we do not set up the "User" config directive. On some systems, like current Debian unstable, Apache fails to start, and we skip the tests:
$ sudo ./t5539-fetch-http-shallow.sh --debug
1..0 # SKIP web server setup failed
$ cat trash*t5539*/httpd/error.log
[...]
(22)Invalid argument: AH00024: Couldn't set permissions on
the rewrite-map mutex; check User and Group directives
AH00016: Configuration FailedHowever, on other systems (reportedly Ubuntu 11.04), Apache seems to start, and then bails during our tests with:
getpwuid: couldn't determine user name from uid 4294967295,
you probably need to modify the User directive
Child 12037 returned a Fatal error... Apache is exiting!
This may be related to the pre-fork/threading model in use (note that the second one complains of the child dying). However, it's not even worth investigating; in either case we just want to skip the tests, and we already recommend against running the test suite as root. Let's just explicitly check this condition and skip the tests rather than expecting Apache to do the right thing.
--- t/lib-httpd.sh | 5 +++++ 1 file changed, 5 insertions(+)
t/lib-httpd.sh +5 -0
@@ -37,6 +37,11 @@ then test_done fi +if ! test_have_prereq SANITY; then + test_skip_or_die $GIT_TEST_HTTPD \ + "Cannot run httpd tests as root" +fi + HTTPD_PARA="" for DEFAULT_HTTPD_PATH in '/usr/sbin/httpd' '/usr/sbin/apache2'
Signature · 1 line
2.0.0.rc1.436.g03cb729
Quoted 9 lines · Jeff King
Quoted 6 lines · Junio C Hamano
Quoted 4 lines
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
I agree with both the conclusion and the precondition.
Quoted 7 lines
Here's the patch.
The problem starts in v1.9.2, not in v2.0.0, so it's not technically a regression in this cycle. And we are awfully late in the -rc period. But it is just a change in the test script, and one that seems rather unlikely to produce unexpected side effects. I'll leave it you whether you want to queue it for v2.0.0, or for the next maint release.
Hrm, sorry, I was wrong about this. I had thought the auto-network-testing had gone into v1.9.2, but it didn't. So this _is_ a potential regression in v2.0.0. It's still relatively minor, affecting only the test suite, so it can probably wait for post-v2.0.0 if you don't want to do another -rc.
-Peff
Quoted 19 lines · Jeff King
Quoted 9 lines · Jeff King
Quoted 6 lines · Junio C Hamano
Quoted 4 lines
3. Just disable the http tests when run as root.
I think I'd favor 3. But I'd like to be sure that being root is the problem.
I agree with both the conclusion and the precondition.
Quoted 7 lines
Here's the patch.
The problem starts in v1.9.2, not in v2.0.0, so it's not technically a regression in this cycle. And we are awfully late in the -rc period. But it is just a change in the test script, and one that seems rather unlikely to produce unexpected side effects. I'll leave it you whether you want to queue it for v2.0.0, or for the next maint release.
Quoted 5 lines
Hrm, sorry, I was wrong about this. I had thought the auto-network-testing had gone into v1.9.2, but it didn't. So this _is_ a potential regression in v2.0.0. It's still relatively minor, affecting only the test suite, so it can probably wait for post-v2.0.0 if you don't want to do another -rc.
A bit more disturbing is that I did not get the impression that we know the exact reason why these http tests, especially the getwpuid call, fail for Fabio when run as root. And if my impression is correct, then "do not run tests as root" applied as a "solution" to the failure report, would merely be sweeping the problem under the rug, even though it is a very good advice in general.
Is it a bug in the server itself that it fails to do getpwuid, or is it because the system Fabio's on is somehow screwed up?
Until the latter can be ruled out, we might be better off not doing anything, which may give interested parties an easier way to dig deeper into the real cause of getpwuid failing, no? Such a digging may even result in a better solution (e.g. finding a specific pattern of misconfigured systems and stop tests only on them).
Personally, I do not think running our tests as root is an interesting enough problem to warrant the effort from us to dig only to come up with such a "better solution", and I would be perfectly happy to apply the "do not run this test as root" patch, or even a broader "we do not let any test run as root, unless individual tests explicitly ask us to allow it" somewhere in test-lib.sh included by everybody. That may sweep the issue under the rug as a side effect, but it is OK because it is not the primary mission of our tests to find issues in either httpd binaries or the system configuration that may cause the httpd server misbehave in the first place.
So...
Quoted 9 lines · Junio C Hamano
A bit more disturbing is that I did not get the impression that we know the exact reason why these http tests, especially the getwpuid call, fail for Fabio when run as root. And if my impression is correct, then "do not run tests as root" applied as a "solution" to the failure report, would merely be sweeping the problem under the rug, even though it is a very good advice in general.
Is it a bug in the server itself that it fails to do getpwuid, or is it because the system Fabio's on is somehow screwed up?
I think it's a config problem possibly coupled with an Apache bug. We don't define the "User" directive (and I think it would be kind of crazy to do so[1]). The default for "User" is "-1", and we see in his log that apache was trying to getpwuid to 4294967295. However, if you don't set User at all, and you are running as root, I would expect Apache to continue running as root. The most I could come up with on this front was that it's a bug in apache 1.3.22:
http://www.gossamer-threads.com/lists/apache/users/179688#179688
but that seems like an awfully old version to have on a Natty desktop (I checked, and it seems only to have shipped apache2). So either the bug resurfaced, or something else is going on.
Quoted 5 lines
Until the latter can be ruled out, we might be better off not doing anything, which may give interested parties an easier way to dig deeper into the real cause of getpwuid failing, no? Such a digging may even result in a better solution (e.g. finding a specific pattern of misconfigured systems and stop tests only on them).
Sure, I have no problem with anybody digging deeper. I was mainly worried that it would become a pain for people on such systems, as it causes a false positive in the test suite. But we don't even know how common such systems are, so I'm OK with waiting to see if we have more reports.
-Peff