Project

General

Profile

Actions

bug #8056

closed

WSOD in cdm_dataportal/search/results/taxon

Added by Andreas Kohlbecker about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Highest
Category:
cdm-dataportal
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
critical
Found in Version:

Description

This WSOD happens in some special cases, for example

  • Flora of Greece simple search for
    • Linum pubescens*

Links:


Related issues

Related to EDIT - task #8057: Upgrade to debian 10ClosedAndreas Müller03/28/202204/01/2022

Actions
Actions #1

Updated by Andreas Kohlbecker about 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

This problem is caused by the image with the URI http://150.140.202.8/files/Others/small/DSCN0964.jpg. This jpeg file is corrupt and can not loaded as image via imagecreatefromstring() which is using gdlib internally.

Unfortunately there seems to be a bug which casues to imagecreatefromstring() raises a FATAL ERROR in some cases (see https://bugs.php.net/bug.php?id=73479 https://bugs.php.net/bug.php?id=73986 and finally https://github.com/libgd/libgd/issues/338) which subsequently causes the php script to stop, thus the WSOD.

The call to imagecreatefromstring() was prefixed with the error control operator @ which suppresses the error reporting, so there was no hint on the error in the logs etc. Usually imagecreatefromstring() reports a error of 'warning' level.

Next steps:

  1. remove error control operator and try to "catch" any warning to avoid ugly error boxes being presented to the user in this case.
  2. find a php or gdlib version which is not raising fatal errors.
Actions #2

Updated by Andreas Kohlbecker about 5 years ago

  • Status changed from In Progress to Resolved
  • Assignee changed from Andreas Kohlbecker to Andreas Müller
  • % Done changed from 10 to 50

This issue is supposed to be solved by libgd 2.2.5

On debian 8 (edit-production and edit-test) the version of libgd is 2.1.0-5+deb8u11
on debian 9 it is also only 2.2.4-2+deb9u2.

This means to wait until debian 9 provides at least 2.2.5 and to upgrade to debian 9 then.

Until this is possible we only can fix the image so that at at least the result page in flora of greece it working again in all cases.

So there is noting left to fix in the dataportal code. but we should consider upgrading the server in the next months.

@Andreas Müller can you please ask the people in greece to fix or remove this image?

Actions #3

Updated by Andreas Kohlbecker about 5 years ago

  • Description updated (diff)

Note: debian buster will bring libgd 2.2.5 for sure, see https://packages.debian.org/buster/libgd-dev

Actions #4

Updated by Andreas Kohlbecker about 5 years ago

"The stable Debian 10 Buster release date is to be expected in a second or third quarter of 2019. "

Actions #5

Updated by Andreas Müller about 5 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

Hi asked Greece admins to fix the image.

Do I understand it correctly that it is not possible with the current library to better catch the error/warning than by showing a WSOD (before we install the fixed version of libgd)? Or is this only an additional fix to do.

How far is this ticket already fixed then?

Actions #6

Updated by Andreas Kohlbecker about 5 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 50 to 100

Yes, exactly, there is no way of catching and handling this error so that the page is being displayed at least in a limited way. This is because this error coming from libdg is a FATAL ERROR which causes the php process to being stopped immediately. You only can register a custom error handler be which you can change the way the error is reported but you can not prevent the process from being terminated.

So this issue is handled completely and can be closed.

I will open another issue to remind us to upgrade to debian 10 once it is relased: #8057

Actions #7

Updated by Andreas Müller about 2 years ago

  • Related to task #8057: Upgrade to debian 10 added
Actions

Also available in: Atom PDF