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

path->ioctx == NULL crash for rename after create #93

Open
andrewchambers opened this issue Aug 17, 2022 · 0 comments
Open

path->ioctx == NULL crash for rename after create #93

andrewchambers opened this issue Aug 17, 2022 · 0 comments

Comments

@andrewchambers
Copy link

starting diod [-f -l 127.0.0.1:34321 -e /run/user/1000/TestDotlRename3873657423/001 -d 1 -n -U ac]
diod: P9_TVERSION tag 65535 msize 4096 version '9P2000.L'
diod: P9_RVERSION tag 65535 msize 4096 version '9P2000.L'
diod: P9_TATTACH tag 0 fid 0 afid -1 uname 'ac' aname '/run/user/1000/TestDotlRename3873657423/001' n_uname P9_NONUNAME
diod: P9_RATTACH tag 0 qid (000000000017e13c 0 'd')
diod: P9_TWALK tag 0 fid 0 newfid 1 nwname 0
diod: P9_RWALK tag 0 nwqid 0 
diod: P9_TLCREATE tag 0 fid 1 name 'x' flags 0x0 mode 00 gid 0
diod: P9_RLCREATE tag 0 qid (000000000017e13d 0 '') iounit 0
diod: P9_TRENAME tag 0 fid 1 dfid 0 name 'y'
diod: assertion failure: ioctx.c:448: path->ioctx == NULL

In this test I create a new file with LCREATE, then immediately try to rename it with TRENAME.
The protocol documentation says after LCREATE the fid points to the new item, but this causes a failure.

I think most existing clients tend to walk a new fid and avoid combining these operations hence we don't normally see this problem.

@andrewchambers andrewchambers changed the title path->ioctx == NULL fails for rename after create path->ioctx == NULL crash for rename after create Aug 17, 2022
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

1 participant