bigbluebutton / bigbluebutton

Complete open source web conferencing system.
https://bigbluebutton.org
GNU Lesser General Public License v3.0
8.56k stars 5.96k forks source link

java.io.IOException: Cannot run program "pdfseparate": error=0, Failed to exec spawn helper: pid: 3145134, signal: 11 #20078

Open GhaziTriki opened 6 months ago

GhaziTriki commented 6 months ago

Describe the bug A Java Exception occured preventing presentations from being converted. The issue disappeared after doing bbb-conf --restart

Expected behavior There should be no Java Exception.

Possible solution Launch bbb-web with JVM option -Djdk.lang.Process.launchMechanism=vfork

https://stackoverflow.com/questions/76003646/how-to-fix-java-cannot-run-program-in-directory-error-0-failed

BigBlueButton Server BigBlueButton 2.6.16

Additional context

java.io.IOException: Cannot run program "pdfseparate": error=0, Failed to exec spawn helper: pid: 3145134, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.PageExtractorImp.extractPage(PageExtractorImp.java:37)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractPage(PresentationFileProcessor.java:151)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractIntoPages(PresentationFileProcessor.java:97)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.processUploadedPresentation(PresentationFileProcessor.java:83)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor$1.run(PresentationFileProcessor.java:62)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145134, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 13 common frames omitted
2024-04-24T16:19:52.796+04:00 ERROR o.b.p.imp.ExternalProcessExecutor - Failed to execute: pdfseparate -f 2 -l 2 /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138.pdf /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/extracted-2.pdf
java.io.IOException: Cannot run program "pdfseparate": error=0, Failed to exec spawn helper: pid: 3145136, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.PageExtractorImp.extractPage(PageExtractorImp.java:37)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractPage(PresentationFileProcessor.java:151)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractIntoPages(PresentationFileProcessor.java:97)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.processUploadedPresentation(PresentationFileProcessor.java:83)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor$1.run(PresentationFileProcessor.java:62)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145136, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 13 common frames omitted
2024-04-24T16:19:52.796+04:00 ERROR o.b.p.imp.ExternalProcessExecutor - Failed to execute: pdftocairo -png -scale-to 150 -cropbox /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/page-1.pdf /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/thumbnails/temp-thumb-1
java.io.IOException: Cannot run program "pdftocairo": error=0, Failed to exec spawn helper: pid: 3145137, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.ThumbnailCreatorImp.generateThumbnail(ThumbnailCreatorImp.java:91)
    at org.bigbluebutton.presentation.imp.ThumbnailCreatorImp.createThumbnail(ThumbnailCreatorImp.java:58)
    at org.bigbluebutton.presentation.imp.PageToConvert.createThumbnails(PageToConvert.java:98)
    at org.bigbluebutton.presentation.imp.PageToConvert.convert(PageToConvert.java:75)
    at org.bigbluebutton.presentation.imp.PdfSlidesGenerationService$1.run(PdfSlidesGenerationService.java:45)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145137, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 11 common frames omitted
2024-04-24T16:19:52.796+04:00 WARN  o.b.p.imp.ThumbnailCreatorImp -  --analytics-- data={"filename":"default.pdf","logCode":"create_thumbnails_failed","meetingId":"35f252faf243b13240e69155a811f44b898153b9-1713961187137","page":1,"message":"Failed to create thumbnails.","presId":"91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138"}
2024-04-24T16:19:52.797+04:00 INFO  o.b.p.imp.ThumbnailCreatorImp - Copying blank thumbnail for slide 1
2024-04-24T16:19:52.894+04:00 ERROR o.b.p.imp.ExternalProcessExecutor - Failed to execute: pdftotext -raw -nopgbrk -enc UTF-8 -f 1 -l 1 /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138.pdf /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/textfiles/slide-1.txt
java.io.IOException: Cannot run program "pdftotext": error=0, Failed to exec spawn helper: pid: 3145142, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.TextFileCreatorImp.generateTextFile(TextFileCreatorImp.java:100)
    at org.bigbluebutton.presentation.imp.TextFileCreatorImp.createTextFile(TextFileCreatorImp.java:50)
    at org.bigbluebutton.presentation.imp.PageToConvert.createTextFiles(PageToConvert.java:103)
    at org.bigbluebutton.presentation.imp.PageToConvert.convert(PageToConvert.java:77)
    at org.bigbluebutton.presentation.imp.PdfSlidesGenerationService$1.run(PdfSlidesGenerationService.java:45)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145142, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 11 common frames omitted
2024-04-24T16:19:52.894+04:00 WARN  o.b.p.imp.TextFileCreatorImp -  --analytics-- data={"filename":"default.pdf","logCode":"create_txt_files_failed","meetingId":"35f252faf243b13240e69155a811f44b898153b9-1713961187137","message":"Failed to create text files.","presId":"91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138"}
2024-04-24T16:19:52.927+04:00 ERROR o.b.p.imp.ExternalProcessExecutor - Failed to execute: pdfseparate -f 3 -l 3 /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138.pdf /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/extracted-3.pdf
java.io.IOException: Cannot run program "pdfseparate": error=0, Failed to exec spawn helper: pid: 3145140, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.PageExtractorImp.extractPage(PageExtractorImp.java:37)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractPage(PresentationFileProcessor.java:151)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.extractIntoPages(PresentationFileProcessor.java:97)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor.processUploadedPresentation(PresentationFileProcessor.java:83)
    at org.bigbluebutton.presentation.imp.PresentationFileProcessor$1.run(PresentationFileProcessor.java:62)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145140, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 13 common frames omitted
2024-04-24T16:19:52.927+04:00 ERROR o.b.p.imp.ExternalProcessExecutor - Failed to execute: pdftocairo -png -scale-to 150 -cropbox /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/page-2.pdf /var/bigbluebutton/35f252faf243b13240e69155a811f44b898153b9-1713961187137/35f252faf243b13240e69155a811f44b898153b9-1713961187137/91d6f48714ff9f18756ed2e1093b01a633b89506-1713961187138/thumbnails/temp-thumb-2
java.io.IOException: Cannot run program "pdftocairo": error=0, Failed to exec spawn helper: pid: 3145141, signal: 11
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:76)
    at org.bigbluebutton.presentation.imp.ExternalProcessExecutor.exec(ExternalProcessExecutor.java:58)
    at org.bigbluebutton.presentation.imp.ThumbnailCreatorImp.generateThumbnail(ThumbnailCreatorImp.java:91)
    at org.bigbluebutton.presentation.imp.ThumbnailCreatorImp.createThumbnail(ThumbnailCreatorImp.java:58)
    at org.bigbluebutton.presentation.imp.PageToConvert.createThumbnails(PageToConvert.java:98)
    at org.bigbluebutton.presentation.imp.PageToConvert.convert(PageToConvert.java:75)
    at org.bigbluebutton.presentation.imp.PdfSlidesGenerationService$1.run(PdfSlidesGenerationService.java:45)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.IOException: error=0, Failed to exec spawn helper: pid: 3145141, signal: 11
    at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:314)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
    ... 11 common frames omitted
ffdixon commented 6 months ago

Using vfork should yield better performance. Is this impetus behind trying out this parameter?

GhaziTriki commented 6 months ago

Indeed vfork can lead to better performance and reduced memory overhead. I am not against the JVM config update but it would require intensive testing to avoid unforeseen issues or conflicts. Maybe 3.0.0 is the right target for a such update.

slovdahl commented 5 months ago

This is likely caused by the JDK being upgraded (e.g. by Ubuntu's unattended-upgrades) without the JVM process being restarted. See https://bugs.launchpad.net/ubuntu/+source/openjdk-17/+bug/2055280 for a discussion about a similarly looking problem. https://bugs.openjdk.org/browse/JDK-8325567 also has a fair share of discussion about it.

TL;DR: one should never update the JDK without restarting all JVM processes.

slovdahl commented 5 months ago

FWIW, vfork is eventually going away according to https://bugs.openjdk.org/browse/JDK-8214511.

slovdahl commented 5 months ago

And also, it looks like this will become a permanent feature of the JDK going forward. Any minor update will be considered a breaking change as of https://bugs.openjdk.org/browse/JDK-8325621. It will be part of the upcoming 21.0.4, but has not yet been backported to 17.

antobinary commented 5 months ago

Thank you for these updates, @slovdahl !