Closed Bug 1292237 Opened 8 years ago Closed 8 years ago

checksetup.pl or so should detect and clearly explain lib (or local/lib/perl5) when it differs from the current interpreter

Categories

(Bugzilla :: Installation & Upgrading, defect)

5.0.1
x86_64
Other
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: randy123, Unassigned, Mentored)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2817.0 Safari/537.36

Steps to reproduce:

Upgraded Ubuntu from Trusty to Xenial 16 - 4.4.0-31-generic #50-Ubuntu

On an unrelated note, all emails seem to go to the default contact now as well, no matter who is assigned a bug. This is from a previous fix that was causing bug submission errors (but this is unrelated). Anyone know of a fix for that as well?


Actual results:

an't locate MooX/Types/MooseLike/Base.pm in @INC (you may need to install the MooX::Types::MooseLike::Base module) (@INC contains: . lib/x86_64-linux-gnu-thread-multi lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at lib/Email/Sender/Failure.pm line 8.
BEGIN failed--compilation aborted at lib/Email/Sender/Failure.pm line 8.
Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 317.
Compilation failed in require at lib/Email/Sender/Role/CommonSending.pm line 9.
BEGIN failed--compilation aborted at lib/Email/Sender/Role/CommonSending.pm line 9.
Compilation failed in require at /usr/share/perl5/Module/Runtime.pm line 317.
Compilation failed in require at lib/Email/Sender/Simple.pm line 23.
BEGIN failed--compilation aborted at lib/Email/Sender/Simple.pm line 23.
Compilation failed in require at Bugzilla/Mailer.pm line 27.
BEGIN failed--compilation aborted at Bugzilla/Mailer.pm line 27.
Compilation failed in require at Bugzilla/Auth.pm line 22.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22.
Compilation failed in require at Bugzilla.pm line 23.
BEGIN failed--compilation aborted at Bugzilla.pm line 23.
Compilation failed in require at /var/www/bugzilla/index.cgi line 15.
BEGIN failed--compilation aborted at /var/www/bugzilla/index.cgi line 15.


Expected results:

Bugzilla should have taken the update gracefully.
Severity: normal → critical
OS: Unspecified → Other
Hardware: Unspecified → x86_64
Mentor: dylan
I'm guessing I just need to install the CPAN module MooX::Types::MooseLike::Base module ? Upgrade caused some dependency error (why sometimes perl is good.. and....).

I think Federeic
Mentor: LpSolit
After installing MooX::Types::MooseLike::Base I now get a new error:
(I guess perl provides good job security for support tickets?)

Can't locate Text/Diff.pm in @INC (you may need to install the Text::Diff module) (@INC contains: CODE(0x6044b38) CODE(0x5fa4f40) CODE(0x5ee2d58) CODE(0x5ecaf40) CODE(0x5ecab68) CODE(0x5eca550) CODE(0x5ebe0f0) CODE(0x5eb8ad8) CODE(0x26b7c28) CODE(0x26b7838) . lib/x86_64-linux-gnu-thread-multi lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.
BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.
Compilation failed in require at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.
BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.
Compilation failed in require at ./extensions/Testopia/Extension.pm line 7.
BEGIN failed--compilation aborted at ./extensions/Testopia/Extension.pm line 7.

[Thu Aug  4 12:47:31 2016] index.cgi: Can't locate Text/Diff.pm in @INC (you may need to install the Text::Diff module) (@INC contains: CODE(0x6044b38) CODE(0x5fa4f40) CODE(0x5ee2d58) CODE(0x5ecaf40) CODE(0x5ecab68) CODE(0x5eca550) CODE(0x5ebe0f0) CODE(0x5eb8ad8) CODE(0x26b7c28) CODE(0x26b7838) . lib/x86_64-linux-gnu-thread-multi lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.
[Thu Aug  4 12:47:31 2016] index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.
[Thu Aug  4 12:47:31 2016] index.cgi: Compilation failed in require at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.
[Thu Aug  4 12:47:31 2016] index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.
[Thu Aug  4 12:47:31 2016] index.cgi: Compilation failed in require at ./extensions/Testopia/Extension.pm line 7.
[Thu Aug  4 12:47:31 2016] index.cgi: BEGIN failed--compilation aborted at ./extensions/Testopia/Extension.pm line 7.
Compilation failed in require at Bugzilla/Extension.pm line 71.
Please add those to your documentation or checksetup.pl if a user upgrades to xenial....

cpanm MooX::Types::MooseLike::Base
cpanm Text::Diff

However, now when I run ./checksetup.pl I get:

:(

* This is Bugzilla 5.0 on perl 5.22.1
* Running on Linux 4.4.0-31-generic #50-Ubuntu SMP 

Checking perl modules...
Checking for               CGI.pm (v3.51)     ok: found v4.09
Checking for           Digest-SHA (any)       ok: found v5.95
Checking for             TimeDate (v2.23)     ok: found v2.24
Checking for             DateTime (v0.75)     ok: found v1.21
Checking for    DateTime-TimeZone (v1.64)     ok: found v1.95
Checking for                  DBI (v1.614)    ok: found v1.634
Checking for     Template-Toolkit (v2.24)     ok: found v2.24
Checking for         Email-Sender (v1.300011) ok: found v1.300018
Checking for           Email-MIME (v1.904)    ok: found v1.937
Checking for                  URI (v1.55)     ok: found v1.65
Checking for       List-MoreUtils (v0.32)     ok: found v0.413
Checking for    Math-Random-ISAAC (v1.0.1)    ok: found v1.003
Checking for           File-Slurp (v9999.13)  ok: found v9999.19
Checking for              JSON-XS (v2.01)     ok: found v3.01
Checking for                 JSON (any)       ok: found v2.90
Segmentation fault (core dumped)
I'm going to try : ./install-module.pl  --upgrade-all --global 
To see if that resolves the Segmentation fault.
Nope, didnt work still fails. Any suggestions on this? and the email issue?
./runtests.pl produces:

# Looks like you failed 539 tests of 3072.
t/002goodperl.t ...... Dubious, test returned 254 (wstat 65024, 0xfe00)
Failed 539/3072 subtests

Test Summary Report
-------------------
t/001compile.t     (Wstat: 139 Tests: 225 Failed: 0)
  Non-zero wait status: 139
  Parse errors: Bad plan.  You planned 512 tests but ran 225.
t/002goodperl.t    (Wstat: 65024 Tests: 3072 Failed: 539)
  Failed tests:  74-111, 283-286, 313, 366, 449-452, 455
                457, 461, 732, 734-735, 737-738, 740-741
                743-744, 746-747, 749-750, 752-753, 755-756
                758-759, 761-762, 764-765, 767-768, 770-771
                773-774, 776-777, 779-780, 782-783, 785-786
                788-789, 791-792, 794-795, 797-798, 800-801
                803-804, 806-807, 809-810, 812-813, 815-816
                818-819, 821-822, 824-825, 827-828, 830-831
                833-834, 836-837, 839-840, 842-843, 845
                1317, 1319-1320, 1322-1323, 1325, 1328
                1331-1332, 1335, 1338, 1340-1341, 1343-1344
                1346-1347, 1349-1350, 1352-1353, 1355-1356
                1358-1359, 1362-1365, 1368-1371, 1374, 1377
                1380, 1383, 1386, 1389, 1392-1395, 1397-1398
                1400-1401, 1404-1407, 1410, 1413, 1416
                1419, 1422, 1425, 1428, 1431, 1434, 1437
                1440, 1443, 1446-1452, 1454-1455, 1457-1458
                1460-1461, 1463-1464, 1466-1467, 1469-1470
                1472-1473, 1476, 1479, 1482-1485, 1488
                1491, 1494, 1497, 1500-1503, 1505-1506
                1509-1512, 1515, 1517-1518, 1521-1524, 1527-1530
                1533, 1536, 1539, 1542, 1545, 1548, 1551-1554
                1556-1557, 1559-1560, 1563-1566, 1569, 1572
                1575, 1578, 1581, 1584, 1587, 1590, 1593
                1596, 1599, 1602, 1605-1611, 1613-1614
                1616-1617, 1619-1620, 1622-1623, 1625-1626
                1628-1629, 1631-1632, 1635, 1638, 1641-1644
                1647, 1650, 1653, 1656, 1659-1662, 1664-1665
                1668-1671, 1674, 1676-1677, 1680-1683, 1686
                1689, 1692, 1695, 1698, 1701, 1704, 1707
                1710, 1713, 1716, 1719, 1722, 1725, 1728
                1731, 1734, 1737, 1740, 1743, 1746, 1749
                1752, 1755, 1758, 1761, 1764, 1767, 1770
                1773, 1776, 1779, 1782, 1785, 1787-1788

                1790-1791, 1793-1794, 1796-1797, 1799-1800
                1802-1803, 1805-1806, 1808-1809, 1811-1812
                1814-1815, 1817-1818, 1820-1821, 1823-1824
                1827, 1829-1830, 1832-1833, 1835-1836, 1838-1839
                1841-1842, 1844-1845, 1847-1848, 1850-1851
                1853-1854, 1856-1857, 1859-1860, 1862-1863
                1865-1866, 1868-1869, 1871-1872, 1874-1875
                1877-1878, 1880-1881, 1883-1884, 1886-1887
                1889-1890, 1892-1893, 1895-1896, 1898-1908
                1910-1911, 1913-1914, 1916-1917, 1920, 1922-1923
                1925-1926, 1928-1929, 1932, 1934-1935, 1937-1938
                1940-1941, 1943-1944, 1947, 1949-1950, 1952-1953
                1955-1956, 1958-1959, 1961-1962, 1964-1965
                1967-1968, 1970-1971, 1973-1974, 1976-1977
                1979-1980, 1983, 1985-1986, 1988-1989, 1991-1992
                1994-1995, 1997-1998, 2000-2001, 2003-2004
                2006-2007, 2009-2010, 2012-2013, 2015-2016
                2019, 2022, 2025, 2028, 2031, 2034, 2036-2037
                2039-2040, 2042-2043, 2045-2046, 2048, 2636-2637
                2639-2640, 2644, 2650, 2654, 2656-2662
                2666, 2671, 2989, 3043
  Non-zero exit status: 254
t/004template.t    (Wstat: 256 Tests: 1035 Failed: 1)
  Failed test:  137
  Non-zero exit status: 1
t/005whitespace.t  (Wstat: 10240 Tests: 2883 Failed: 40)
  Failed tests:  268, 270-275, 278-279, 296, 318, 327-328
                331-332, 349, 371, 431, 435-439, 442, 444
                447-448, 450, 454, 470, 492, 530-532, 643
                1217-1219, 1491-1492
  Non-zero exit status: 40
t/006spellcheck.t  (Wstat: 512 Tests: 511 Failed: 2)
  Failed tests:  72, 437
  Non-zero exit status: 2
t/008filter.t      (Wstat: 13824 Tests: 449 Failed: 54)
  Failed tests:  19-20, 36, 46, 48, 50, 56, 58-59, 61, 63
                65-69, 71-72, 74, 76, 78, 83-86, 88-90
                93-95, 101-102, 104-106, 109, 111, 115-116
                123, 127-128, 130, 132-133, 144-145, 150
                156-157, 159-161
  Non-zero exit status: 54
t/009bugwords.t    (Wstat: 2048 Tests: 449 Failed: 8)
  Failed tests:  18-19, 73, 95, 108, 110, 144-145
  Non-zero exit status: 8
t/011pod.t         (Wstat: 2304 Tests: 894 Failed: 9)
  Failed tests:  72, 297, 350, 430, 453, 464, 469, 471, 473
  Non-zero exit status: 9
t/012throwables.t  (Wstat: 4096 Tests: 510 Failed: 16)
  Failed tests:  353, 366, 371, 375, 381, 383-384, 460, 462
                467, 469, 477, 481-482, 489, 494
  Non-zero exit status: 16
t/013dbschema.t    (Wstat: 256 Tests: 116 Failed: 1)
  Failed test:  79
  Non-zero exit status: 1
Files=13, Tests=11511, 243 wallclock secs ( 1.37 usr  0.11 sys + 222.01 cusr 14.68 csys = 238.17 CPU)
Result: FAIL
Uncaught exception from user code:
        Failed 10/13 test programs. 670/11511 subtests failed.
        Test::Harness::runtests("t/001compile.t", "t/002goodperl.t", "t/003safesys.t", "t/004template.t", "t/005whitespace.t", "t/006spellcheck.t", "t/007util.t", "t/008filter.t", "t/009bugwords.t", ...) called at ./runtests.pl line 30
./sanitycheck.pl --verbose --login < Randall Amiel >

fails as well : Segmentation fault (core dumped)
After trying the following fixes above, the index pages loads fine but when I login I get an internal server error. I checked the apache logs and here are the exact errors.

 index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.: /var/www/bugzilla/index.cgi
[cgi:error]   index.cgi: Compilation failed in require at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.: /var/www/bugzilla/index.cgi
 [cgi:error]   index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestCase.pm line 46.: /var/www/bugzilla/index.cgi
 [cgi:error]   index.cgi: Compilation failed in require at ./extensions/Testopia/Extension.pm line 7.: /var/www/bugzilla/index.cgi
 [cgi:error]   index.cgi: BEGIN failed--compilation aborted at ./extensions/Testopia/Extension.pm line 7.: /var/www/bugzilla/index.cgi
 [cgi:error]  index.cgi: Compilation failed in require at Bugzilla/Extension.pm line 71.: /var/www/bugzilla/index.cgi
[access_compat:error] [pid 4072] [client 127.0.0.1:47020] AH01797: client denied by server configuration: /var/www/bugzilla/localconfig
 [cgi:error] [pid 4065] [client 192.168.100.1:62709] End of script output before headers: index.cgi, referer: https://bugzilla.site
When the version of perl changes, you need to remove the lib/ directory. I suspect that is what is going on here.

Also, this is perhaps not a bug. This is more of a support issue -- if you visit https://www.bugzilla.org/support/
you can find details for connecting to our #bugzilla channel irc.mozilla.org, I'm 'dylan' there and I'd be happy to help.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Bugzilla server crashes when upgrading Ubuntu from trusty to xenial 16. Perl Error I presume → checksetup.pl or so should detect and clearly explain lib (or local/lib/perl5) when it differs from the current interpreter
> Upgraded Ubuntu from Trusty to Xenial 16

Is this about the Bugzilla package provided via Ubuntu repositories?
Or about Bugzilla code that you pulled and installed manually?

>  index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.: /var/www/bugzilla/index.cgi

When you updated Bugzilla, how did you update third party extensions like Testopia?
(In reply to Andre Klapper from comment #10)
> When you updated Bugzilla, how did you update third party extensions like
> Testopia?

No Testopia release currently supports Bugzilla 5.0. You must use the current git code for that, see https://developer.mozilla.org/docs/Mozilla/Bugzilla/Testopia
Mentor: LpSolit
Severity: critical → normal
(In reply to Andre Klapper from comment #10)
> > Upgraded Ubuntu from Trusty to Xenial 16
> 
> Is this about the Bugzilla package provided via Ubuntu repositories?
> Or about Bugzilla code that you pulled and installed manually?
> 
> >  index.cgi: BEGIN failed--compilation aborted at /loader/0x6044b38/Bugzilla/Extension/Testopia/TestPlan.pm line 39.: /var/www/bugzilla/index.cgi
> 
> When you updated Bugzilla, how did you update third party extensions like
> Testopia?

There were some bugs using Testopia but I worked thru them, we found some issues with using testopia with v5 but I fixed them all. Is there a testopia github repo? I could provide the fixes.
(In reply to Frédéric Buclin from comment #11)
> (In reply to Andre Klapper from comment #10)
> > When you updated Bugzilla, how did you update third party extensions like
> > Testopia?
> 
> No Testopia release currently supports Bugzilla 5.0. You must use the
> current git code for that, see
> https://developer.mozilla.org/docs/Mozilla/Bugzilla/Testopia

Frederic,

There was a fix you provided for a default_qa_contact or something like that, now what happens is all emails get set to who is configured as a default CC or something, no matter who is assigned a bug etc.. Maybe we should try and find that old bug or create a new one and associate to it.
I fixed these issues by doing the following: 

wiping out /var/www/bugzilla/lib/
mv /usr/local/share/perl /usr/local/share/perl2
mv /usr/local/lib/perl /usr/local/lib/perl2

/usr/bin/perl install-module.pl --all
./checksetup.pl

Then DateTime wouldn't installed so i did these:
---------------------------------------------
chown -R www-data /var/www/bugzilla/
umask 077 /var/www/bugzilla/lib

/usr/bin/perl install-module.pl DateTime::TimeZone
/usr/bin/perl install-module.pl DateTime
/usr/bin/perl install-module.pl DateTime::Locale

./checksetup.pl

GD still doesnt like perl but im not too worried about that. 
something along the lines of (ubuntu)
sudo apt-get install libgd2-xpm-dev
sudo apt-get install libgd-gd2-perl
sudo apt-get install libgd2-dev
sudo apt-get install freetype*
sudo apt-get -y install libgd2-xpm-dev build-essential 

 Chart: /usr/bin/perl install-module.pl Chart::Lines
    Template-GD: /usr/bin/perl install-module.pl Template::Plugin::GD::Image
     GDTextUtil: /usr/bin/perl install-module.pl GD::Text
        GDGraph: /usr/bin/perl install-module.pl GD::Graph
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.