{"thread":{"id":"62173","subject":"Git clone failure","startedAt":"2024-09-23T10:47:12Z","lastAt":"2024-09-26T11:54:59Z","messageCount":7,"participants":["Krishna Vivek Vitta","Konstantin Khomoutov","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"503246","messageId":"SI2P153MB071833367C62DD94C96CF1F7D46F2@SI2P153MB0718.APCP153.PROD.OUTLOOK.COM","threadId":"62173","inReplyTo":null,"subject":"Git clone failure","fromName":"Krishna Vivek Vitta","fromEmail":"kvitta@microsoft.com","sentAt":"2024-09-23T10:47:08Z","receivedAt":"2024-09-23T10:47:12Z","isPatch":false,"sender":{"key":"kvitta@microsoft.com","avatar":null},"body":"Hi experts\n\nNeed your help in identifying the root cause for issue.\n\nWe've seen multiple reports of git repositories failing to clone / getting corrupted in p9 file system. The mount points under this file system are marked for FANOTIFY to intercept file system events\n\nWhen we remove the marking on these mount points, git clone succeeds.\n\nFollowing is the error message:\nkvitta@DESKTOP-OOHD5UG:/mnt/c/Users/Krishna Vivek$ git clone https://github.com/zlatko-michailov/abc.git gtest Cloning into 'gtest'...\nfatal: unknown error occurred while reading the configuration files\n\nAny reason why it is failing ? Any help in this regard would be highly appreciated.\n\n\nThank you,\nKrishna Vivek\n\n"},{"id":"503363","messageId":"20240924142046.6wkhwnfd5vp5wh3y@carbon","threadId":"62173","inReplyTo":"SI2P153MB071833367C62DD94C96CF1F7D46F2@SI2P153MB0718.APCP153.PROD.OUTLOOK.COM","subject":"Re: Git clone failure","fromName":"Konstantin Khomoutov","fromEmail":"kostix@bswap.ru","sentAt":"2024-09-24T14:20:46Z","receivedAt":"2024-09-24T15:07:19Z","isPatch":false,"sender":{"key":"kostix@bswap.ru","avatar":null},"body":"On Mon, Sep 23, 2024 at 10:47:08AM +0000, Krishna Vivek Vitta wrote:\n\n> We've seen multiple reports of git repositories failing to clone / getting\n> corrupted in p9 file system. The mount points under this file system are\n> marked for FANOTIFY to intercept file system events\n> \n> When we remove the marking on these mount points, git clone succeeds.\n> \n> Following is the error message:\n[...]\n> fatal: unknown error occurred while reading the configuration files\n> \n> Any reason why it is failing?\n[...]\n\nAre you able to build Git from the source?\n\nAs you can see in config.c, the error is reported in repo_read_config in the\ncase the function config_with_options, it calls, fails. Since it's not\nexpected to fail - except for some weird reasons, - you're probably dealing\nwith such a reason, and so you'd probably need to debug it yourself because I\nhardly beleive it's easily possible for someone else to recreate your specific\nsetup. The debugging might be a simple \"printf-style\" one - that is, navigate\nthe call chain of these configuration-reading functions, stick calls to\nprintf() in places where some nested function returns a value indicating an\nerror exit, build, run, and see which of these printf() calls pinpoints the\nfailure. You will probably trace this to call to some C-library I/O function.\n\n"},{"id":"503406","messageId":"ZvMy_gAL96v8ahfz@tapette.crustytoothpaste.net","threadId":"62173","inReplyTo":"SI2P153MB071833367C62DD94C96CF1F7D46F2@SI2P153MB0718.APCP153.PROD.OUTLOOK.COM","subject":"Re: Git clone failure","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-09-24T21:45:34Z","receivedAt":"2024-09-24T21:45:42Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-09-23 at 10:47:08, Krishna Vivek Vitta wrote:\n> Hi experts\n> \n> Need your help in identifying the root cause for issue.\n> \n> We've seen multiple reports of git repositories failing to clone / getting corrupted in p9 file system. The mount points under this file system are marked for FANOTIFY to intercept file system events\n> \n> When we remove the marking on these mount points, git clone succeeds.\n> \n> Following is the error message:\n> kvitta@DESKTOP-OOHD5UG:/mnt/c/Users/Krishna Vivek$ git clone https://github.com/zlatko-michailov/abc.git gtest Cloning into 'gtest'...\n> fatal: unknown error occurred while reading the configuration files\n> \n> Any reason why it is failing ? Any help in this regard would be highly appreciated.\n\nCan you tell us more about what environment you're using?  Is this\nWindows, macOS, Linux, WSL (1 or 2), or something else?  What version of\nthe OS is it? What is backing the 9p file system (and what file system\ntype is it), and how are you mounting it?  Is it a network file system?\nAre you using any sort of non-default antivirus, firewall, or monitoring\nsoftware, and if so, have you tried to completely uninstall it and\nrestart to see if that fixes the problem?\n\nAlso, are you using any sort of file syncing service for the directory\nin question, such as Dropbox or OneDrive?  Those are known to corrupt\nrepositories and the Git FAQ is clear that you must not store\nrepositories within them.\n\nThe reason I ask all these questions is because I have an open source\ntool which allows mounting 9p file systems from a remote system by using\nthe Linux kernel's 9p support and I don't see this problem.  I don't\nthink there's anything intrinsically problematic with 9p file systems,\nalthough you definitely need 9p2000.u or 9p2000.L (the Unix or Linux\nvariants of the protocol) to make the file system suitably functional\nand POSIX compliant.\n\nMy guess is that there's something else about your environment that's\ncausing the problem.  It looks like maybe you're using some variant of\nWSL, and maybe you have an antivirus that's preventing the files from\nbeing read, which is causing this error on the Linux side.  However,\nwithout more information, it's not really possible for me to say more\nabout what might be going wrong.\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"503460","messageId":"SI2P153MB07185B9AED66870BBAD3C78AD4692@SI2P153MB0718.APCP153.PROD.OUTLOOK.COM","threadId":"62173","inReplyTo":"ZvMy_gAL96v8ahfz@tapette.crustytoothpaste.net","subject":"RE: [EXTERNAL] Re: Git clone failure","fromName":"Krishna Vivek Vitta","fromEmail":"kvitta@microsoft.com","sentAt":"2024-09-25T08:49:11Z","receivedAt":"2024-09-25T08:49:14Z","isPatch":false,"sender":{"key":"kvitta@microsoft.com","avatar":null},"body":"\nHi Brian\n\nThanks for the response.\n\nIt is a WSL2 environment with kernel version: 5.15.153. We have used a kernel version 6.6.36.3 as well. Scenario fails there as well.\n\nroot@DESKTOP-OOHD5UG:/sys/kernel/debug/tracing# uname -a Linux DESKTOP-OOHD5UG 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\n\nMount point information:\nC:\\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=5,wfd=5)\n\nWe aren't using any sort of file syncing service.\n\nWe have installed a defender software which is marking mount points for FANOTIFY to intercept filesystem events. On removing the marking, git clone succeeds.\n\n\n\nThank you,\nKrishna Vivek\n\n-----Original Message-----\nFrom: brian m. carlson <sandals@crustytoothpaste.net>\nSent: Wednesday, September 25, 2024 3:16 AM\nTo: Krishna Vivek Vitta <kvitta@microsoft.com>\nCc: git@vger.kernel.org\nSubject: [EXTERNAL] Re: Git clone failure\n\nOn 2024-09-23 at 10:47:08, Krishna Vivek Vitta wrote:\n> Hi experts\n> \n> Need your help in identifying the root cause for issue.\n> \n> We've seen multiple reports of git repositories failing to clone / \n> getting corrupted in p9 file system. The mount points under this file \n> system are marked for FANOTIFY to intercept file system events\n> \n> When we remove the marking on these mount points, git clone succeeds.\n> \n> Following is the error message:\n> kvitta@DESKTOP-OOHD5UG:/mnt/c/Users/Krishna Vivek$ git clone https://github.com/zlatko-michailov/abc.git gtest Cloning into 'gtest'...\n> fatal: unknown error occurred while reading the configuration files\n> \n> Any reason why it is failing ? Any help in this regard would be highly appreciated.\n\nCan you tell us more about what environment you're using?  Is this Windows, macOS, Linux, WSL (1 or 2), or something else?  What version of the OS is it? What is backing the 9p file system (and what file system type is it), and how are you mounting it?  Is it a network file system?\nAre you using any sort of non-default antivirus, firewall, or monitoring software, and if so, have you tried to completely uninstall it and restart to see if that fixes the problem?\n\nAlso, are you using any sort of file syncing service for the directory in question, such as Dropbox or OneDrive?  Those are known to corrupt repositories and the Git FAQ is clear that you must not store repositories within them.\n\nThe reason I ask all these questions is because I have an open source tool which allows mounting 9p file systems from a remote system by using the Linux kernel's 9p support and I don't see this problem.  I don't think there's anything intrinsically problematic with 9p file systems, although you definitely need 9p2000.u or 9p2000.L (the Unix or Linux variants of the protocol) to make the file system suitably functional and POSIX compliant.\n\nMy guess is that there's something else about your environment that's causing the problem.  It looks like maybe you're using some variant of WSL, and maybe you have an antivirus that's preventing the files from being read, which is causing this error on the Linux side.  However, without more information, it's not really possible for me to say more about what might be going wrong.\n--\nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"503496","messageId":"ZvR58tnLEMBZC4fa@tapette.crustytoothpaste.net","threadId":"62173","inReplyTo":"SI2P153MB07185B9AED66870BBAD3C78AD4692@SI2P153MB0718.APCP153.PROD.OUTLOOK.COM","subject":"Re: [EXTERNAL] Re: Git clone failure","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-09-25T21:00:34Z","receivedAt":"2024-09-25T21:00:40Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-09-25 at 08:49:11, Krishna Vivek Vitta wrote:\n> \n> Hi Brian\n> \n> Thanks for the response.\n> \n> It is a WSL2 environment with kernel version: 5.15.153. We have used a kernel version 6.6.36.3 as well. Scenario fails there as well.\n> \n> root@DESKTOP-OOHD5UG:/sys/kernel/debug/tracing# uname -a Linux DESKTOP-OOHD5UG 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\n> \n> Mount point information:\n> C:\\ on /mnt/c type 9p (rw,noatime,dirsync,aname=drvfs;path=C:\\;uid=1000;gid=1000;symlinkroot=/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=5,wfd=5)\n> \n> We aren't using any sort of file syncing service.\n> \n> We have installed a defender software which is marking mount points for FANOTIFY to intercept filesystem events. On removing the marking, git clone succeeds.\n\nMy guess is that whatever software you're using to intercept file system\nevents is causing the \"unknown error occurred while reading the\nconfiguration files\" message and you should remove that software and\nreboot to see if the problem goes away, even though fanotify is enabled.\n\nIt's very common that the kind of \"defender software\" you're using\nbreaks a variety of software, including Git and Git LFS, and in general,\nthe recommendation we give in the Git FAQ is that you use only the\nsystem default antivirus (and on Linux or WSL, none, since there is no\ndefault).\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"503510","messageId":"JH0P153MB099919ABE06434F49ABF43F7D46A2@JH0P153MB0999.APCP153.PROD.OUTLOOK.COM","threadId":"62173","inReplyTo":"ZvR58tnLEMBZC4fa@tapette.crustytoothpaste.net","subject":"RE: [EXTERNAL] Re: Git clone failure","fromName":"Krishna Vivek Vitta","fromEmail":"kvitta@microsoft.com","sentAt":"2024-09-26T07:11:05Z","receivedAt":"2024-09-26T07:11:10Z","isPatch":false,"sender":{"key":"kvitta@microsoft.com","avatar":null},"body":"Hi Brian\n\nCan you point me to the GIT FAQ about the recommendation.\n\n\n\nThank you,\nKrishna Vivek\n\n-----Original Message-----\nFrom: brian m. carlson <sandals@crustytoothpaste.net> \nSent: Thursday, September 26, 2024 2:31 AM\nTo: Krishna Vivek Vitta <kvitta@microsoft.com>\nCc: git@vger.kernel.org\nSubject: Re: [EXTERNAL] Re: Git clone failure\n\nOn 2024-09-25 at 08:49:11, Krishna Vivek Vitta wrote:\n> \n> Hi Brian\n> \n> Thanks for the response.\n> \n> It is a WSL2 environment with kernel version: 5.15.153. We have used a kernel version 6.6.36.3 as well. Scenario fails there as well.\n> \n> root@DESKTOP-OOHD5UG:/sys/kernel/debug/tracing# uname -a Linux \n> DESKTOP-OOHD5UG 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 \n> 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux\n> \n> Mount point information:\n> C:\\ on /mnt/c type 9p \n> (rw,noatime,dirsync,aname=drvfs;path=C:\\;uid=1000;gid=1000;symlinkroot\n> =/mnt/,mmap,access=client,msize=65536,trans=fd,rfd=5,wfd=5)\n> \n> We aren't using any sort of file syncing service.\n> \n> We have installed a defender software which is marking mount points for FANOTIFY to intercept filesystem events. On removing the marking, git clone succeeds.\n\nMy guess is that whatever software you're using to intercept file system events is causing the \"unknown error occurred while reading the configuration files\" message and you should remove that software and reboot to see if the problem goes away, even though fanotify is enabled.\n\nIt's very common that the kind of \"defender software\" you're using breaks a variety of software, including Git and Git LFS, and in general, the recommendation we give in the Git FAQ is that you use only the system default antivirus (and on Linux or WSL, none, since there is no default).\n--\nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"},{"id":"503537","messageId":"ZvVLjIa0ynRPPkoV@tapette.crustytoothpaste.net","threadId":"62173","inReplyTo":"JH0P153MB099919ABE06434F49ABF43F7D46A2@JH0P153MB0999.APCP153.PROD.OUTLOOK.COM","subject":"Re: [EXTERNAL] Re: Git clone failure","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-09-26T11:54:52Z","receivedAt":"2024-09-26T11:54:59Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-09-26 at 07:11:05, Krishna Vivek Vitta wrote:\n> Hi Brian\n> \n> Can you point me to the GIT FAQ about the recommendation.\n\nSure, it's part of the proxy text: https://git-scm.com/docs/gitfaq#proxy\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"}]}