https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26854 Bug ID: 26854 Summary: stage-marc-import.pl does not properly fork Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: MARC Bibliographic record staging/import Assignee: koha-bugs@lists.koha-community.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org When stage-marc-import.pl forks, the child process closes STDOUT, but it does not close STDERR, which is also connected to the Apache httpd parent process. This means that the parent stage-marc-import.pl process becomes a zombie process, as Apache httpd (apache2 2.4.25 Debian 9 && apache2 2.4.29 Ubuntu 18.04 && apache2 2.4.33 openSUSE Leap 15.1) does not reap it, as you can see below: kohadev+ 32716 32712 74 02:17 ? 00:00:26 [stage-marc-impo] <defunct> kohadev+ 32725 1 28 02:18 ? 00:00:02 /usr/bin/perl /kohadevbox/koha/tools/stage-marc-import.pl The above happens when running CGI-only Koha or Plack-enabled Koha which does not proxy stage-marc-import.pl. Across 3 different Koha instances, I am experiencing different outcomes in the web browser, although ultimately the forked child process does stage the records (unless bug 26853 occurs). -- That said, I have noticed something interesting. On openSUSE with CGI, I'm seeing a 200 in the browser, although the AJAX request does not complete, so the polling of background-job-progress.pl does not happen. On Ubuntu 18.04 with Plack, Apache returns a 502 to the browser. On Debian 9 with Plack (koha-testing-docker), no status is returned but it doesn't timeout. Possibly differences include different Apache httpd behaviour and different Apache configuration. If we fix this issue, I think that we'll find that behaviour across the different instances becomes more consistent. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.