Bug #11387

AtoM is not compatible with recent versions of APCu

Added by Dan Gillean over 2 years ago. Updated 8 months ago.

Status:VerifiedStart date:07/27/2017
Priority:MediumDue date:
Assignee:Mike Cantelon% Done:

0%

Category:Installation
Target version:Release 2.4.1
Google Code Legacy ID: Tested version:2.4
Sponsored:No Requires documentation:Yes

Description

A user has reported an error during installation (Ubuntu 16.04) when trying to install APCu-bc. See:

Our current documentation has users install APCU-bc, which is not packaged by 16.04. This is becoming an issue, as the PECL version throws an error when installed.

Jesus has reproduced this issue, but notes that APCU is still correctly installed, and you can proceed with the installation. However, we should try to resolve this so users aren't continually experiencing errors while trying to install.

The solution would be to upgrade AtoM's cache layer to work with recent versions of APCu.

History

#1 Updated by Mike Cantelon about 2 years ago

  • Status changed from New to Code Review
  • Assignee set to Nick Wilkinson

#2 Updated by Steve Breker about 2 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Nick Wilkinson to Mike Cantelon

Looking great but I think there are a few more places that need updating:

plugins/sfInstallPlugin/lib/sfInstall.class.php

There are also apc_* calls in the vendor dir in the symfony and symfony2 dirs

#3 Updated by Mike Cantelon about 2 years ago

Thanks Steve!

Also Jesús's perspective (I emailed to ask him for feedback on changing this):

I don't remember the details but I think what was good about apcu_bc was that you always had the same API regardless the version of APCu that the user was running. If you interact directly with APCu you'll see that older releases (e.g. the one bundled in 14.04 I believe) and recent versions have smaller differences in the API which will cause bugs. I may be wrong though, not sure what's the situation at this point.

I'm sorry I can't help more. I would only recommend to be wary about the whole thing and start thinking on all the platforms where we're recommending users to install AtoM and analyze the different versions of apcu you can find today (e.g. 14.04 still bundling and old version). I think that any support for apc_* (old apc extension) can be ditched now because php 5.3 is definitely gone (I believe we don't support more ubuntu 12.04 installations).

#4 Updated by Mike Cantelon about 2 years ago

  • Status changed from Feedback to In progress

I'm going to email the atom-dev list for feedback on whether we should change this.

#5 Updated by Mike Cantelon about 2 years ago

  • Assignee changed from Mike Cantelon to Steve Breker

Updated for another round of code review. I created an APUc-friendly version of ApcUniversalClassLoader. sfInstaller doesn't need to be updated as it looks for APC alternate functions present in PHP 5.5+ before trying to use old APC functions. I didn't update the Symfony Doctrine stuff to APCu as we don't use it.

#6 Updated by Mike Cantelon about 2 years ago

  • Status changed from In progress to Code Review

#7 Updated by Steve Breker about 2 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Steve Breker to Mike Cantelon

Hi Mike - are you sure that sfInstall does not need to be updated? There is not an 'else' on that if - both opcache and apc cache are cleared in succession - these are two different caches I believe?

#8 Updated by Mike Cantelon about 2 years ago

Hi Steve... running the APC clears should be fine if they are defined (the APC used to include the opcache cache). I'll make those use elses too though as it's cleaner that way.

#9 Updated by Mike Cantelon about 2 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Mike Cantelon to Steve Breker

OK, made that tweak to sfInstall.

#10 Updated by Mike Cantelon about 2 years ago

  • Assignee changed from Steve Breker to Mike Cantelon

Actually I'm going to get rid of the APC calls entirely.

#11 Updated by Mike Cantelon about 2 years ago

  • Assignee changed from Mike Cantelon to Steve Breker

(OK, done.)

#12 Updated by Steve Breker about 2 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Steve Breker to Mike Cantelon

Looks good Mike. Thanks for addressing those additional APC calls.

#13 Updated by Mike Cantelon about 2 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

Hi Nick. I'm not sure how/who best to QA this.

#15 Updated by Nick Wilkinson about 2 years ago

  • Assignee changed from Nick Wilkinson to Mike Cantelon

Hey Mike, to QA this, can you try reproducing the original error reported by the user (outlined in the issue description)?

#16 Updated by Mike Cantelon about 2 years ago

  • Status changed from QA/Review to Verified

Hi Nick... I tried to reproduce the error and did get an error, but different error text. They got “Illegal instruction (core dumped)” and I got “Segmentation fault (core dumped)”. I'm running Ubuntu 16.04.3 Server (maybe the user was running a slightly different 16.04 version).

I also verified that the caching works on a fresh installation. I tested this by creating a qa/2.5.x installation from scratch, using the 2.4 instructions (but without attempting to install apcu-bc) then upgrading Elasticsearch to work with 2.5 and installing apcu (with apt-get install php-apcu) and encountered no issues.

I've marked this as verified (but can re-open if there are any other ideas for testing).

#17 Updated by Dan Gillean over 1 year ago

  • Assignee deleted (Mike Cantelon)
  • Target version set to Release 2.4.1

#18 Updated by Dan Gillean over 1 year ago

  • Assignee set to Mike Cantelon

Reminder to developers to update the documentation for installation in the 2.5 Admin manual - and possibly 2.4 as well, since this went into qa/2.4.x just after the 2.4.0 release?

#19 Updated by Dan Gillean over 1 year ago

See also this related forum thread - user having issues with APCU-bc install. https://groups.google.com/d/msg/ica-atom-users/DzQqTutoHoE/NWZ5_MltBAAJ

#20 Updated by Santiago Collazo 8 months ago

When using php 7.2 (Ubuntu 18.04 or Centos 7), the apcu_bc extension is not only not needed, but also breaks atom. We should update the install instructions in order to add the following packages:
- Ubuntu 18.04: php-apcu
- Centos 7: rh-php72-php-pecl-apcu

Also, in the atom25-1604 vm, apcu_bc doesn't seem installed, so I think we should remove the paragraph from the install instructions.

Also available in: Atom PDF