Project

General

Profile

bug #8056

WSOD in cdm_dataportal/search/results/taxon

Added by Andreas Kohlbecker 5 months ago. Updated 4 months ago.

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

100%

Severity:
critical
Found in Version:

Description

This WSOD happens in some special cases, for example

  • Flora of Greece simple search for
    • Linum pubescens*

Links:

Associated revisions

Revision 62b804e6 (diff)
Added by Andreas Kohlbecker 5 months ago

ref #8056 allowing faltal errors to show up from imagecreatefromstring()

History

#1 Updated by Andreas Kohlbecker 5 months 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.

#2 Updated by Andreas Kohlbecker 5 months 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?

#3 Updated by Andreas Kohlbecker 5 months ago

  • Description updated (diff)

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

#4 Updated by Andreas Kohlbecker 5 months ago

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

#5 Updated by Andreas Müller 4 months 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?

#6 Updated by Andreas Kohlbecker 4 months 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

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)