Added a comment
This commit is contained in:
parent
936809cec2
commit
5491b47d14
1 changed files with 26 additions and 0 deletions
|
@ -0,0 +1,26 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="http://joeyh.name/"
|
||||||
|
ip="209.250.56.163"
|
||||||
|
subject="comment 15"
|
||||||
|
date="2014-02-08T20:56:10Z"
|
||||||
|
content="""
|
||||||
|
I think you need to find which calls to setSocketOption are failing and/or what value is causing the crash. It's a bit of a pain to get a backtrace on error (would need to build everything with profiling enabled and run git-annex with +RTS -xc options). Probably simplest to modify the setSocketOption code:
|
||||||
|
|
||||||
|
[[!format patch \"\"\"
|
||||||
|
diff --git a/Network/Socket.hsc b/Network/Socket.hsc
|
||||||
|
index 2fe62ee..0c66432 100644
|
||||||
|
--- a/Network/Socket.hsc
|
||||||
|
+++ b/Network/Socket.hsc
|
||||||
|
@@ -963,7 +963,7 @@ setSocketOption :: Socket
|
||||||
|
setSocketOption (MkSocket s _ _ _ _) so v = do
|
||||||
|
(level, opt) <- packSocketOption' \"setSocketOption\" so
|
||||||
|
with (fromIntegral v) $ \ptr_v -> do
|
||||||
|
- throwSocketErrorIfMinus1_ \"setSocketOption\" $
|
||||||
|
+ throwSocketErrorIfMinus1_ (\"setSocketOption \" ++ show so ++ \" \" ++ show v) $
|
||||||
|
c_setsockopt s level opt ptr_v
|
||||||
|
(fromIntegral (sizeOf (undefined :: CInt)))
|
||||||
|
return ()
|
||||||
|
\"\"\"]]
|
||||||
|
|
||||||
|
Which should make it print out a quite nice symbolic name of the option being used on failure, which will make it easy to find any call sites and more importantly, determine what's wrong with that option.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue