Control: severity -1 serious

On Sun, Mar 03, 2019 at 01:33:36PM +0100, Stefan Fritsch wrote:
> after upgrading from 16.8+git20160826+dfsg-3 (which I had run under
> Debian stretch), tt-rss fails to display anything after the login page.
> There is this error:
> 
> [Sun Mar 03 13:15:12.954927 2019] [php7:error] [pid 2055] [client XXX] PHP 
> Fatal error:  Uncaught PDOException: SQLSTATE[22001]: String data, right 
> truncated: 1406 Data too long for column 'context' at row 1 in 
> /usr/share/tt-rss/www/classes/logger/sql.php:18
> Stack trace:
> #0 /usr/share/tt-rss/www/classes/logger/sql.php(18): 
> PDOStatement->execute(Array)
> #1 /usr/share/tt-rss/www/classes/logger.php(28): Logger_SQL->log_error(8192, 
> 'strpos(): Non-s...', 'vendor/JShrink/...', 184, '1. vendor/JShri...')
> #2 /usr/share/tt-rss/www/include/errorhandler.php(43): 
> Logger->log_error(8192, 'strpos(): Non-s...', 'vendor/JShrink/...', 184, '1. 
> vendor/JShri...')
> #3 [internal function]: ttrss_error_handler(8192, 'strpos(): Non-s...', 
> 'vendor/JShrink/...', 184, '1. vendor/JShri...')
> #4 /usr/share/tt-rss/www/vendor/JShrink/Minifier.php(184): strpos('(-+{[@', 
> false)
> #5 /usr/share/tt-rss/www/vendor/JShrink/Minifier.php(144): 
> JShrink\\Minifier->loop()
> #6 /usr/share/tt-rss/www/vendor/JShrink/Minifier.php(110): 
> JShrink\\Minifier->minifyDirectToOutput('/* global dijit...', Array)
> #7 /usr/share/tt-rss/www/include/functions.php in 
> /usr/share/tt-rss/www/classes/logger/sql.php on line 18, referer: https://XXX
> 
> 
> I have then changed LOG_DESTINATION to syslog in config.php and it
> worked again. In syslog, I see this message:

Given this workaround, the package is not entirely useless. "Only" the
default installation does not work. Thus severity grave is not
reasonable. Still something should be done about this in buster, which
is why I won't downgrade it below rc.

> php: [tt-rss] E_DEPRECATED (8192) (vendor/JShrink/Minifier.php:184) strpos(): 
> Non-string needles will be interpreted as strings in the future. Use an 
> explicit chr() call to preserve the current behavior
> 
> 
> If no other fix is possible in time for buster release, maybe the default for 
> LOG_DESTINATION
> could be changed?

Thank you for the detailed analysis. The actual failure we see here is
secondary. It tries to log an error and fails. Changing the
LOG_DESTINATION fixes the secondary error. The primary cause seems to
live in JShrink though and I guess that this commit fixes it:

https://github.com/tedious/JShrink/pull/78/commits/91105810dafedba0390608d7465abd602beb6410

JShrink is a vendored library and is installed to
/usr/share/tt-rss/www/vendor/JShrink/Minifier.php. You can apply the
above commit to a live installation without rebuilding the package.  Can
any of the reporters try applying it and tell whether it fixes tt-rss?

Likely, the logger should be fixed as well. In the absence of a fix
there, I second the suggestion to log to syslog as that's where system
services usually log on Debian and I'd prefer that default, but it is
not up to me to decide.

Helmut

Reply via email to