[ https://issues.apache.org/jira/browse/ARTEMIS-1792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lionel Cons updated ARTEMIS-1792: --------------------------------- Description: It seems that there is a race condition when auto deleting an address (i.e. via {{auto-delete-addresses=true}}), at least when using STOMP. Here is the scenario: - 2 consumers on the same topic - they issue an {{UNSUBSCRIBE}} frame at the same time Artemis returns a AMQ119203 error: Address Does Not Exist. Here are logs. consumer 1 subscribes: {code} # 2018/04/09-11:43:24 mbtf[1699.1]: => SUBSCRIBE frame # 2018/04/09-11:43:24 mbtf[1699.1]: H ack:client # 2018/04/09-11:43:24 mbtf[1699.1]: H destination:/topic/test.mbtf.o7zlADh7 # 2018/04/09-11:43:24 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 # 2018/04/09-11:43:24 mbtf[1699.1]: H receipt:324b068-5acb35bc-6a3-32d-2 {code} consumer 2 subscribes: {code} # 2018/04/09-11:43:24 mbtf[1699.2]: => SUBSCRIBE frame # 2018/04/09-11:43:24 mbtf[1699.2]: H ack:client # 2018/04/09-11:43:24 mbtf[1699.2]: H destination:/topic/test.mbtf.o7zlADh7 # 2018/04/09-11:43:24 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:24 mbtf[1699.2]: H receipt:3e00c10-5acb35bc-6a3-f3a6-2 {code} receipts are received producer (a third thread/connection) sends one message and disconnects both consumers receive the message and acknowledge it consumer 1 and 2 unsubscribe at the same time: {code} # 2018/04/09-11:43:29 mbtf[1699.2]: => UNSUBSCRIBE frame # 2018/04/09-11:43:29 mbtf[1699.1]: => UNSUBSCRIBE frame # 2018/04/09-11:43:29 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:29 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 # 2018/04/09-11:43:29 mbtf[1699.2]: <= ERROR frame # 2018/04/09-11:43:29 mbtf[1699.2]: H message:AMQ339017 Error unsubscribing 3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:29 mbtf[1699.2]: H content-type:text/plain # 2018/04/09-11:43:29 mbtf[1699.2]: H content-length:53 # 2018/04/09-11:43:29 mbtf[1699.2]: B 0000 414d5131 31393230 333a2041 64647265 AMQ1 1920 3: A ddre # 2018/04/09-11:43:29 mbtf[1699.2]: B 0010 73732044 6f657320 4e6f7420 45786973 ss D oes Not Exis # 2018/04/09-11:43:29 mbtf[1699.2]: B 0020 743a2074 6573742e 6d627466 2e6f377a t: t est. mbtf .o7z # 2018/04/09-11:43:29 mbtf[1699.2]: B 0030 6c414468 37 lADh 7 # 2018/04/09-11:43:29 mbtf[1699.2]: => DISCONNECT frame Thread 2 terminated abnormally: unexpected ERROR frame received: AMQ339017 Error unsubscribing 3e00c10-5acb35bc-6a3-f3a6-1 {code} I do not see this error when unsubscriptions happen sequentially. was: It seems that there is a race condition when auto deleting an address (i.e. via {{auto-delete-addresses=true}}), at least when using STOMP. Here is the scenario: - 2 consumers on the same topic - they issue an {{UNSUBSCRIBE}} frame at the same time Artemis returns a AMQ119203 error: Address Does Not Exist. Here are logs. consumer 1 subscribes: {code} # 2018/04/09-11:43:24 mbtf[1699.1]: => SUBSCRIBE frame # 2018/04/09-11:43:24 mbtf[1699.1]: H ack:client # 2018/04/09-11:43:24 mbtf[1699.1]: H destination:/topic/test.mbtf.o7zlADh7 # 2018/04/09-11:43:24 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 # 2018/04/09-11:43:24 mbtf[1699.1]: H receipt:324b068-5acb35bc-6a3-32d-2 {code} consumer 2 subscribes: {code} # 2018/04/09-11:43:24 mbtf[1699.2]: => SUBSCRIBE frame # 2018/04/09-11:43:24 mbtf[1699.2]: H ack:client # 2018/04/09-11:43:24 mbtf[1699.2]: H destination:/topic/test.mbtf.o7zlADh7 # 2018/04/09-11:43:24 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:24 mbtf[1699.2]: H receipt:3e00c10-5acb35bc-6a3-f3a6-2 {code} receipts are received producer (a third thread/connection) sends one message and disconnects both consumers receive the message and acknowledge it consumer 1 and 2 unsubscribe at the same time: {code} # 2018/04/09-11:43:29 mbtf[1699.2]: => UNSUBSCRIBE frame # 2018/04/09-11:43:29 mbtf[1699.1]: => UNSUBSCRIBE frame # 2018/04/09-11:43:29 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:29 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 # 2018/04/09-11:43:29 mbtf[1699.2]: <= ERROR frame # 2018/04/09-11:43:29 mbtf[1699.2]: H message:AMQ339017 Error unsubscribing 3e00c10-5acb35bc-6a3-f3a6-1 # 2018/04/09-11:43:29 mbtf[1699.2]: H content-type:text/plain # 2018/04/09-11:43:29 mbtf[1699.2]: H content-length:53 # 2018/04/09-11:43:29 mbtf[1699.2]: B 0000 414d5131 31393230 333a2041 64647265 AMQ1 1920 3: A ddre # 2018/04/09-11:43:29 mbtf[1699.2]: B 0010 73732044 6f657320 4e6f7420 45786973 ss D oes Not Exis # 2018/04/09-11:43:29 mbtf[1699.2]: B 0020 743a2074 6573742e 6d627466 2e6f377a t: t est. mbtf .o7z # 2018/04/09-11:43:29 mbtf[1699.2]: B 0030 6c414468 37 lADh 7 # 2018/04/09-11:43:29 mbtf[1699.2]: => DISCONNECT frame Thread 2 terminated abnormally: unexpected ERROR frame received: AMQ339017 Error unsubscribing 3e00c10-5acb35bc-6a3-f3a6-1 {code} I do not see this error when subscriptions happen sequentially. > Race condition when auto deleting an address > -------------------------------------------- > > Key: ARTEMIS-1792 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1792 > Project: ActiveMQ Artemis > Issue Type: Bug > Affects Versions: 2.5.0 > Reporter: Lionel Cons > Priority: Major > > It seems that there is a race condition when auto deleting an address (i.e. > via {{auto-delete-addresses=true}}), at least when using STOMP. > Here is the scenario: > - 2 consumers on the same topic > - they issue an {{UNSUBSCRIBE}} frame at the same time > Artemis returns a AMQ119203 error: Address Does Not Exist. > Here are logs. > consumer 1 subscribes: > {code} > # 2018/04/09-11:43:24 mbtf[1699.1]: => SUBSCRIBE frame > # 2018/04/09-11:43:24 mbtf[1699.1]: H ack:client > # 2018/04/09-11:43:24 mbtf[1699.1]: H destination:/topic/test.mbtf.o7zlADh7 > # 2018/04/09-11:43:24 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 > # 2018/04/09-11:43:24 mbtf[1699.1]: H receipt:324b068-5acb35bc-6a3-32d-2 > {code} > consumer 2 subscribes: > {code} > # 2018/04/09-11:43:24 mbtf[1699.2]: => SUBSCRIBE frame > # 2018/04/09-11:43:24 mbtf[1699.2]: H ack:client > # 2018/04/09-11:43:24 mbtf[1699.2]: H destination:/topic/test.mbtf.o7zlADh7 > # 2018/04/09-11:43:24 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 > # 2018/04/09-11:43:24 mbtf[1699.2]: H receipt:3e00c10-5acb35bc-6a3-f3a6-2 > {code} > receipts are received > producer (a third thread/connection) sends one message and disconnects > both consumers receive the message and acknowledge it > consumer 1 and 2 unsubscribe at the same time: > {code} > # 2018/04/09-11:43:29 mbtf[1699.2]: => UNSUBSCRIBE frame > # 2018/04/09-11:43:29 mbtf[1699.1]: => UNSUBSCRIBE frame > # 2018/04/09-11:43:29 mbtf[1699.2]: H id:3e00c10-5acb35bc-6a3-f3a6-1 > # 2018/04/09-11:43:29 mbtf[1699.1]: H id:324b068-5acb35bc-6a3-32d-1 > # 2018/04/09-11:43:29 mbtf[1699.2]: <= ERROR frame > # 2018/04/09-11:43:29 mbtf[1699.2]: H message:AMQ339017 Error unsubscribing > 3e00c10-5acb35bc-6a3-f3a6-1 > # 2018/04/09-11:43:29 mbtf[1699.2]: H content-type:text/plain > # 2018/04/09-11:43:29 mbtf[1699.2]: H content-length:53 > # 2018/04/09-11:43:29 mbtf[1699.2]: B 0000 414d5131 31393230 333a2041 > 64647265 AMQ1 1920 3: A ddre > # 2018/04/09-11:43:29 mbtf[1699.2]: B 0010 73732044 6f657320 4e6f7420 > 45786973 ss D oes Not Exis > # 2018/04/09-11:43:29 mbtf[1699.2]: B 0020 743a2074 6573742e 6d627466 > 2e6f377a t: t est. mbtf .o7z > # 2018/04/09-11:43:29 mbtf[1699.2]: B 0030 6c414468 37 > lADh 7 > # 2018/04/09-11:43:29 mbtf[1699.2]: => DISCONNECT frame > Thread 2 terminated abnormally: unexpected ERROR frame received: AMQ339017 > Error unsubscribing 3e00c10-5acb35bc-6a3-f3a6-1 > {code} > I do not see this error when unsubscriptions happen sequentially. -- This message was sent by Atlassian JIRA (v7.6.3#76005)