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

error usage of errno find_branch() #63

Open
wonlinwo opened this issue Apr 4, 2017 · 2 comments
Open

error usage of errno find_branch() #63

wonlinwo opened this issue Apr 4, 2017 · 2 comments

Comments

@wonlinwo
Copy link

wonlinwo commented Apr 4, 2017

hi,
when i do a stress test which unionfs bind a ramfs directory and ubifs directory, enable debug option(-d),

unique: 895588, opcode: LOOKUP (1), nodeid: 1, insize: 56, pid: 12588
LOOKUP /type_a.checksum
getattr /type_a.checksum
unionfs_getattr(): 197: /type_a.checksum
find_rorw_branch(): 107: /type_a.checksum
find_branch(): 58: /type_a.checksum
build_path(): 131: from: find_branch():63 path: /mnt/persistent/app_data/lt_default/type_a.checksum
build_path(): 132: return 0
find_branch(): 71: /mnt/persistent/app_data/lt_default/type_a.checksum: res = -1
path_hidden(): 58: /type_a.checksum
build_path(): 131: from: path_hidden():63 path: /mnt/persistent/app_data/lt_default/.unionfs/type_a.checksum
build_path(): 132: return 0
filedir_hidden(): 45: /mnt/persistent/app_data/lt_default/.unionfs/type_a.checksum_HIDDEN~
filedir_hidden(): 51: return 0
path_hidden(): 86: return 0
build_path(): 131: from: find_branch():63 path: /isam/slot_default/run.volatile/type_a.checksum
build_path(): 132: return 0
find_branch(): 71: /isam/slot_default/run.volatile/type_a.checksum: res = -1
path_hidden(): 58: /type_a.checksum
build_path(): 131: from: path_hidden():63 path: /isam/slot_default/run.volatile/.unionfs/type_a.checksum
build_path(): 132: return 0
filedir_hidden(): 45: /isam/slot_default/run.volatile/.unionfs/type_a.checksum_HIDDEN~
filedir_hidden(): 51: return 0
path_hidden(): 86: return 0
find_branch(): 100: return -1
find_rorw_branch(): 109: return -1
unionfs_getattr(): 200: return -28
lookup_path type_a.checksum, /type_a.checksum
unique: 895588, error: -28 (No space left on device), outsize: 16

##########################################################
find_branch(): 100: return -1 and set errno to ENOENT, but
but caller unionfs_getattr(): 200: return -28

i think when enable debug option, errno may change during DBG() execute.

maybe other code also have errno issue.

thanks

@rpodgorny
Copy link
Owner

interesting. thanks for the report!

according to documentation, it seems the the fflush may by the culprit (neither fprintf nor pthread_rwlock_* doesn't seem to be altering errno).

how can i try to reproduce your stress test?

@wonlinwo
Copy link
Author

wonlinwo commented Apr 7, 2017

I do stress on an embedded board, open -d option and configure debug file to /tmp/unionfs_debug.log.
due to root file system size limitation, i found when error happen, /tmp/unionfs_debug.log will not increase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants