Page MenuHomePhabricator

On Trusty and Jessie PHP yields: PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2
Closed, ResolvedPublic

Description

Zend PHP 5 on Trusty or Jessie have annoying notice emitted whenever the CLI is started:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0

The most annoying ones being for PHP CodeSniffer which would highlight the notice in red whenever another error occur which is quite misleading:

15:43:33 Script phpcs -p -s handling the test event returned with an error
15:43:33 
15:43:33                                                                                                                                                  
15:43:33   [RuntimeException]                                                                                                                             
15:43:33   Error Output: PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 in Unknown on line 0

The MediaWiki documentation invokes on every single file a filter that shells out to PHP CLI and causes the notice to be emitted. The behavior can be seen on https://integration.wikimedia.org/ci/job/mediawiki-core-doxygen-publish/lastBuild/consoleFull

The reason is the Debian package xhprof 0.9.4-1 which installs an ini file with a deprecated comment. That is fixed in the 0.9.4-2 version of the package, unfortunately the fix hasn't been pushed to Trusty update nor did it land in Jessie.

Jessie stable changelog: http://metadata.ftp-master.debian.org/changelogs/main/x/xhprof/xhprof_0.9.4-1_changelog

Unstable changelog (a single new entry): http://metadata.ftp-master.debian.org/changelogs/main/x/xhprof/unstable_changelog

I think we can survive the notice on Trusty, but I would like it to disappear from Jessie. Can we rebuild the xhprof package from unstable and push on apt.wikimedia.org for Jessie ? Thank you !

Event Timeline

Paladox created this task.May 15 2016, 3:49 PM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 15 2016, 3:49 PM

@Legoktm and @hashar and @JanZerebecki can I add you to task please.

Is that a bug in the xhprof package in Debian Jessie or in our puppet scripts?

hashar triaged this task as Low priority.May 15 2016, 7:31 PM
hashar removed a project: Composer.

The ini file comes from the Ubuntu Trusty package. That is version 0.9.4-1build1 and indeed:

$ apt-get source php5-xhprof
$ cat xhprof-0.9.4/debian/xhprof.ini 
extension = xhprof.so
#xhprof.output_dir = "/var/tmp/xhprof"
$

The Jessie package has the same issue (version 0.9.4-1+b1).

The same happened with Wikimedia PHP extension FastStringSearch ( php5-fss ) T83705.

Debian bug is https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777133 which is marked as solved as of version 0.9.4-2:

xhprof (0.9.4-2) unstable; urgency=low

  * Replace ini comment mark to ';' (closes: #777133).

 -- Laszlo Boszormenyi (GCS) <gcs@debian.org>  Sat, 07 Feb 2015 12:57:23 +0000

Apparently it hasn't been pushed to update Trusty/Jessie. We can ask for the update or add the new version in our apt repo.

Paladox added a subscriber: hashar.May 15 2016, 7:37 PM

@hashar thanks for looking into this. Maybe we could ask them to release it to Jessie and trusty but if they doint want to lets add it to our apt repo.

I have mailed the package maintainer László Böszörményi (GCS) asking how php5-xhprof can be updated on Jessie stable.

hashar renamed this task from Running composer-php55-trusty and composer-hhvm-trusty giving out warnnings to On Trusty PHP yields: PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 .Sep 26 2016, 10:43 AM
hashar closed this task as Declined.

We will live with that warning. Upstream hasn't replied on Wikimedia ops said they dont want to update the package just for that and it should instead be updated in trusty.

Dead loop, so that is not fixable. It does not prevent the jobs from completing properly anyway.

hashar added a comment.Nov 7 2016, 7:44 PM

The same happen for php5-xhprof on Jessie which has 0.9.4-1 while the fix is in 0.9.4-2. That causes at least the MediaWiki doxygen generation to spurt a notice for every single file.

hashar renamed this task from On Trusty PHP yields: PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 to On Trusty and Jessie PHP yields: PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/cli/conf.d/20-xhprof.ini on line 2 .EditedNov 7 2016, 7:51 PM
hashar reopened this task as Open.
hashar added a project: Operations.
hashar updated the task description. (Show Details)

I have reopened the task, the notice is quite annoying on the Jenkins job that generate the MediaWiki documentation. The package in unstable has a single difference which is the fix for the deprecated .ini:

xhprof (0.9.4-2) unstable; urgency=low

  * Replace ini comment mark to ';' (closes: #777133).

 -- Laszlo Boszormenyi (GCS) <gcs@debian.org>  Sat, 07 Feb 2015 12:57:23 +0000

So I hope it is just about rebuilding the package for Jessie? Added Operations for that.

Duplicate bug T156524 show how confusing that deprecation message can be. It is spurts to stderr, and test program would end up highlighting the deprecation message as the cause of the error :-/

I did sent an email to Debian maintainer in May 2016 asking for a backport to jessie-backports or jessie updates but havent received feedback. So I guess we should patch our own on apt.wm.o or poke upstream repos to ship it for Trusty/Jessie.

The last resort is to ship proper files via Puppet...

Tgr awarded a token.Jan 27 2017, 9:16 PM
hashar closed this task as Resolved.Sep 17 2018, 9:40 PM
hashar claimed this task.

xhprof is not used in the Docker containers.