[SERVER-6509] ignore SIGPIPE Created: 18/Jul/12  Updated: 11/Jul/16  Resolved: 23/Jul/12

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: 2.0.6, 2.2.0-rc0
Fix Version/s: 2.0.7, 2.0.8, 2.2.0-rc1

Type: Bug Priority: Major - P3
Reporter: Eric Milkie Assignee: Eric Milkie
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-6673 Piping a String to SSL enabled mongos... Closed
Operating System: Solaris
Participants:

 Description   

On Solaris, there is no mechanism to disable the delivery of SIGPIPE signals from disconnected sockets – we are making use of such a mechanism on other operating systems. Also, we are installing our dummy SIGPIPE handler using signal(), but the signal handler function seems to assume that it's being installed with sigaction().

We should just ignore SIGPIPEs for all OS's with signal(SIGPIPE, SIG_IGN);. Without this fix, you can crash Solaris mongod rather easily by just generating two socket client disconnects.



 Comments   
Comment by auto [ 15/Oct/12 ]

Author:

{u'date': u'2012-08-06T14:29:18-07:00', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: Ignore SIGPIPE on mongos. SERVER-6509 SERVER-6513

Was already ignoring on mongod, this just duplicated that behavior for mongos.

Conflicts:

s/server.cpp
Branch: v2.0
https://github.com/mongodb/mongo/commit/3d8d35771fedbfd5e5fac768112e2c143a940536

Comment by Spencer Brody (Inactive) [ 06/Aug/12 ]

Putting back to backport:yes for the mongos fix

Comment by auto [ 06/Aug/12 ]

Author:

{u'date': u'2012-08-06T14:29:18-07:00', u'email': u'spencer@10gen.com', u'name': u'Spencer T Brody'}

Message: Ignore SIGPIPE on mongos. SERVER-6509 SERVER-6513

Was already ignoring on mongod, this just duplicated that behavior for mongos.
Branch: master
https://github.com/mongodb/mongo/commit/d4e7fba488bc86f7f3c98523589fc09d7c88b65f

Comment by auto [ 27/Jul/12 ]

Author:

{u'date': u'2012-07-23T07:48:08-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-6509 ignore SIGPIPE rather than printing a message

Solaris was crashing because we were using signal() instead of sigaction()
to install the dummy signal handler for SIGPIPE. SIGPIPE is supressed
via the socket library on other operating systems but this is not an option
on Solaris.

Conflicts:
db/db.cpp
Branch: v2.0
https://github.com/mongodb/mongo/commit/6aa80782bc30162efb8f736863ed4b6bf2e94244

Comment by auto [ 23/Jul/12 ]

Author:

{u'date': u'2012-07-23T07:48:08-07:00', u'email': u'milkie@10gen.com', u'name': u'Eric Milkie'}

Message: SERVER-6509 ignore SIGPIPE rather than printing a message

Solaris was crashing because we were using signal() instead of sigaction()
to install the dummy signal handler for SIGPIPE. SIGPIPE is supressed
via the socket library on other operating systems but this is not an option
on Solaris.
Branch: master
https://github.com/mongodb/mongo/commit/f0eb14ac75719bb6bb17a8396f95c1030a8724cf

Generated at Thu Feb 08 03:11:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.