Repository navigation
Same SID used for different script files in Docker #3353
Copy link
Copy link
Open
Description
Activity
- added a commit that references this issue
on Aug 20, 2018 This is caused by Vader deleting the temporary file itself already, and indicates that Docker (or rather its FS) re-uses inodes (or something in this regard) more aggressively / in a different way.
- I've noticed that `source` will re-use the previous script ID in Docker. Vader uses `:source` with temporary files, and inside of Docker the previous `s:` context is kept. The behavior in Docker can be simulated by using the same temporary file always, but overwriting it - but I think it is better to have a new script context for every test. It seems to be related to the following code: https://github.com/vim/vim/blob/167ae42685dcd430800c51ac7339f7f0938a3e70/src/ex_cmds2.c#L4475-L4496 I.e. if Docker would reuse inodes aggresively this would explain it, and the condition for UNIX should be using `&&` at the end instead of `||` ? I have no test case (except for Neomake's test suite) to reproduce this easily, and it might be something else then Docker therefore after all. Any pointers would be appreciated to debug this further, since it is also not trivial to get a patched Vim inside the Docker image used for tests.So, while Vim is running the script is deleted, and when later another script is created it gets the same inode? Hmm, that is difficult to detect. Perhaps the timestamp? Using the inode is mainly to handle the case that the same script is loaded from different paths using symbolic links. In that case they should have the same timestamp, right?…-- CART DRIVER: Bring out your dead! There are legs stick out of windows and doors. Two MEN are fighting in the mud - covered from head to foot in it. Another MAN is on his hands in knees shovelling mud into his mouth. We just catch sight of a MAN falling into a well. "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
- added a commit that references this issue
on Nov 21, 2018 - added 2 commits that reference this issue
on May 18, 2019 - added a commit that references this issue
on Sep 30, 2019 - added 2 commits that reference this issue
on Jan 26, 2020 - added a commit that references this issue
on Feb 13, 2020 - added 2 commits that reference this issue
on May 5, 2020 - added a commit that references this issue
on May 28, 2020
Metadata
Metadata
Assignees
Labels
No labels
I've noticed that
sourcewill re-use the previous script ID in Docker.Vader uses
:sourcewith temporary files, and inside of Docker the previouss:context is kept.The behavior in Docker can be simulated by using the same temporary file always, but overwriting it - but I think it is better to have a new script context for every test.
It seems to be related to the following code:
vim/src/ex_cmds2.c
Lines 4475 to 4496 in 167ae42
I.e. if Docker would reuse inodes aggresively this would explain it, and the condition for UNIX should be using
&&at the end instead of||?I have no test case (except for Neomake's test suite) to reproduce this easily, and it might be something else then Docker therefore after all.
Any pointers would be appreciated to debug this further, since it is also not trivial to get a patched Vim inside the Docker image used for tests.