Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SpaceManager: Message processing failed: Attribute is not defined: SIZE #7211

Closed
cfgamboa opened this issue Jun 30, 2023 · 2 comments
Closed
Labels

Comments

@cfgamboa
Copy link

Hello,

The transfer seems to fail as the source is not able to provide the size of the file.

The billing log shows this note I anonymized the source site DNS using XXXXXX

[root@dcmaint02 06]# grep 00004ABE083A0F194147988F7C4874629C65 billing-2023.06.30
06.30 04:02:04 [pool:dcdoor20_1@dcdoor20oneDomain:remove] [00004ABE083A0F194147988F7C4874629C65,0] [Unknown] bnlt0d1:BNLT0D1@osm {0:"Transfer failed and replica is empty"}
06.30 04:02:04 [pool:dcdoor20_1:transfer] [00004ABE083A0F194147988F7C4874629C65,0] [/pnfs/usatlas.bnl.gov/BNLT0D1/rucio/data16_13TeV/aa/4c/DAOD_RPVLL.22357441._000142.pool.root.1] bnlt0d1:BNLT0D1@osm 0 7021 true {RemoteHttpsDataTransfer-1.1:https://XXXXXXXX:1094/atlas:datadisk/rucio/data16_13TeV/aa/4c/DAOD_RPVLL.22357441._000142.pool.root.1?copy_mode=pull} [door:RemoteTransferManager@srm-dcsrm03Domain:1688112110921-19931281] {10027:"Premature end of Content-Length delimited message body (expected: 9490470706; received: 0"}

SpaceManager cell is reporting this, should not log this if the transfer the size of the file is not supplied?:

30 Jun 2023 04:02:04 (SpaceManager) [door:WebDAV2-dcdoor10-externalipv6@webdav2-dcdoor10_httpsDomain:AAX/VDq2Htg dcdoor20_1 DoorTransferFinished 00004ABE083A0F194147988F7C4874629C65] Message processing failed: Attribute is not defined: SIZE
java.lang.IllegalStateException: Attribute is not defined: SIZE
	at org.dcache.vehicles.FileAttributes.guard(FileAttributes.java:314)
	at org.dcache.vehicles.FileAttributes.getSize(FileAttributes.java:493)
	at diskCacheV111.services.space.SpaceManagerService.transferFinished(SpaceManagerService.java:779)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally_aroundBody0(SpaceManagerService.java:632)
	at diskCacheV111.services.space.SpaceManagerService$AjcClosure1.run(SpaceManagerService.java:1)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:67)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:73)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:71)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally(SpaceManagerService.java:622)
	at diskCacheV111.services.space.SpaceManagerService.processMessage(SpaceManagerService.java:570)
	at diskCacheV111.services.space.SpaceManagerService$2.process(SpaceManagerService.java:503)
	at diskCacheV111.services.space.SpaceManagerService$FibonacciBackoffMessageProcessor.run(SpaceManagerService.java:1310)
	at org.dcache.util.CDCExecutorServiceDecorator$WrappedRunnable.run(CDCExecutorServiceDecorator.java:130)
	at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
30 Jun 2023 04:04:42 (SpaceManager) [door:WebDAV2-dcdoor16-externalipv6@webdav2-dcdoor16_httpsDomain:AAX/VESRjtg dcdoor08_1 DoorTransferFinished 0000AAF43FD1638B42D7B628EA16A9F1E1EE] Message processing failed: Attribute is not defined: SIZE
java.lang.IllegalStateException: Attribute is not defined: SIZE
	at org.dcache.vehicles.FileAttributes.guard(FileAttributes.java:314)
	at org.dcache.vehicles.FileAttributes.getSize(FileAttributes.java:493)
	at diskCacheV111.services.space.SpaceManagerService.transferFinished(SpaceManagerService.java:779)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally_aroundBody0(SpaceManagerService.java:632)
	at diskCacheV111.services.space.SpaceManagerService$AjcClosure1.run(SpaceManagerService.java:1)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:67)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:73)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:71)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally(SpaceManagerService.java:622)
	at diskCacheV111.services.space.SpaceManagerService.processMessage(SpaceManagerService.java:570)
	at diskCacheV111.services.space.SpaceManagerService$2.process(SpaceManagerService.java:503)
	at diskCacheV111.services.space.SpaceManagerService$FibonacciBackoffMessageProcessor.run(SpaceManagerService.java:1310)
	at org.dcache.util.CDCExecutorServiceDecorator$WrappedRunnable.run(CDCExecutorServiceDecorator.java:130)
	at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
