[Bug 27151] New: SIP2 server doesn't handle broken connections which then kills SIP2 server
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Bug ID: 27151 Summary: SIP2 server doesn't handle broken connections which then kills SIP2 server Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: SIP2 Assignee: koha-bugs@lists.koha-community.org Reporter: joonas.kylmala@helsinki.fi QA Contact: testopia@bugs.koha-community.org CC: colin.campbell@ptfs-europe.com Koha SIP2 server doesn't handle the situation where a client unexpectedly closes socket, this leads to the SIP2 server processes being killed and therefore SIP2 service being unavailable. sip-error.log when this happens: koha3-koha-sip: client (pid 1181) killed by signal 13, stopping More info on this issue I found from the perl website manual (https://perldoc.perl.org/perlipc): "Be careful to check the return values from both open() and close(). If you're writing to a pipe, you should also trap SIGPIPE. [...]" Another problem we have is that the koha-common service doesn't start the process if it gets killed, but let's focus here only on the SIGPIPE issue. This has happened now 2 times in around 1 month period on our Koha SIP instances. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Andrew Nugged <nugged@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nugged@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Would the following change work? diff --git a/C4/SIP/SIPServer.pm b/C4/SIP/SIPServer.pm index 8d5be71624..36d7606b0b 100644 --- a/C4/SIP/SIPServer.pm +++ b/C4/SIP/SIPServer.pm @@ -28,6 +28,8 @@ use base qw(Net::Server::PreFork); use constant LOG_SIP => "local6"; # Local alias for the logging facility +$SIG{PIPE} = "IGNORE"; + # # Main # not really, since package SIPServer # -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Joonas, by any chances, did you try what I suggested in the previous comment? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 --- Comment #3 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- (In reply to Jonathan Druart from comment #2)
Joonas, by any chances, did you try what I suggested in the previous comment?
I have not tried it but it should fix the problem at least cosmetically. I need to investigate what side effects it will have first if any, for example whether it will cause a process to hang and when there is a max sip server processes defined will we run out of those after a period of time. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Joonas Kylmälä <joonas.kylmala@helsinki.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |unspecified Severity|critical |normal --- Comment #4 from Joonas Kylmälä <joonas.kylmala@helsinki.fi> --- This hasn't happened in a long time and I don't know if it happens anymore with latest master. I think this could be closed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Londhe A <iamalon1434@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iamalon1434@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27151 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org