Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Senior Member
    Join Date
    Aug 2014
    Location
    UK
    Posts
    540

    How my BBC Sounds Plugin briefly broke LMS. A cautionary tale!

    The BBC sounds plugin has always had an frequent incremental releases. I release usable functional changes when they are ready with quickly released bug fixes when required.
    With the view that the plugin is mostly self contained and it is much more beneficial to myself, and everybody who uses it, to get usable functionality in small changes in a plugin that is always improving.

    So when I was provided with a surprise pull request for a useful piece of functionality. All was good. It was low impact, well written, easy to understand.
    I gave it a quick test to make sure it was working as described and released.

    A few hours later I got reports that favourites were disappearing, various plugins were not working all caused by this seemingly innocuous BBC sounds release! I quickly deleted the release. But not before 200 people had downloaded and installed. A back out has now been released to correct.

    What happened?

    The change included using XML::Simple and had been included like this :
    Code:
    use XML::Simple qw(:strict);
    The developer was dutifully following the XML::simple manual . Where it states that the strict mode will "save you pain"

    As explained by @mavit :
    It turns out there was a bug in XML::Simple ( fixed in 2012 ) https://rt.cpan.org/Public/Bug/Display.html?id=41562 where setting strict mode set a global flag turning on strict mode on for all modules that use XML::Simple .

    The XML:simple version packaged in LMS is an older version, hence the continued existence of the bug.

    So, that's what happened. Sorry for all the chaos yesterday.

  2. #2
    jvromans@squirrel.nl
    Guest

    How my BBC Sounds Plugin briefly broke LMS. Acautionary tale!

    On Tue, 27 Apr 2021 13:37:59 +0000, expectingtofly wrote:

    > It turns out there was a bug in XML::Simple ( fixed in 2012 )
    > ...
    > The XML:simple version packaged in LMS is an older version, hence the
    > continued existence of the bug.


    Yet another compelling reason why LMS must stop using private copies of
    CPAN modules just because "one day is was necessary".

    And yes, I *know* the counter arguments...

    -- Johan

  3. #3
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,771
    Thanks for the explanation.
    I have now committed it to memory and have no doubt that I will be reminded of it by someone else when I make the same or similar mistake in the future.

    I presume that LMS updating that one Perl module from version 2.15 (2006) up to 2.19.x (for the fix from 2012) or now 2.25 (from 2018) risks too many other things quietly breaking with no-one realising until a long time later when some rarely used feature stops working.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia, CBC/Radio-Canada and RTE Ireland
    and, via the extra "Radio Now Playing" plugin, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Frequence3, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Somehow Jazz, Supla Finland

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,801
    Quote Originally Posted by Paul Webster View Post
    I presume that LMS updating that one Perl module from version 2.15 (2006) up to 2.19.x (for the fix from 2012) or now 2.25 (from 2018) risks too many other things quietly breaking with no-one realising until a long time later when some rarely used feature stops working.
    There is the complication that some updated modules may rely on a newer version of Perl and some LMS platforms are stuck on old version of Perl such as Windows on Perl 5.14 or IIRC maybe Synology etc.

  5. #5
    Senior Member
    Join Date
    Mar 2010
    Posts
    215
    Quote Originally Posted by bpa View Post
    There is the complication that some updated modules may rely on a newer version of Perl and some LMS platforms are stuck on old version of Perl such as Windows on Perl 5.14 or IIRC maybe Synology etc.
    LMS on Synology is dead for all practical purposes. (Long live Docker!)

  6. #6
    jvromans@squirrel.nl
    Guest

    How my BBC Sounds Plugin briefly broke LMS. Acautionary tale!

    On Tue, 27 Apr 2021 14:21:04 +0000, bpa wrote:

    > Paul Webster wrote:
    > There is the complication that some updated modules may rely on a newer
    > version of Perl and some LMS platforms are stuck on old version of Perl
    > such as Windows on Perl 5.14 or IIRC maybe Synology etc.


    IMHO LMS should first of all be capable to run out of the box with any
    sufficiently modern Perl version and ecosystem. E.g. 5.22 (5 years old).
    And even old systems can update the CPAN modules, so there is no reason to
    not require that.

    If LMS would fit nicely in the ecosystem I think many relevant Linux distros
    will include LMS by default, making it much easier for people to start
    using LMS.

    -- Johan



  7. #7
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,565
    Quote Originally Posted by jvromans@squirrel.nl View Post
    On Tue, 27 Apr 2021 13:37:59 +0000, expectingtofly wrote:

    > It turns out there was a bug in XML::Simple ( fixed in 2012 )
    > ...
    > The XML:simple version packaged in LMS is an older version, hence the
    > continued existence of the bug.


    Yet another compelling reason why LMS must stop using private copies of
    CPAN modules just because "one day is was necessary".

    And yes, I *know* the counter arguments...

    -- Johan
    I donĺt think it was the problem here
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

  8. #8
    jvromans@squirrel.nl
    Guest

    How my BBC Sounds Plugin briefly broke LMS. Acautionary tale!

    On Tue, 27 Apr 2021 17:46:51 +0000, philippe_44
    <philippe_44.a0rzu0 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

    > jvromans (AT) squirrel (DOT) nl wrote:
    > > On Tue, 27 Apr 2021 13:37:59 +0000, expectingtofly wrote:
    > >
    > > > It turns out there was a bug in XML::Simple ( fixed in 2012 )
    > > > ...
    > > > The XML:simple version packaged in LMS is an older version, hence the
    > > > continued existence of the bug.

    > >
    > > Yet another compelling reason why LMS must stop using private copies of
    > > CPAN modules just because "one day is was necessary".
    > >
    > > And yes, I *know* the counter arguments...
    > >
    > > -- Johan

    >
    > I don_t think it was the problem here


    How do you mean?
    Apparently LMS' private copy of XML::Simple was extremely old and contained
    a bug that was fixed long ago.

    -- Johan

  9. #9
    jvromans@squirrel.nl
    Guest

    Using the perl ecosystem (Was: Re: How my BBC SoundsPlugin briefly broke LMS. A cautionary tale!)

    FWIW, I made a quick tour...

    On my Fedora 33 system I needed to install the following standard packages:

    perl-EV
    perl-AnyEvent
    perl-File-BOM
    perl-File-Next
    perl-Class-Virtual*
    perl-File-Slurp*
    perl-URI-Find*
    perl-HTTP-Daemon*
    perl-UUID-Tiny*
    perl-Data-Page*
    perl-IO-Socket-SSL*
    perl-SQL-Abstract-Limit*
    perl-File-ReadBackwards*

    >From LMS' private CPAN, I needed to install:


    Image::Scale
    Proc::Background
    Tie::Cache::LRU
    Tie::RegexpHash
    JSON::XS::VersionOneAndTwo
    Net::HTTPS::NB*
    DBIx::Class*

    When slimserver is started, it checks for the necessary modules. However
    apparently this check is outdated. The modules above with an asterisk* were
    required but not checked (i.e., if missing they crash slimserver when
    started).

    BTW, I thought that the DBIx::Class incompatibility was fixed?



  10. #10
    Senior Member
    Join Date
    May 2008
    Location
    Canada
    Posts
    7,565
    Quote Originally Posted by jvromans@squirrel.nl View Post
    On Tue, 27 Apr 2021 17:46:51 +0000, philippe_44
    <philippe_44.a0rzu0 (AT) no-mx (DOT) forums.slimdevices.com> wrote:

    > jvromans (AT) squirrel (DOT) nl wrote:
    > > On Tue, 27 Apr 2021 13:37:59 +0000, expectingtofly wrote:
    > >
    > > > It turns out there was a bug in XML::Simple ( fixed in 2012 )
    > > > ...
    > > > The XML:simple version packaged in LMS is an older version, hence the
    > > > continued existence of the bug.

    > >
    > > Yet another compelling reason why LMS must stop using private copies of
    > > CPAN modules just because "one day is was necessary".
    > >
    > > And yes, I *know* the counter arguments...
    > >
    > > -- Johan

    >
    > I don_t think it was the problem here


    How do you mean?
    Apparently LMS' private copy of XML::Simple was extremely old and contained
    a bug that was fixed long ago.

    -- Johan
    Oh, I thought you mean the plugin's private package (plugins can also have their own CPAN package). Now, for the fact that LMS has its own CPAN, I hear you but at the same time, some packages have slight mods for LMS and that allowed sometimes to do workarounds. I agree that using the stock Perl woudl often be better but at the same time, there is no army of testers for LMS that can verify every permutation and combination of Perl version and OS, so we are really on thin air here.
    LMS 8.2 on Odroid-C4 - SqueezeAMP!, 5xRadio, 5xBoom, 2xDuet, 1xTouch, 1xSB3. Sonos PLAY:3, PLAY:5, Marantz NR1603, Foobar2000, ShairPortW, 2xChromecast Audio, Chromecast v1 and v2, Squeezelite on Pi, Yamaha WX-010, AppleTV 4, Airport Express, GGMM E5, RivaArena 1 & 3

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •