offspot / wikifundi

Create a pre-configured Mediawiki for offline Wikipedia contribution teaching
11 stars 2 forks source link

Gostscript errror (core dumped) on some thumbnails from PDF #64

Closed Anthere closed 6 years ago

Anthere commented 6 years ago

In this page (scroll down), a couple of images miniatures are missing. http://wikifundi-fr.openzim.org/wiki/WikiFundi:Ressources

I looked if the images were there. Apparently they are missing.

florentk commented 6 years ago

@Anthere this files are not missing, this is an thumb creation issue

Anthere commented 6 years ago

Ok... I looked for one example. Here it is : http://wikifundi-fr.openzim.org/wiki/Spécial:Liste_des_fichiers?limit=50&ilsearch=WLA+PhotoComp2016+Pull+Up+banner.pdf&user=

Result: http://wikifundi-fr.openzim.org/wiki/Fichier:WLA_PhotoComp2016_Pull_Up_banner.pdf

florentk commented 6 years ago

Concern 3 files on Ressource page : WLA_Pull_up_banner_RT_CMYK_PF.pdf WLA_PhotoComp2016_Pull_Up_banner.pdf WikiLovesAfrica_generic_pull_Up_banner_PF_FA.pdf

Log :

[thumbnail] thumbnail failed on 2de413cff698: error 134 "/bin/bash: line 1: 110 Done '/usr/bin/gs' '-sDEVICE=jpeg' '-sOutputFile=-' '-dFirstPage=1' '-dLastPage=1' '-dSAFER' '-r150' '-dBATCH' '-dNOPAUSE' '-q' '/var/www/html/w/images/e/ee/WLA_PhotoComp2016_Pull_Up_banner.pdf'
111 Aborted (core dumped) | '/usr/bin/convert' '-depth' '8' '-quality' '95' '-resize' '102' '-' '/tmp/transform_3a20fb4097db.jpg'" from "('/usr/bin/gs' '-sDEVICE=jpeg' '-sOutputFile=-' '-dFirstPage=1' '-dLastPage=1' '-dSAFER' '-r150' '-dBATCH' '-dNOPAUSE' '-q' '/var/www/html/w/images/e/ee/WLA_PhotoComp2016_Pull_Up_banner.pdf' | '/usr/bin/convert' '-depth' '8' '-quality' '95' '-resize' '102' '-' '/tmp/transform_3a20fb4097db.jpg')"
florentk commented 6 years ago

similar bug https://www.mediawiki.org/wiki/Topic:Uaj2hidtvh9xjokc

Anthere commented 6 years ago

Is there a technical solution or should I remove those three images ?

florentk commented 6 years ago

@Anthere no technical solution for moment , you can delete this images waiting a other solution

kelson42 commented 6 years ago

@florentk What happens if you start the command line by hand?

kelson42 commented 6 years ago

@florentk J'ai lancé la commande à la main sur le docker et cela marche en 20s... donc y'a un pb quelconque au niveau de la conf de MW.

kelson42 commented 6 years ago

@florentk I would recommend to have a look in details to that page https://www.mediawiki.org/wiki/Manual:$wgMaxShellMemory

florentk commented 6 years ago

@kelson42 j'ai augmenté cette valeur en local à 512Mo, ça ne change rien :(

kelson42 commented 6 years ago

@florentk peut-etre que tu as besoin de plus... en tout cas la machine et le software fonctionnent.

florentk commented 6 years ago

@kelson42 I fixed this bug ! I set $wgMaxShellFileSize at 512 Mo, maybe a big temp file is used

Anthere commented 6 years ago

Awesome !

kelson42 commented 6 years ago

http://wikifundi-en.openzim.org/wiki/File:What_is_Wikipedia_Zero%3F.webm thumbnail is not OK (probably for a similar reason).

florentk commented 6 years ago

@kelson42 Is not for a similar reason, this seem be a bug of Convert caused by a special char ('?') , Because the file exist, but Convert cannot open

Error creating thumbnail: convert: unable to open image `/var/www/html/w/images/thumb/e/e4/What_is_Wikipedia_Zero\?.webm/1920px-seek=52-What_is_Wikipedia_Zero\?.webm.jpg': No such file or directory @ error/blob.c/OpenBlob/2701

This command not work if i launch it by hand

florentk commented 6 years ago

I tryed on my system (without Docker), I have the same bug :


$ convert -quality 80 -background white -define 'jpeg:size=300x169' '/var/opt/volumes/wikifundi/data-en/images/thumb/e/e4/What_is_Wikipedia_Zero\?.webm/1920px-seek=52-What_is_Wikipedia_Zero\?.webm.jpg' -thumbnail '300x169!' +set 'Thumb::URI' -depth 8 -sharpen '0x0.4' -rotate '-0' -sampling-factor '2x2,1x1,1x1' '/tmp/transform_d96f014f3964.jpg'
convert: impossible d'ouvrir l'image `/var/opt/volumes/wikifundi/data-en/images/thumb/e/e4/What_is_Wikipedia_Zero\?.webm/1920px-seek=52-What_is_Wikipedia_Zero\?.webm.jpg': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2712.
convert: pas d'images définies `/tmp/transform_d96f014f3964.jpg' @ error/convert.c/ConvertImageCommand/3210.

$ ls /var/opt/volumes/wikifundi/data-en/images/thumb/e/e4/What_is_Wikipedia_Zero\?.webm/1920px-seek=52-What_is_Wikipedia_Zero\?.webm.jpg
/var/opt/volumes/wikifundi/data-en/images/thumb/e/e4/What_is_Wikipedia_Zero?.webm/1920px-seek=52-What_is_Wikipedia_Zero?.webm.jpg
kelson42 commented 6 years ago

@florentk thank you for the investigation. Then we have an other reason to fix that bug I have open yesterday https://github.com/openzim/wikifundi/issues/72