{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/11553","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/11553/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/11553/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/11553/events","html_url":"https://github.com/JuliaLang/julia/issues/11553","id":84335498,"number":11553,"title":"Floating point exceptions which seems to be causing the CI EOFError on linux recently","user":{"login":"yuyichao","id":712232,"avatar_url":"https://avatars.githubusercontent.com/u/712232?v=3","gravatar_id":"","url":"https://api.github.com/users/yuyichao","html_url":"https://github.com/yuyichao","followers_url":"https://api.github.com/users/yuyichao/followers","following_url":"https://api.github.com/users/yuyichao/following{/other_user}","gists_url":"https://api.github.com/users/yuyichao/gists{/gist_id}","starred_url":"https://api.github.com/users/yuyichao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuyichao/subscriptions","organizations_url":"https://api.github.com/users/yuyichao/orgs","repos_url":"https://api.github.com/users/yuyichao/repos","events_url":"https://api.github.com/users/yuyichao/events{/privacy}","received_events_url":"https://api.github.com/users/yuyichao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/priority","name":"priority","color":"7b07ce"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-03T03:28:05Z","updated_at":"2015-06-03T07:01:10Z","closed_at":"2015-06-03T06:45:30Z","body":"With the patch below (the `/dev/tty` part might not be necessary) I've got the following backtrace on a machine that can reproduce the `EOFError` issue (or what looks like it)\r\n\r\n```\r\nsignal (8): Floating point exception\r\n__gmp_exception at /usr/lib/libgmp.so (unknown line)\r\nunknown function (ip: 1705129166)\r\n__gmpz_powm at /usr/lib/libgmp.so (unknown line)\r\npowermod at ./gmp.jl:424\r\npowermod at ./gmp.jl:430\r\nunknown function (ip: 1399079124)\r\njl_apply_generic at /home/yuyichao/project/julia/src/gf.c:1663\r\nanonymous at ./test.jl:105\r\ndo_test_throws at ./test.jl:59\r\njl_apply_generic at /home/yuyichao/project/julia/src/gf.c:1663\r\ndo_call at /home/yuyichao/project/julia/src/interpreter.c:66\r\neval at /home/yuyichao/project/julia/src/interpreter.c:212\r\njl_toplevel_eval_flex at /home/yuyichao/project/julia/src/toplevel.c:539\r\njl_toplevel_eval_flex at /home/yuyichao/project/julia/src/toplevel.c:568\r\njl_load at /home/yuyichao/project/julia/src/toplevel.c:615\r\ninclude at ./boot.jl:253\r\njl_apply_generic at /home/yuyichao/project/julia/src/gf.c:1663\r\nruntests at /home/yuyichao/project/julia/test/testdefs.jl:198\r\nunknown function (ip: 1711445219)\r\njl_apply_generic at /home/yuyichao/project/julia/src/gf.c:1663\r\njl_f_apply at /home/yuyichao/project/julia/src/builtins.c:473\r\nanonymous at ./multi.jl:854\r\nrun_work_thunk at ./multi.jl:605\r\njl_apply_generic at /home/yuyichao/project/julia/src/gf.c:1663\r\nanonymous at ./multi.jl:854\r\nstart_task at /home/yuyichao/project/julia/src/task.c:234\r\nunknown function (ip: 0)\r\n```\r\n\r\n```diff\r\ndiff --git a/src/init.c b/src/init.c\r\nindex 06a58c7..a394b31 100644\r\n--- a/src/init.c\r\n+++ b/src/init.c\r\n@@ -249,6 +249,12 @@ static int is_addr_on_stack(void *addr)\r\n \r\n void sigdie_handler(int sig, siginfo_t *info, void *context)\r\n {\r\n+    int fd = open(\"/dev/tty\", O_RDWR);\r\n+    int oldfd1 = dup(1);\r\n+    int oldfd2 = dup(2);\r\n+    dup2(fd, 1);\r\n+    dup2(fd, 2);\r\n+    close(fd);\r\n     if (sig != SIGINFO) {\r\n         sigset_t sset;\r\n         uv_tty_reset_mode();\r\n@@ -269,6 +275,10 @@ void sigdie_handler(int sig, siginfo_t *info, void *context)\r\n         sig != SIGINFO) {\r\n         raise(sig);\r\n     }\r\n+    dup2(oldfd1, 1);\r\n+    dup2(oldfd2, 2);\r\n+    close(oldfd1);\r\n+    close(oldfd2);\r\n }\r\n #endif\r\n \r\n@@ -1201,6 +1211,9 @@ void jl_install_default_signal_handlers(void)\r\n     sigemptyset(&act_die.sa_mask);\r\n     act_die.sa_sigaction = sigdie_handler;\r\n     act_die.sa_flags = SA_SIGINFO;\r\n+    for (int i = 0;i < 32;i++) {\r\n+        sigaction(i, &act_die, NULL);\r\n+    }\r\n     if (sigaction(SIGINFO, &act_die, NULL) < 0) {\r\n         jl_errorf(\"fatal error: sigaction: %s\\n\", strerror(errno));\r\n     }\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/108218891","html_url":"https://github.com/JuliaLang/julia/issues/11553#issuecomment-108218891","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/11553","id":108218891,"user":{"login":"tkelman","id":5934628,"avatar_url":"https://avatars.githubusercontent.com/u/5934628?v=3","gravatar_id":"","url":"https://api.github.com/users/tkelman","html_url":"https://github.com/tkelman","followers_url":"https://api.github.com/users/tkelman/followers","following_url":"https://api.github.com/users/tkelman/following{/other_user}","gists_url":"https://api.github.com/users/tkelman/gists{/gist_id}","starred_url":"https://api.github.com/users/tkelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkelman/subscriptions","organizations_url":"https://api.github.com/users/tkelman/orgs","repos_url":"https://api.github.com/users/tkelman/repos","events_url":"https://api.github.com/users/tkelman/events{/privacy}","received_events_url":"https://api.github.com/users/tkelman/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T07:01:10Z","updated_at":"2015-06-03T07:01:10Z","body":"Well it looks like instead of propagating the return code of child processes we're ending up with `EOFError` so something isn't working right. I've never used `dmesg` before but I'll make a test branch `tk/dmesg` where I output that at the end of Travis, see what happens."}}