fix bug in process closefile function which may cause metaserver crash#5
fix bug in process closefile function which may cause metaserver crash#5hmings888 wants to merge 1 commit intoThinkParQ:masterfrom
Conversation
in InodeFileStore.cpp:closeFile, only use entryID to search in the global inode map, when found, the iter point to the "inode" which maybe different from the "inode" that the closeFile function input parameter. in fact, the latter "inode" maybe in the parent dir's inode map.
|
Hi @hmings888, thanks for the PR! One initial question if you've observed any meta crashes as a result of this, or just noticed a crash is theoretically possible based on code analysis? If you have steps to reproduce the issue, it would make it easier to analyze and test the proposed fix. |
It raised metasever segfault many times due to this, but all the coredump files generated have been deleted accidentally :( |
|
Hello @hmings888 , I wanted to close the loop on this. There were a number of improvements in this area of the metadata service that went into both BeeGFS 7.4.4 and 7.4.5. While they don't directly make the change you're proposing here, I had a chat with the team and there were concerns this approach might also have other side effects, and the changes that were already made might actually solve this issue. Could you try upgrading to BeeGFS BeeGFS 7.4.5 (without this patch) and let me know if you continue to see the issue? |
Got it, I'll try the new version later. Thank you for your reply. |
In InodeFileStore.cpp:closeFile,use entryID to search in the global inode map, when found, the iter point to the "inode" which maybe different from the "inode" that the closeFile function use as input parameter. In fact, the latter "inode" maybe in the parent dir's inode map but global inode map. This mistake would make the reference count of inode wrong in subsequent request of closefile, and finally cause metaserver to coredump. So add the condition to make the "inode" is what we found.