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

Locking issue is back #4879

Closed
micbar opened this issue Oct 21, 2022 · 1 comment · Fixed by #4915
Closed

Locking issue is back #4879

micbar opened this issue Oct 21, 2022 · 1 comment · Fixed by #4915
Assignees
Labels
Priority:p1-urgent Consider a hotfix release with only that fix Type:Bug

Comments

@micbar
Copy link
Contributor

micbar commented Oct 21, 2022

Describe the bug

A clear and concise description of what the bug is.

Run CI decomposedFS concurrency test

Will run 63 of 64 specs
--
1367 | ••••••••••••••••••••
1368 | ------------------------------
1369 | P [PENDING]
1370 | Decomposed concurrent Upload generates two revisions
1371 | /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:60
1372 | ------------------------------
1373 | • [FAILED] [0.990 seconds]
1374 | Decomposed
1375 | /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:36
1376 | concurrent
1377 | /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:53
1378 | CreateDir
1379 | /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:93
1380 | [It] handles already existing directories
1381 | /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:100
1382 |  
1383 | Unexpected error:
1384 | <*errors.withStack \| 0xc00000f278>: {
1385 | error: <*errors.withMessage \| 0xc0002601a0>{
1386 | cause: <*errors.errorString \| 0xc000256860>{
1387 | s: "unable to acquire a lock on the file",
1388 | },
1389 | msg: "xattrs: Unable to lock file for read",
1390 | },
1391 | stack: [0xd7d97a, 0xd8c6fc, 0xd8cce8, 0xe405b3, 0xe262c6, 0xfbc4d8, 0x49ee61],
1392 | }
1393 | xattrs: Unable to lock file for read: unable to acquire a lock on the file
1394 | occurred
1395 | In [It] at: /drone/src/pkg/storage/utils/decomposedfs/decomposedfs_concurrency_test.go:115

Expected behavior

A clear and concise description of what you expected to happen.

Actual behavior

A clear and concise description of what happened.

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

OCIS_XXX=somevalue
OCIS_YYY=somevalue
PROXY_XXX=somevalue

Additional context

Add any other context about the problem here.

@micbar micbar added this to the 2.0.0 General Availability milestone Oct 21, 2022
@micbar micbar added the Priority:p1-urgent Consider a hotfix release with only that fix label Oct 21, 2022
@dragotin
Copy link
Contributor

This is a typical log sequence from my Raspberry Pi where I get the error message often:

{"level":"error","service":"storage-users","pkg":"rgrpc","traceid":"00000000000000000000000000000000","error":"xattrs: Unable to lock file for read: unable to acquire a lock on the file","node":"7a17d9ea-25f8-49b7-963c-6cc2607f656f","time":"2022-10-24T12:54:54.263075324+01:00","message":"error listing attributes"}
{"level":"error","service":"storage-users","pkg":"rgrpc","traceid":"00000000000000000000000000000000","node":"7a17d9ea-25f8-49b7-963c-6cc2607f656f","error":"xattrs: Unable to lock file for read: unable to acquire a lock on the file","time":"2022-10-24T12:54:54.430718246+01:00","message":"error getting list of extended attributes"}
{"level":"debug","service":"storage-users","pkg":"rgrpc","traceid":"00000000000000000000000000000000","node":"7a17d9ea-25f8-49b7-963c-6cc2607f656f","ri":{"opaque":{"map":{"adler32":{"decoder":"plain","value":"MzI1ZTAxYTg="},"md5":{"decoder":"plain","value":"ZTg4OWJjMzM1NzI2MzEyNTcxMjk1NGViMzM0N2NkZDc="}}},"type":1,"id":{"opaque_id":"7a17d9ea-25f8-49b7-963c-6cc2607f656f","space_id":"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"},"checksum":{"type":4,"sum":"96bdf56ca9541af02db4b3112f862daa915207bd"},"etag":"\"cfe5148ae1d195a619b72c90f983ca20\"","mime_type":"image/jpeg","mtime":{"seconds":1661700948},"path":"cameringo_20220828_165945.jpg","permission_set":{"add_grant":true,"create_container":true,"delete":true,"get_path":true,"get_quota":true,"initiate_file_download":true,"initiate_file_upload":true,"list_grants":true,"list_container":true,"list_file_versions":true,"list_recycle":true,"move":true,"remove_grant":true,"purge_recycle":true,"restore_file_version":true,"restore_recycle_item":true,"stat":true,"update_grant":true},"size":2671299,"owner":{"idp":"https://raspberrypi:9200","opaque_id":"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c","type":1},"arbitrary_metadata":{"metadata":{"http://owncloud.org/ns/favorite":""}},"parent_id":{"opaque_id":"4c191ecf-a009-47db-aa87-19ddc553dfad","space_id":"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"},"name":"cameringo_20220828_165945.jpg"},"time":"2022-10-24T12:54:54.430946005+01:00","message":"AsResourceInfo"}

This seem to fail at the xattr.List() call in https://github.com/cs3org/reva/blob/master/pkg/storage/utils/decomposedfs/node/node.go#L636
I have no theory why, but I see this fail again and again (but not on every call).

xattr.List() uses a time loop to wait for being able to lock which goes up to > 50 msec. That should be enough... So maybe the file is already locked by a calling function? That would however mean that it fails at every call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p1-urgent Consider a hotfix release with only that fix Type:Bug
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants