Closed Bug 1588175 Opened 6 years ago Closed 5 years ago

Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.

Categories

(Bugzilla :: Installation & Upgrading, defect)

5.0.4
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jochen.wiedmann, Unassigned)

References

Details

Attachments

(2 files)

Attached file checksetup.pl.log

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

Steps to reproduce:

1.) Simple installation of CentOS 7 on a VM (including Virtualbox Guest Additions, mariadb-server, and mariadb-devel
2.) Download, and extraction of perl-5.30.0.tar.gz
3.) Download, and extraction of bugzilla-5.0.6.tar.gz
4.) Perl Installation:

  cd /usr/local/install/perl-5.0.30
  ./Configure -des -Dprefix=/usr/local/perl-5.30.0
  make
  make test
  sudo make install

5.) Bugzilla Installation:

  cd /usr/local/bugzilla-5.0.6
  export PATH=/usr/local/perl-5.30.0/bin:$PATH
  /usr/local/perl-5.30.0/bin/perl checksetup.pl
  sudo /usr/local/perl-5.30.0/bin/perl install-module.pl --all

Actual results:

checksetpu.pl fails with the following error message (See attached log file):

Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109.
Compilation failed in require at Bugzilla/Mailer.pm line 21, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Mailer.pm line 21, <DATA> line 755.
Compilation failed in require at Bugzilla/Auth.pm line 22, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla/Auth.pm line 22, <DATA> line 755.
Compilation failed in require at Bugzilla.pm line 23, <DATA> line 755.
BEGIN failed--compilation aborted at Bugzilla.pm line 23, <DATA> line 755.
Compilation failed in require at checksetup.pl line 76, <DATA> line 755.

Expected results:

Checksetup.pl should generate the localconfig file, and exit without error message.

The issue seems to be related to the Perl version. I encountered it originally on another machine, and could fix it by downgrading Perl to 5.16.3.
In fact, this smells like a bug in Perl. (See, for example, https://rt.perl.org/Public/Bug/Display.html?id=72942.)

However, I feel that the Bugzilla maintainers should

a) be more qualified than me to state the fact, and isolate the problem
b) be aware of the problem, and
c) suggest suitable workarounds, other than mine.

Thanks,

Jochen

Duplicate: #1558150
I workaround it with commenting the single line in Bugzilla/Util.pm:
$var =~ tr/\x{202a}-\x{202e}//d;

This only removes BiDi control characters, so it's not introducing any security issues to do so.

I don't understand what makes Perl 5.30.0 unhappy with this.

Upstream Perl bug report (thanks to many on freenode #perl): https://github.com/Perl/perl5/issues/17271

Do we need to work around this, perhaps?

This is fixed in the 5.2 branch

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED

(In reply to Dylan Hardison [:dylan] (he/him) from comment #5)

This is fixed in the 5.2 branch

For future reference, here's the commit that fixed it:
https://github.com/bugzilla/bugzilla/commit/f86fcf1fe9c9969cb486bba0a75d56540f58061e

This being a stability fix seems like it would qualify for the 5.0 branch, so I'm going to backport this to 5.0.4 and it'll be included in the 5.0.4.1 release.

I was thinking wth Safe.pm being updated upstream that it might not be necessary anymore, but we just had someone on IRC using the latest Strawberry Perl on Windows and ran into this, so...

Comment on attachment 9401468 [details] [review]
[bugzilla/bugzilla] Bug 1588175 - Undefined subroutine utf8::SWASHNEW called at Bugzilla/Util.pm line 109. (#182)

https://github.com/bugzilla/bugzilla/commit/1631b86eeb52c2f8dac560b7dc6893cdf56ce94c

Attachment #9401468 - Flags: merged+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: