[Haskell-cafe] ghc_ticker not checking return code?

Brandon Allbery allbery.b at gmail.com
Sun Jun 17 16:10:53 UTC 2018


I'd suspect it's mishandling the error return from a read(). Or not
handling, but if the error it gets back is for some reason EAGAIN then it's
kinda difficult to handle this sanely except by adding extra
instrumentation to catch the loop.

On Sun, Jun 17, 2018 at 5:28 AM Jon Fairbairn <jon.fairbairn at cl.cam.ac.uk>
wrote:

> I’ve just been rebuilding something I wrote ages ago, using
> stack with lts-11.6 (so that I can use a recent Conduit).
>
> Part (not a part I was modifying) of the code runs as a CGI
> script, and I was horrified to find that when run by httpd it
> soaked up CPU like nobody’s business without producing any
> output. Running it at the command line worked fine, so I traced
> the problem via audit:
>
> type=AVC msg=audit(1529223103.790:1705516): avc:  denied  { read } for
> pid=36764 comm="ghc_ticker" path="[timerfd]" dev=anon_inodefs ino=4597
> scontext=system_u:system_r:httpd_sys_script_t:s0
> tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file
> type=AVC msg=audit(1529223103.790:1705517): avc:  denied  { read } for
> pid=36764 comm="ghc_ticker" path="[timerfd]" dev=anon_inodefs ino=4597
> scontext=system_u:system_r:httpd_sys_script_t:s0
> tcontext=system_u:object_r:anon_inodefs_t:s0 tclass=file
>
> The solution is to add an audit rule to allow that, but surely
> ghc_ticker shouldn’t be trying again so fast when whatever it is
> trying to do isn’t permitted?
>
> I don’t know what component ghc_ticker belongs to, so where
> should I report the problem?
>
> --
> Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180617/ec11651d/attachment.html>


More information about the Haskell-Cafe mailing list