{"action":"created","comment":{"url":"https://api.github.com/repos/eclipse/openj9/pulls/comments/180715127","pull_request_review_id":111181677,"id":180715127,"diff_hunk":"@@ -4474,12 +4504,28 @@ JVM_RaiseSignal(jint sigNum)\n {\n \tjboolean rc = JNI_FALSE;\n \tJ9JavaVM *javaVM = (J9JavaVM *)BFUjavaVM;\n+\tBOOLEAN isShutdownSignal = isSignalUsedForShutdown(sigNum);\n \n \tTrc_SC_RaiseSignal_Entry(sigNum);\n \n-\tif (J9_ARE_ALL_BITS_SET(javaVM->sigFlags, J9_SIG_XRS)\n-\t\t\t&& isSignalSpecial(sigNum)) {\n-\t\t/* Ignore signal */\n+\tif (isSignalUsedByVM(sigNum)) {\n+\t\t/* JVM_RaiseSignal shouldn't raise synchronous signals such as SIGFPE,\n+\t\t * SIGILL and SIGSEGV. Based upon the spec, it should also not raise SIGQUIT.\n+\t\t */\n+\t} else if (J9_ARE_ALL_BITS_SET(javaVM->sigFlags, J9_SIG_XRS_ASYNC) && isShutdownSignal) {\n+\t\t/* Ignore all shutdown signals if -Xrs or -Xrs:async is specified. */","path":"runtime/j9vm/jvm.c","position":106,"original_position":106,"commit_id":"f71d6b4051790842807cfefb8940c1d0d7a29e4b","original_commit_id":"f71d6b4051790842807cfefb8940c1d0d7a29e4b","user":{"login":"pshipton","id":18122812,"avatar_url":"https://avatars1.githubusercontent.com/u/18122812?v=4","gravatar_id":"","url":"https://api.github.com/users/pshipton","html_url":"https://github.com/pshipton","followers_url":"https://api.github.com/users/pshipton/followers","following_url":"https://api.github.com/users/pshipton/following{/other_user}","gists_url":"https://api.github.com/users/pshipton/gists{/gist_id}","starred_url":"https://api.github.com/users/pshipton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pshipton/subscriptions","organizations_url":"https://api.github.com/users/pshipton/orgs","repos_url":"https://api.github.com/users/pshipton/repos","events_url":"https://api.github.com/users/pshipton/events{/privacy}","received_events_url":"https://api.github.com/users/pshipton/received_events","type":"User","site_admin":false},"body":"Note there is an explicit J9_SIG_NO_SIG_QUIT as well.\r\n```\r\n\t\tif (optionValue && 0 == strcmp(optionValue, \"sync\")) {\r\n\t\t\tvm->sigFlags |= J9_SIG_XRS_SYNC;\r\n\t\t\tsigOptions |= J9PORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS;\r\n\t\t} else if (optionValue && 0 == strcmp(optionValue, \"async\")) {\r\n\t\t\tvm->sigFlags |= (J9_SIG_XRS_ASYNC | J9_SIG_NO_SIG_QUIT);\r\n\t\t\tsigOptions |= J9PORT_SIG_OPTIONS_REDUCED_SIGNALS_ASYNCHRONOUS;\r\n\t\t} else {\r\n\t\t\tvm->sigFlags |= (J9_SIG_XRS_SYNC | J9_SIG_XRS_ASYNC | J9_SIG_NO_SIG_QUIT);\r\n\t\t\tsigOptions |= (J9PORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS | J9PORT_SIG_OPTIONS_REDUCED_SIGNALS_ASYNCHRONOUS);\r\n\t\t}\r\n```","created_at":"2018-04-11T11:05:26Z","updated_at":"2018-04-11T11:05:26Z","html_url":"https://github.com/eclipse/openj9/pull/1642#discussion_r180715127","pull_request_url":"https://api.github.com/repos/eclipse/openj9/pulls/1642","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/comments/180715127"},"html":{"href":"https://github.com/eclipse/openj9/pull/1642#discussion_r180715127"},"pull_request":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/1642"}},"in_reply_to_id":180713303},"pull_request":{"url":"https://api.github.com/repos/eclipse/openj9/pulls/1642","id":180419538,"html_url":"https://github.com/eclipse/openj9/pull/1642","diff_url":"https://github.com/eclipse/openj9/pull/1642.diff","patch_url":"https://github.com/eclipse/openj9/pull/1642.patch","issue_url":"https://api.github.com/repos/eclipse/openj9/issues/1642","number":1642,"state":"open","locked":false,"title":"Update JVM_*Signal functions","user":{"login":"babsingh","id":8634038,"avatar_url":"https://avatars1.githubusercontent.com/u/8634038?v=4","gravatar_id":"","url":"https://api.github.com/users/babsingh","html_url":"https://github.com/babsingh","followers_url":"https://api.github.com/users/babsingh/followers","following_url":"https://api.github.com/users/babsingh/following{/other_user}","gists_url":"https://api.github.com/users/babsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/babsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babsingh/subscriptions","organizations_url":"https://api.github.com/users/babsingh/orgs","repos_url":"https://api.github.com/users/babsingh/repos","events_url":"https://api.github.com/users/babsingh/events{/privacy}","received_events_url":"https://api.github.com/users/babsingh/received_events","type":"User","site_admin":false},"body":"1) Add a macro to reflect if a signal is ignored (`J9_SIG_IGNORED`).\r\n\r\n2) Rename function: `isSignalSpecial` to `isSignalUsedForShutdown`.\r\n\r\n3) Add function `isSignalIgnored` to check if a signal is ignored.\r\n\r\n4) Move `SIGQUIT` check from `isSignalUsedForShutdown` to `isSignalUsedByVM`.\r\n\r\n5) Update `JVM_RaiseSignal`: Ignore shutdown signals if `-Xrs` is present or\r\nif a shutdown signal is ignored. Ignore `SIGQUIT` if `-Xrs` is present.\r\n\r\n6) Update `JVM_RegisterSignal`: Add better comments. Return immediately\r\nfor error cases. Check for ignored shutdown signals. Use `sigemptyset` to\r\navoid blocking any signals. Set `SA_NODEFER` in `sigaction.sa_flags`.\r\n`SA_NODEFER` doesn't prevent the signal from being received from within\r\nits own signal handler.\r\n\r\n7) Fix `JVM_RegisterSignal` and `JVM_RaiseSignal` w.r.t `-Xrs`, `-Xrs:sync` and \r\n`-Xrs:async` cmdline options.\r\n\r\nSigned-off-by: Babneet Singh <sbabneet@ca.ibm.com>","created_at":"2018-04-09T20:33:52Z","updated_at":"2018-04-11T11:05:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2377206be2853780799417509fac4291bb6e3267","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":697962110,"url":"https://api.github.com/repos/eclipse/openj9/labels/comp:vm","name":"comp:vm","color":"1d76db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/eclipse/openj9/pulls/1642/commits","review_comments_url":"https://api.github.com/repos/eclipse/openj9/pulls/1642/comments","review_comment_url":"https://api.github.com/repos/eclipse/openj9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eclipse/openj9/issues/1642/comments","statuses_url":"https://api.github.com/repos/eclipse/openj9/statuses/f71d6b4051790842807cfefb8940c1d0d7a29e4b","head":{"label":"babsingh:fix_jvmsignal","ref":"fix_jvmsignal","sha":"f71d6b4051790842807cfefb8940c1d0d7a29e4b","user":{"login":"babsingh","id":8634038,"avatar_url":"https://avatars1.githubusercontent.com/u/8634038?v=4","gravatar_id":"","url":"https://api.github.com/users/babsingh","html_url":"https://github.com/babsingh","followers_url":"https://api.github.com/users/babsingh/followers","following_url":"https://api.github.com/users/babsingh/following{/other_user}","gists_url":"https://api.github.com/users/babsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/babsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babsingh/subscriptions","organizations_url":"https://api.github.com/users/babsingh/orgs","repos_url":"https://api.github.com/users/babsingh/repos","events_url":"https://api.github.com/users/babsingh/events{/privacy}","received_events_url":"https://api.github.com/users/babsingh/received_events","type":"User","site_admin":false},"repo":{"id":103547656,"name":"openj9","full_name":"babsingh/openj9","owner":{"login":"babsingh","id":8634038,"avatar_url":"https://avatars1.githubusercontent.com/u/8634038?v=4","gravatar_id":"","url":"https://api.github.com/users/babsingh","html_url":"https://github.com/babsingh","followers_url":"https://api.github.com/users/babsingh/followers","following_url":"https://api.github.com/users/babsingh/following{/other_user}","gists_url":"https://api.github.com/users/babsingh/gists{/gist_id}","starred_url":"https://api.github.com/users/babsingh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/babsingh/subscriptions","organizations_url":"https://api.github.com/users/babsingh/orgs","repos_url":"https://api.github.com/users/babsingh/repos","events_url":"https://api.github.com/users/babsingh/events{/privacy}","received_events_url":"https://api.github.com/users/babsingh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/babsingh/openj9","description":"OpenJ9","fork":true,"url":"https://api.github.com/repos/babsingh/openj9","forks_url":"https://api.github.com/repos/babsingh/openj9/forks","keys_url":"https://api.github.com/repos/babsingh/openj9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/babsingh/openj9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/babsingh/openj9/teams","hooks_url":"https://api.github.com/repos/babsingh/openj9/hooks","issue_events_url":"https://api.github.com/repos/babsingh/openj9/issues/events{/number}","events_url":"https://api.github.com/repos/babsingh/openj9/events","assignees_url":"https://api.github.com/repos/babsingh/openj9/assignees{/user}","branches_url":"https://api.github.com/repos/babsingh/openj9/branches{/branch}","tags_url":"https://api.github.com/repos/babsingh/openj9/tags","blobs_url":"https://api.github.com/repos/babsingh/openj9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/babsingh/openj9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/babsingh/openj9/git/refs{/sha}","trees_url":"https://api.github.com/repos/babsingh/openj9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/babsingh/openj9/statuses/{sha}","languages_url":"https://api.github.com/repos/babsingh/openj9/languages","stargazers_url":"https://api.github.com/repos/babsingh/openj9/stargazers","contributors_url":"https://api.github.com/repos/babsingh/openj9/contributors","subscribers_url":"https://api.github.com/repos/babsingh/openj9/subscribers","subscription_url":"https://api.github.com/repos/babsingh/openj9/subscription","commits_url":"https://api.github.com/repos/babsingh/openj9/commits{/sha}","git_commits_url":"https://api.github.com/repos/babsingh/openj9/git/commits{/sha}","comments_url":"https://api.github.com/repos/babsingh/openj9/comments{/number}","issue_comment_url":"https://api.github.com/repos/babsingh/openj9/issues/comments{/number}","contents_url":"https://api.github.com/repos/babsingh/openj9/contents/{+path}","compare_url":"https://api.github.com/repos/babsingh/openj9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/babsingh/openj9/merges","archive_url":"https://api.github.com/repos/babsingh/openj9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/babsingh/openj9/downloads","issues_url":"https://api.github.com/repos/babsingh/openj9/issues{/number}","pulls_url":"https://api.github.com/repos/babsingh/openj9/pulls{/number}","milestones_url":"https://api.github.com/repos/babsingh/openj9/milestones{/number}","notifications_url":"https://api.github.com/repos/babsingh/openj9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/babsingh/openj9/labels{/name}","releases_url":"https://api.github.com/repos/babsingh/openj9/releases{/id}","deployments_url":"https://api.github.com/repos/babsingh/openj9/deployments","created_at":"2017-09-14T15:12:26Z","updated_at":"2018-04-11T03:16:38Z","pushed_at":"2018-04-11T04:44:26Z","git_url":"git://github.com/babsingh/openj9.git","ssh_url":"git@github.com:babsingh/openj9.git","clone_url":"https://github.com/babsingh/openj9.git","svn_url":"https://github.com/babsingh/openj9","homepage":null,"size":28603,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"eclipse:master","ref":"master","sha":"4ecf784684dad533a04192647c5fb3ca7e8864da","user":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"repo":{"id":101408117,"name":"openj9","full_name":"eclipse/openj9","owner":{"login":"eclipse","id":56974,"avatar_url":"https://avatars1.githubusercontent.com/u/56974?v=4","gravatar_id":"","url":"https://api.github.com/users/eclipse","html_url":"https://github.com/eclipse","followers_url":"https://api.github.com/users/eclipse/followers","following_url":"https://api.github.com/users/eclipse/following{/other_user}","gists_url":"https://api.github.com/users/eclipse/gists{/gist_id}","starred_url":"https://api.github.com/users/eclipse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eclipse/subscriptions","organizations_url":"https://api.github.com/users/eclipse/orgs","repos_url":"https://api.github.com/users/eclipse/repos","events_url":"https://api.github.com/users/eclipse/events{/privacy}","received_events_url":"https://api.github.com/users/eclipse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/eclipse/openj9","description":"Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput.   Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.","fork":false,"url":"https://api.github.com/repos/eclipse/openj9","forks_url":"https://api.github.com/repos/eclipse/openj9/forks","keys_url":"https://api.github.com/repos/eclipse/openj9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eclipse/openj9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eclipse/openj9/teams","hooks_url":"https://api.github.com/repos/eclipse/openj9/hooks","issue_events_url":"https://api.github.com/repos/eclipse/openj9/issues/events{/number}","events_url":"https://api.github.com/repos/eclipse/openj9/events","assignees_url":"https://api.github.com/repos/eclipse/openj9/assignees{/user}","branches_url":"https://api.github.com/repos/eclipse/openj9/branches{/branch}","tags_url":"https://api.github.com/repos/eclipse/openj9/tags","blobs_url":"https://api.github.com/repos/eclipse/openj9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eclipse/openj9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eclipse/openj9/git/refs{/sha}","trees_url":"https://api.github.com/repos/eclipse/openj9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eclipse/openj9/statuses/{sha}","languages_url":"https://api.github.com/repos/eclipse/openj9/languages","stargazers_url":"https://api.github.com/repos/eclipse/openj9/stargazers","contributors_url":"https://api.github.com/repos/eclipse/openj9/contributors","subscribers_url":"https://api.github.com/repos/eclipse/openj9/subscribers","subscription_url":"https://api.github.com/repos/eclipse/openj9/subscription","commits_url":"https://api.github.com/repos/eclipse/openj9/commits{/sha}","git_commits_url":"https://api.github.com/repos/eclipse/openj9/git/commits{/sha}","comments_url":"https://api.github.com/repos/eclipse/openj9/comments{/number}","issue_comment_url":"https://api.github.com/repos/eclipse/openj9/issues/comments{/number}","contents_url":"https://api.github.com/repos/eclipse/openj9/contents/{+path}","compare_url":"https://api.github.com/repos/eclipse/openj9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eclipse/openj9/merges","archive_url":"https://api.github.com/repos/eclipse/openj9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eclipse/openj9/downloads","issues_url":"https://api.github.com/repos/eclipse/openj9/issues{/number}","pulls_url":"https://api.github.com/repos/eclipse/openj9/pulls{/number}","milestones_url":"https://api.github.com/repos/eclipse/openj9/milestones{/number}","notifications_url":"https://api.github.com/repos/eclipse/openj9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eclipse/openj9/labels{/name}","releases_url":"https://api.github.com/repos/eclipse/openj9/releases{/id}","deployments_url":"https://api.github.com/repos/eclipse/openj9/deployments","created_at":"2017-08-25T13:46:07Z","updated_at":"2018-04-11T01:17:05Z","pushed_at":"2018-04-11T04:44:27Z","git_url":"git://github.com/eclipse/openj9.git","ssh_url":"git@github.com:eclipse/openj9.git","clone_url":"https://github.com/eclipse/openj9.git","svn_url":"https://github.com/eclipse/openj9","homepage":"","size":28582,"stargazers_count":1228,"watchers_count":1228,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":239,"mirror_url":null,"archived":false,"open_issues_count":317,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":239,"open_issues":317,"watchers":1228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/1642"},"html":{"href":"https://github.com/eclipse/openj9/pull/1642"},"issue":{"href":"https://api.github.com/repos/eclipse/openj9/issues/1642"},"comments":{"href":"https://api.github.com/repos/eclipse/openj9/issues/1642/comments"},"review_comments":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/1642/comments"},"review_comment":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eclipse/openj9/pulls/1642/commits"},"statuses":{"href":"https://api.github.com/repos/eclipse/openj9/statuses/f71d6b4051790842807cfefb8940c1d0d7a29e4b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"pshipton"}}