Skip to content

SQSMessageConsumer causes ForkJoinPool.commonPool-worker java.security.AccessControlException #64

@yzhang-okta

Description

@yzhang-okta

@adam-aws Using amazon-sqs-java-temporary-queues-client for two way sqs communication. got this.

Sometimes, https://github.com/awslabs/amazon-sqs-java-temporary-queues-client/blob/master/src/main/java/com/amazonaws/services/sqs/util/SQSMessageConsumer.java#L120
will handle messages in SQSMessageConsumer-Thread; however, sometime ForkJoinPool.commonPool-worker will handle the messages, this will cause a java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read")

[ 02-02-2021 23:50:16.662 ] [ ForkJoinPool.commonPool-worker-0 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__82031328-9084-4353-8936-80908bf906a6: 90ebff84-c6f9-4c6c-bc65-86166d89074b [ ] Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read") (AccessControlContext.java:472) java.lang.RuntimeException: Exception encountered while processing message with ID ab66f646-19df-4c0d-a72c-38fe1218732c (SQSMessageConsumer.java:152) [ 02-02-2021 23:50:16.662 ] [ ForkJoinPool.commonPool-worker-2 ] [ ERROR ] [ SQSQueueUtils ] - Unexpected exception [ ] stackHash=6942cc2e68c98f5a7bbc792de5d39937 fullStackTrace=false Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read") (AccessControlContext.java:472) java.lang.RuntimeException: Exception encountered while changing message visibility with ID bc680709-72dc-4f6d-9ca8-78f8a96ba4a5 (SQSMessageConsumer.java:160) [ 02-02-2021 23:50:16.662 ] [ ForkJoinPool.commonPool-worker-0 ] [ ERROR ] [ SQSQueueUtils ] - Unexpected exception [ ] stackHash=1e8fa7c434f4edf19a7ab1f971d2eebc fullStackTrace=false Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read") (AccessControlContext.java:472) java.lang.RuntimeException: Exception encountered while processing message with ID bc680709-72dc-4f6d-9ca8-78f8a96ba4a5 (SQSMessageConsumer.java:152) [ 02-02-2021 23:50:16.662 ] [ ForkJoinPool.commonPool-worker-0 ] [ ERROR ] [ SQSQueueUtils ] - Unexpected exception [ ] stackHash=6942cc2e68c98f5a7bbc792de5d39937 fullStackTrace=false [ 02-02-2021 23:50:16.661 ] [ ForkJoinPool.commonPool-worker-0 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__0c148ce7-8e76-4fe3-85f2-f8cbfef2306e: bc680709-72dc-4f6d-9ca8-78f8a96ba4a5 [ ] [ 02-02-2021 23:50:16.661 ] [ ForkJoinPool.commonPool-worker-2 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__e0984e94-3419-460d-a09a-08a01f66c24b: ab66f646-19df-4c0d-a72c-38fe1218732c [ ] [ 02-02-2021 23:50:16.661 ] [ SQSMessageConsumer-Thread-3 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__d4d72115-90da-4324-8057-a6ae9d8a265b: 0d4b42fc-296d-42b4-ac7f-a708cf4f28f5 [ ] Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read") (AccessControlContext.java:472) java.lang.RuntimeException: Exception encountered while changing message visibility with ID ab258abf-9e1f-4d1b-b753-a2ea0d22eb50 (SQSMessageConsumer.java:160) [ 02-02-2021 23:50:16.592 ] [ ForkJoinPool.commonPool-worker-2 ] [ ERROR ] [ SQSQueueUtils ] - Unexpected exception [ ] stackHash=1e8fa7c434f4edf19a7ab1f971d2eebc fullStackTrace=false Caused by: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "com.amazonaws.sdk.enableRuntimeProfiling" "read") (AccessControlContext.java:472) java.lang.RuntimeException: Exception encountered while processing message with ID ab258abf-9e1f-4d1b-b753-a2ea0d22eb50 (SQSMessageConsumer.java:152) [ 02-02-2021 23:50:16.592 ] [ ForkJoinPool.commonPool-worker-2 ] [ ERROR ] [ SQSQueueUtils ] - Unexpected exception [ ] stackHash=6942cc2e68c98f5a7bbc792de5d39937 fullStackTrace=false [ 02-02-2021 23:50:16.592 ] [ ForkJoinPool.commonPool-worker-2 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__c6ddbd04-8d8e-439b-b7e7-16b84a934a7f: ab258abf-9e1f-4d1b-b753-a2ea0d22eb50 [ ] [ 02-02-2021 23:50:16.592 ] [ SQSMessageConsumer-Thread-3 ] [ WARN ] [ AmazonSQSVirtualQueuesClient ] - Orphaned message sent to __sql-fix-messaging-queue-ct8__ec6dc3a3-6a88-45fd-8db9-2852c4a1c211: 2a1ddb1e-3ba1-4698-89dc-3dfb71fa4e80 [ ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions