On 3/20/09, Nelson B Bolyard <nel...@bolyard.me> wrote: > > John D wrote, On 2009-03-20 11:30: > > This is an issue involving sigfaults caused by broken pipes when using > > fast moving multithreaded libcurl NSS. The issue is that I am unaware of > > how to properly implement the correct signal handler or even to ignore > > the sigpipe and carry forward. My own code will correct for a sigpipe > > provided it can keep executing and not crash as it does now. > > > Program received signal SIGSEGV, Segmentation fault. > > [Switching to Thread -1272976464 (LWP 5789)] > > 0xb7a48a6b in NSSSSL_VersionCheck () from /usr/lib/libssl3.so.0d > > That's certainly not a sigpipe. The caller of that function has passed > an invalid pointer argument to the NSS function named above. The caller > that did that needs to be corrected. > > > All gdb tests show this is happening due to a sigpipe and while libcurl > > handles this with MSG_NOSIGNAL I am very eager to either make NSS do the > > same or provide for an equally effective solution. > > It would be inappropriate for NSS to defeat sigpipe's signal handler. > The handling of that signal is the responsibility of the application, > or code at a higher level than NSS. Perhaps it would be appropriate for > libcurl to do that. > -- > dev-tech-crypto mailing list > dev-tech-crypto@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-tech-crypto >
Hi Nelson Thank you for the insight. However, As my above response's stack trace will show it is indeed a sigpipe. Occasionally it is being represented as a seg fault yes, but this is really very likely all the same a broken pipe and only that. I am not so much looking for circumvention of any signal handling as much as just having some as libcurl to your point already does have. It is required as broken pipes are incredibly common, and any network protocol should be natively set to handle them. Again I might very well be missing something that exists already to allow this to be handled directly with NSS as it should be and is already done with in curl itself. John
-- dev-tech-crypto mailing list dev-tech-crypto@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-tech-crypto