{"action":"created","issue":{"url":"https://api.github.com/repos/NEAT-project/neat/issues/237","repository_url":"https://api.github.com/repos/NEAT-project/neat","labels_url":"https://api.github.com/repos/NEAT-project/neat/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/NEAT-project/neat/issues/237/comments","events_url":"https://api.github.com/repos/NEAT-project/neat/issues/237/events","html_url":"https://github.com/NEAT-project/neat/issues/237","id":196421855,"number":237,"title":"SIGPIPE on server's sendmsg() call when client aborts connection","user":{"login":"dreibh","id":1830768,"avatar_url":"https://avatars.githubusercontent.com/u/1830768?v=3","gravatar_id":"","url":"https://api.github.com/users/dreibh","html_url":"https://github.com/dreibh","followers_url":"https://api.github.com/users/dreibh/followers","following_url":"https://api.github.com/users/dreibh/following{/other_user}","gists_url":"https://api.github.com/users/dreibh/gists{/gist_id}","starred_url":"https://api.github.com/users/dreibh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreibh/subscriptions","organizations_url":"https://api.github.com/users/dreibh/orgs","repos_url":"https://api.github.com/users/dreibh/repos","events_url":"https://api.github.com/users/dreibh/events{/privacy}","received_events_url":"https://api.github.com/users/dreibh/received_events","type":"User","site_admin":false},"labels":[{"id":198063305,"url":"https://api.github.com/repos/NEAT-project/neat/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-12-19T14:08:00Z","updated_at":"2016-12-20T12:45:42Z","closed_at":null,"body":"My test server aborts on SIGPIPE on sendmsg() in neat_core.c:4086 when the connection is aborted by the client:\r\n\r\n==21498== Process terminating with default action of signal 13 (SIGPIPE)\r\n==21498==    at 0x526D9BD: ??? (syscall-template.S:81)\r\n==21498==    by 0x504D87A: neat_write_to_lower_layer (neat_core.c:4086)\r\n==21498==    by 0x504DBAC: neat_write (neat_core.c:5293)\r\n==21498==    by 0x4E3BE73: neat_writev (neat-socketapi-io.c:47)\r\n==21498==    by 0x4E3BF2C: nsa_sendmsg (neat-socketapi-io.c:81)\r\n==21498==    by 0x4E3C296: nsa_write (neat-socketapi-io.c:202)\r\n==21498==    by 0x402A5C: handleHTTPCommand(int, unsigned int, char*) (httpserver2-select.cc:83)\r\n==21498==    by 0x403182: ClientList::handleEvent(ClientList::ClientListEntry*) (httpserver2-select.cc:234)\r\n==21498==    by 0x403034: ClientList::handleEvents(fd_set*) (httpserver2-select.cc:208)\r\n==21498==    by 0x40365C: main (httpserver2-select.cc:350)\r\n--21498-- Discarding syms at 0x7cdf2a0-0x7ce4eb3 in /lib/x86_64-linux-gnu/libnss_files-2.19.so due to munmap()\r\n\r\nI assume that NEAT should not abort when a client connection breaks, right? Calling sendmsg() with MSG_NOSIGNAL fixes the problem (at least under Linux, not sure about other systems)."},"comment":{"url":"https://api.github.com/repos/NEAT-project/neat/issues/comments/268234683","html_url":"https://github.com/NEAT-project/neat/issues/237#issuecomment-268234683","issue_url":"https://api.github.com/repos/NEAT-project/neat/issues/237","id":268234683,"user":{"login":"dreibh","id":1830768,"avatar_url":"https://avatars.githubusercontent.com/u/1830768?v=3","gravatar_id":"","url":"https://api.github.com/users/dreibh","html_url":"https://github.com/dreibh","followers_url":"https://api.github.com/users/dreibh/followers","following_url":"https://api.github.com/users/dreibh/following{/other_user}","gists_url":"https://api.github.com/users/dreibh/gists{/gist_id}","starred_url":"https://api.github.com/users/dreibh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreibh/subscriptions","organizations_url":"https://api.github.com/users/dreibh/orgs","repos_url":"https://api.github.com/users/dreibh/repos","events_url":"https://api.github.com/users/dreibh/events{/privacy}","received_events_url":"https://api.github.com/users/dreibh/received_events","type":"User","site_admin":false},"created_at":"2016-12-20T12:45:42Z","updated_at":"2016-12-20T12:45:42Z","body":"Created pull request with fix: https://github.com/NEAT-project/neat/pull/240"}}
{"actor":{"display_login":"dreibh"}}