30 Jun 2023 04:06:18 (SpaceManager) [door:WebDAV2-dcdoor12-externalipv6@webdav2-dcdoor12_httpsDomain:AAX/VEoEHqg dcdoor11_1 DoorTransferFinished 0000F7C0FDD69A544FEBBCE818EC843D525F] Message processing failed: Attribute is not defined: SIZE
java.lang.IllegalStateException: Attribute is not defined: SIZE
	at org.dcache.vehicles.FileAttributes.guard(FileAttributes.java:314)
	at org.dcache.vehicles.FileAttributes.getSize(FileAttributes.java:493)
	at diskCacheV111.services.space.SpaceManagerService.transferFinished(SpaceManagerService.java:779)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally_aroundBody0(SpaceManagerService.java:632)
	at diskCacheV111.services.space.SpaceManagerService$AjcClosure1.run(SpaceManagerService.java:1)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:67)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:73)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:71)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally(SpaceManagerService.java:622)
	at diskCacheV111.services.space.SpaceManagerService.processMessage(SpaceManagerService.java:570)
	at diskCacheV111.services.space.SpaceManagerService$2.process(SpaceManagerService.java:503)
	at diskCacheV111.services.space.SpaceManagerService$FibonacciBackoffMessageProcessor.run(SpaceManagerService.java:1310)
	at org.dcache.util.CDCExecutorServiceDecorator$WrappedRunnable.run(CDCExecutorServiceDecorator.java:130)
	at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
30 Jun 2023 04:10:01 (SpaceManager) [door:WebDAV2-dcdoor13-externalipv6@webdav2-dcdoor13_httpsDomain:AAX/VFdzY8g dcdoor14_1 DoorTransferFinished 0000E129329C9E104CB1BBEB1C7F962AE8C3] Message processing failed: Attribute is not defined: SIZE
java.lang.IllegalStateException: Attribute is not defined: SIZE
	at org.dcache.vehicles.FileAttributes.guard(FileAttributes.java:314)
	at org.dcache.vehicles.FileAttributes.getSize(FileAttributes.java:493)
	at diskCacheV111.services.space.SpaceManagerService.transferFinished(SpaceManagerService.java:779)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally_aroundBody0(SpaceManagerService.java:632)
	at diskCacheV111.services.space.SpaceManagerService$AjcClosure1.run(SpaceManagerService.java:1)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96cproceed(AbstractTransactionAspect.aj:67)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect$AbstractTransactionAspect$1.proceedWithInvocation(AbstractTransactionAspect.aj:73)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)
	at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$around$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:71)
	at diskCacheV111.services.space.SpaceManagerService.processMessageTransactionally(SpaceManagerService.java:622)
	at diskCacheV111.services.space.SpaceManagerService.processMessage(SpaceManagerService.java:570)
	at diskCacheV111.services.space.SpaceManagerService$2.process(SpaceManagerService.java:503)
	at diskCacheV111.services.space.SpaceManagerService$FibonacciBackoffMessageProcessor.run(SpaceManagerService.java:1310)
	at org.dcache.util.CDCExecutorServiceDecorator$WrappedRunnable.run(CDCExecutorServiceDecorator.java:130)
	at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
@lemora
Copy link
Member

lemora commented Jun 30, 2023

Hi Carlos, thanks for reporting. I checked and there is already an issue for this problen: #7162. I am closing the other one as it is not as detailed.

Which version are you running?

@cfgamboa
Copy link
Author

Sorry, I should have added it before. 8.2.15

@lemora lemora added the bug label Jun 30, 2023
@lemora lemora closed this as completed in 707cf4f Sep 28, 2023
lemora added a commit to lemora/dcache that referenced this issue Sep 28, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: dCache#7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit to lemora/dcache that referenced this issue Sep 28, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: dCache#7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit to lemora/dcache that referenced this issue Sep 28, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: dCache#7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit to lemora/dcache that referenced this issue Sep 28, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: dCache#7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit to lemora/dcache that referenced this issue Sep 28, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: dCache#7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit that referenced this issue Oct 5, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: #7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit that referenced this issue Oct 5, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: #7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
lemora added a commit that referenced this issue Oct 5, 2023
Motivation:

Sometimes, when an upload fails, it results in a replica of size 0 that is then flagged to be removed (ReplicaState.REMOVED).
The finished transfer is nevertheless reported to SpaceManager when the serice exists. It requires the file size to be defined,
which may not have been set in such cases, leading to an exception being logged.

In general, we should make sure that the file size is set properly when a transfer finishes, whether it is successful or not.
SpaceManager should ignore a `DoorTransferFinishedMessage` only when it reports a CacheException: the corresponding file is gone from the name space.
Otherwise, even if the file size is not defined, it should update its database to reflect that the file of size 0 bytes is stored.
It should receive a `PnfsDeleteEntryNotificationMessage` on removal of the actual namespace entry later on, which will trigger the correct
removal of the space manager database entry.

Modification:

On failure, when the replica size is 0, update the file attributes accordingly before setting the replica into state `REMOVED`.
Additionally, safeguard SpaceManager by storing a file size of 0 when the SIZE attribute in the `DoorTransferFinishedMessage` is not defined
and log a warning.

Result:
No more logged stack traces due to `IllegalStateException: Attribute is not defined: SIZE` errors.

Target: master
Request: 9.0
Request: 8.2
Request: 8.1
Request: 8.0
Fixes: #7211
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/14061/
Acked-by: Tigran Mkrtchyan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants