{"action":"created","issue":{"url":"https://api.github.com/repos/sysown/proxysql/issues/534","repository_url":"https://api.github.com/repos/sysown/proxysql","labels_url":"https://api.github.com/repos/sysown/proxysql/issues/534/labels{/name}","comments_url":"https://api.github.com/repos/sysown/proxysql/issues/534/comments","events_url":"https://api.github.com/repos/sysown/proxysql/issues/534/events","html_url":"https://github.com/sysown/proxysql/issues/534","id":148326120,"number":534,"title":"Fix signal handler","user":{"login":"elfring","id":660477,"avatar_url":"https://avatars.githubusercontent.com/u/660477?v=3","gravatar_id":"","url":"https://api.github.com/users/elfring","html_url":"https://github.com/elfring","followers_url":"https://api.github.com/users/elfring/followers","following_url":"https://api.github.com/users/elfring/following{/other_user}","gists_url":"https://api.github.com/users/elfring/gists{/gist_id}","starred_url":"https://api.github.com/users/elfring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elfring/subscriptions","organizations_url":"https://api.github.com/users/elfring/orgs","repos_url":"https://api.github.com/users/elfring/repos","events_url":"https://api.github.com/users/elfring/events{/privacy}","received_events_url":"https://api.github.com/users/elfring/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-14T11:07:19Z","updated_at":"2016-04-14T16:44:12Z","closed_at":null,"body":"The function \"[fprintf](http://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html \"Print formatted output\")\" does not belong to the list of [async-signal-safe functions](https://www.securecoding.cert.org/confluence/display/c/SIG30-C.+Call+only+asynchronous-safe+functions+within+signal+handlers \"Call only asynchronous-safe functions within signal handlers.\").\r\nI guess that a different program design will be needed for your function \"[crash_handler](https://github.com/sysown/proxysql/blob/96ad3019d7ab7175e3bfdc8781c2e8d8cdfa8b44/lib/ProxySQL_GloVars.cpp#L15 \"Reconsider signal handling implementation\")\"."},"comment":{"url":"https://api.github.com/repos/sysown/proxysql/issues/comments/210043475","html_url":"https://github.com/sysown/proxysql/issues/534#issuecomment-210043475","issue_url":"https://api.github.com/repos/sysown/proxysql/issues/534","id":210043475,"user":{"login":"renecannao","id":3645227,"avatar_url":"https://avatars.githubusercontent.com/u/3645227?v=3","gravatar_id":"","url":"https://api.github.com/users/renecannao","html_url":"https://github.com/renecannao","followers_url":"https://api.github.com/users/renecannao/followers","following_url":"https://api.github.com/users/renecannao/following{/other_user}","gists_url":"https://api.github.com/users/renecannao/gists{/gist_id}","starred_url":"https://api.github.com/users/renecannao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renecannao/subscriptions","organizations_url":"https://api.github.com/users/renecannao/orgs","repos_url":"https://api.github.com/users/renecannao/repos","events_url":"https://api.github.com/users/renecannao/events{/privacy}","received_events_url":"https://api.github.com/users/renecannao/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T16:44:12Z","updated_at":"2016-04-14T16:44:12Z","body":"That's correct, and also [backtrace_symbols_fd](https://github.com/sysown/proxysql/blob/96ad3019d7ab7175e3bfdc8781c2e8d8cdfa8b44/lib/ProxySQL_GloVars.cpp#L25) is not async-signal-safe , it even calls malloc() internally afaik.\r\nBut as this is a crash handler and it is just trying to dump some information before aborting, does it really matter?"}}