{"action":"opened","issue":{"url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/1188","repository_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev","labels_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/1188/labels{/name}","comments_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/1188/comments","events_url":"https://api.github.com/repos/shadowsocks/shadowsocks-libev/issues/1188/events","html_url":"https://github.com/shadowsocks/shadowsocks-libev/issues/1188","id":205329332,"number":1188,"title":"ss-server Segmentation fault","user":{"login":"kimw","id":658250,"avatar_url":"https://avatars.githubusercontent.com/u/658250?v=3","gravatar_id":"","url":"https://api.github.com/users/kimw","html_url":"https://github.com/kimw","followers_url":"https://api.github.com/users/kimw/followers","following_url":"https://api.github.com/users/kimw/following{/other_user}","gists_url":"https://api.github.com/users/kimw/gists{/gist_id}","starred_url":"https://api.github.com/users/kimw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimw/subscriptions","organizations_url":"https://api.github.com/users/kimw/orgs","repos_url":"https://api.github.com/users/kimw/repos","events_url":"https://api.github.com/users/kimw/events{/privacy}","received_events_url":"https://api.github.com/users/kimw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-04T07:03:26Z","updated_at":"2017-02-04T07:03:26Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n### What version of shadowsocks-libev are you using?\r\n\r\nSince 3.0.0, till cb84aee1c98757a05d6298a200e1cb3c5aa1a44a. It works fine before v3.0.0\r\n\r\n### What operating system are you using?\r\n\r\nUbuntu Xenial on openvz.\r\n\r\n```bash\r\n$ lsb_release -a\r\nNo LSB modules are available.\r\nDistributor ID:\tUbuntu\r\nDescription:\tUbuntu 16.04.1 LTS\r\nRelease:\t16.04\r\nCodename:\txenial\r\n```\r\n\r\n### What did you do?\r\n\r\n2 sample verbose logs as shown below.\r\n\r\nlog 1,\r\n\r\n```bash\r\n$ ss-server -c config.json -u --acl server_block_chn.acl -v\r\n 2017-02-03 13:09:53 INFO: initializing acl...\r\n 2017-02-03 13:09:53 INFO: UDP relay enabled\r\n 2017-02-03 13:09:53 INFO: initializing ciphers... aes-256-cfb\r\n 2017-02-03 13:09:53 INFO: using nameserver: 8.8.8.8\r\n 2017-02-03 13:09:53 INFO: tcp server listening at 0.0.0.0:*port*\r\n 2017-02-03 13:09:53 INFO: udp server listening at 0.0.0.0:*port*\r\n 2017-02-03 13:12:04 INFO: accept a connection\r\n 2017-02-03 13:12:04 INFO: connect to 8.8.8.8:53\r\n 2017-02-03 13:12:04 INFO: remote connected\r\n 2017-02-03 13:12:05 INFO: server_recv close the connection\r\n 2017-02-03 13:12:05 INFO: current remote connection: 0\r\n 2017-02-03 13:12:05 INFO: current server connection: 0\r\n 2017-02-03 13:12:05 INFO: accept a connection\r\n 2017-02-03 13:12:05 INFO: connect to 8.8.8.8:53\r\n 2017-02-03 13:12:05 INFO: remote connected\r\n... (some more lines) ...\r\n 2017-02-03 13:22:33 INFO: server_recv close the connection\r\n 2017-02-03 13:22:33 INFO: current remote connection: 10\r\n 2017-02-03 13:22:33 INFO: current server connection: 10\r\n 2017-02-03 13:22:33 INFO: accept a connection\r\n 2017-02-03 13:22:33 INFO: connect to [635:7ef0:6c0a:cce1:5053:a1d8:d4dc:a2f2]:11318\r\n 2017-02-03 13:22:33 INFO: accept a connection\r\n 2017-02-03 13:22:33 INFO: connect to encrypted-tbn0.gstatic.com:443\r\n 2017-02-03 13:22:33 INFO: successfully resolved encrypted-tbn0.gstatic.com\r\n 2017-02-03 13:22:33 INFO: remote connected\r\n 2017-02-03 13:22:34 INFO: accept a connection\r\n 2017-02-03 13:22:34 INFO: connect to 74.125.199.188:5228\r\n 2017-02-03 13:22:34 INFO: remote connected\r\n 2017-02-03 13:22:34 INFO: accept a connection\r\nSegmentation fault\r\n```\r\n\r\nlog 2,\r\n\r\n```bash\r\n$ ss-server -c config.json -u --acl server_block_chn.acl -v\r\n 2017-02-03 15:07:33 INFO: initializing acl...\r\n 2017-02-03 15:07:33 INFO: UDP relay enabled\r\n 2017-02-03 15:07:33 INFO: initializing ciphers... aes-256-cfb\r\n 2017-02-03 15:07:33 INFO: using nameserver: 8.8.8.8\r\n 2017-02-03 15:07:33 INFO: tcp server listening at 0.0.0.0:*port*\r\n 2017-02-03 15:07:33 INFO: udp server listening at 0.0.0.0:*port*\r\n 2017-02-03 15:22:34 INFO: accept a connection\r\n 2017-02-03 15:22:34 INFO: connect to [635:7ef0:6c0a:cce1:5053:a1d8:d4dc:a2f2]:11318\r\n 2017-02-03 15:22:35 INFO: accept a connection\r\nSegmentation fault\r\n```\r\n\r\nAll 'Segmentation fault' were occurs at the time after a connection accepted.\r\n\r\nOne more thing, it's wired that there's another ss-server runs on another port without seg fault.\r\n\r\n### What is your config in detail (with all sensitive info masked)?\r\n\r\n```json\r\n{\r\n    \"server\":         \"0.0.0.0\",\r\n    \"server_port\":    \"a-4-long-number-in-number-format-without-quomarks\",\r\n    \"local_address\":  \"127.0.0.1\",\r\n    \"local_port\":     1080,\r\n    \"password\":       \"a-25-long-passphere-in-chars-and-digits\",\r\n    \"method\":         \"aes-256-cfb\",\r\n    \"timeout\":        60,\r\n    \"fast_open\":      false,\r\n    \"nameserver\":     \"8.8.8.8\",\r\n    \"mode\":           \"tcp_and_udp\",\r\n    \"mptcp\":          false\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"kimw"}}