Forum How do I...?

Signals delivery fails constantly at GC #1

thomasdumm
Does the error message on Linux mean anything to you:

Signals delivery fails constantly at GC #1

Seeing this message when calling princexml with an input file that is fed over https in a looged in state.
mikeday
Which version of Prince are you running, on which distro, which package is installed, and how is Prince being invoked? (e.g. through one of the wrappers, from the shell, what is the parent process?)
thomasdumm
I am running it with Pressbooks. It used to run well. But after a system update it stopped running. It is still working when I execute the command with CLI. I suspect some permission issue, but I just cannot find it. I posted it here in case somebody else had the same issue and rembemers solution.


Edited by thomasdumm

mikeday
We have had signals issues under PHP some years ago but they were already fixed, can you check which version of Ubuntu, the webserver (Apache?) and the PHP version and how it is being run (Apache module?) as this will help us to reproduce the problem.
thomasdumm
We use Prince Prince 15.4 on FreeBSD 13.3-RELEASE-p6 and PHP 8.1.29.

Prince is called via the wrapper https://github.com/gridonic/PrinceXMLPhp.

Specifically here https://github.com/gridonic/PrinceXMLPhp/blob/master/lib/prince.php, on line 984 via the PHP function proc_open.
mikeday
Thanks, so is PHP running under the Apache webserver do you know?
thomasdumm
yes, Apache.
Apache 2.0 Handler Ian Holsman, Justin Erenkrantz (based on Apache 2.0 Filter code)

and: CGI/FastCGI

Edited by thomasdumm

thomasdumm
PS: Is it better to use the wrapper https://github.com/yeslogic/prince-php-wrapper/blob/master/src/Prince.php than https://github.com/gridonic/PrinceXMLPhp/blob/master/lib/prince.php ? I do not remember how/why gridonic version was installed instead of yeslogic. Could this be the cause of the issue we are facing?
mikeday
I don't think the wrapper is affecting the behaviour of signals, perhaps there is an issue on FreeBSD we have not encountered before, we will investigate.
thomasdumm
I also doubt that it is a wrapper issue.

Signals delivery fails constantly at GC #1
Signals delivery fails constantly

Edited by thomasdumm

thomasdumm
In case this helps to reproduce the issue:

The following command is successful when using it with CLI.
Using proc_open from php wrapper leads to the error: Signals delivery constantly fails at GC #1

"/home/server-dependencies/prince154/out/bin/prince" "https://prince-testpage-7ed982.gitlab.io" -o "/home/download/test/o.pdf" --verbose -- insecure

Edited by thomasdumm

mikeday
We have found that there is a known signals issue with Boehm GC when running on FreeBSD, so we will create an updated Prince build next week and see if this fixes the problem.
thomasdumm
Thank you for looking into this
thomasdumm
Have you already been able find a workaround for the Boehm GC issue?
mikeday
We have a new latest build (20240920) which includes some changes for FreeBSD, can you please try this and see if it fixes the issue?
thomasdumm
Thank you! We will test and report the test result.
thomasdumm
The latest build 20240920 resolved the signals issue for us. Thank you very much!
mikeday
Great! We have also released Prince 15.4.2 builds for FreeBSD that include the fix.