-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
Invalid path: The drive name does not exist for ZFS filesystem #4251
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
I clicked "Update All" and then the "Apply" button from the top From the second screen, the "Apply" button in the bottom right does nothing. The back button will take me back. Pressing the clear button results in Since I executed this from the command line, this is what comes up on the CLI after the crash;
I've now tried this on two separate PC's both running Ubuntu 22.04 and both show the exact same symptoms. One PC has no mods installed, the other already has mods. Possibly a mono version problem? It's mono version mono-runtime/jammy,now 6.8.0.105+dfsg-3.2 |
Tried upgrading to latest mono mono-runtime/stable-focal 6.12.0.200-0xamarin2+ubuntu2004b1 Same result as above. |
Thanks. And we have some pretty solid previous investigation notes for the same exception in #2501. |
Thank you so much. Anything else I can do to help dig into this I am happy to help with whatever I can. |
This comment was marked as resolved.
This comment was marked as resolved.
Wow, that is wild! You've got seven rows there with blank cells in the "Mod" column. That definitely should not be happening. It might be useful to document which mods those are. Can you please show what the And does that only happen for upgrades? Or is the mod name missing if you just install or uninstall something? |
Worth noting though; the other computer with the problem has no mods and a fresh install of KSP. Same issue, and the mod column is blank there too. |
Well, that IS a slightly newer revision of CKAN. I don't see a current download for 1.35.3.24334; I'm running 1.35.2.24280 (current latest) binary Thing is, the PC I'm posting these screenshots from was working fine up until recently. It was only after updates that it seems to have broken. The other PC was a fresh install on a fresh Ubuntu 22.04 (make sure you're on 22.04?) What version of Mono are you running? |
That's the current dev build, same as the nightly builds:
Yeah, that sounds plausible; something changed on the PC that broke something in Mono. The trick is figuring out what it was.
That was with 6.12.0.200, but pretty much any version after 6 has always worked fine. https://www.mono-project.com/download/stable/#download-lin-ubuntu |
I'm at a bit of a loss then. The Mono install on my other PC was fresh as well so I'm pretty confused here. I did try the nightly build as well on this PC but no joy... same problem. Note I didn't change anything in Mono, just installed it to support CKAN. |
How are you installing Mono? Are you using the one from Ubuntu? Following the directions I linked above? Something else? |
Tried both the one that ships with Ubuntu 22.04 and tried the one from the mono project. Both had the same results too. |
This is a bit of a long shot, but auditing the code behind the Mod column suggests the possibility of a problem with the download cache (that's one of the ways |
Alright... that's it. I created a temporary zvol, formatted it as ext4 and mounted it in the downloads folder. I can now operate normally. Now, the question is why this revision of CKAN is suddenly sensitive to ZFS filesystems when I know for a fact that at least this PC has been using ZFS since I built it ~3 years ago as its only filesystem... there's something that's been introduced in that timeframe that has made this tool sensitive to ZFS but I couldn't tell you exactly when as I haven't been playing KSP in about a year. It's only now that I've started to want to play it again. EDIT: Scratch that. While downloads now work it now won't update my KSP installation as it's also on ZFS. I really don't want to have to set up a random EXT4 filesystem particularly since I don't have any drives to do it with. I can do it with zvols but that seems to be kludgy at least in my head. When I go to complete the updates this is what I get So it's definitely some sort of problem with ZFS. |
Nah, this means it has some problem getting the number of files in the cache and their size (that's a default value for the label without meaningful data): That's what I suspected we might see. The cache object is definitely null.
Is that one of those filesystems where it's impossible to determine the remaining free space? If so, I'm guessing this exception is thrown when we attempt to do that (see #3631, #3850, and #4125). I'll have to contemplate how to handle that. |
I'm not a .net coder so I couldn't say for sure. I know I've got other apps using mono just fine with ZFS but I'm not sure how much validation they do of disk space before they perform disk operations. I know at least with Linux tools in general ZFS reports free space just fine to all of them, but again not sure about mono. Interesting problem. ZFS is an easy install in Ubuntu ( |
Mono is open source, so we can look up exactly what it's doing: DriveInfo [] drives = GetDrives ();
Array.Sort (drives, (DriveInfo di1, DriveInfo di2) => String.Compare (di2.path, di1.path, true));
foreach (DriveInfo d in drives){
if (driveName.StartsWith (d.path, StringComparison.OrdinalIgnoreCase)){
this.path = d.path;
this.drive_format = d.drive_format;
return;
}
}
throw new ArgumentException ("The drive name does not exist", "driveName"); public static DriveInfo[] GetDrives ()
{
var drives = Environment.GetLogicalDrives ();
DriveInfo [] infos = new DriveInfo [drives.Length];
int i = 0;
foreach (string s in drives)
infos [i++] = new DriveInfo (s, GetDriveFormat (s));
return infos;
} [EnvironmentPermission (SecurityAction.Demand, Unrestricted=true)]
public static string[] GetLogicalDrives ()
{
return GetLogicalDrivesInternal ();
} [MethodImplAttribute (MethodImplOptions.InternalCall)]
internal extern static string [] GetLogicalDrivesInternal (); MonoArrayHandle
ves_icall_System_Environment_GetLogicalDrivesInternal (MonoError *error)
{
return mono_icall_get_logical_drives (error);
} static MonoArrayHandle
mono_icall_get_logical_drives (MonoError *error)
{
gunichar2 buf [256], *ptr, *dname;
gunichar2 *u16;
guint initial_size = 127, size = 128;
gint ndrives;
MonoArrayHandle result = NULL_HANDLE_ARRAY;
MonoStringHandle drivestr;
MonoDomain *domain = mono_domain_get ();
gint len;
buf [0] = '\0';
ptr = buf;
while (size > initial_size) {
size = (guint) mono_w32file_get_logical_drive (initial_size, ptr, error);
if (!is_ok (error))
goto leave;
if (size > initial_size) {
if (ptr != buf)
g_free (ptr);
ptr = (gunichar2 *)g_malloc0 ((size + 1) * sizeof (gunichar2));
initial_size = size;
size++;
}
}
/* Count strings */
dname = ptr;
ndrives = 0;
do {
while (*dname++);
ndrives++;
} while (*dname);
dname = ptr;
result = mono_array_new_handle (domain, mono_defaults.string_class, ndrives, error);
goto_if_nok (error, leave);
drivestr = MONO_HANDLE_NEW (MonoString, NULL);
ndrives = 0;
do {
len = 0;
u16 = dname;
while (*u16) {
u16++; len ++;
}
MonoString *s = mono_string_new_utf16_checked (domain, dname, len, error);
goto_if_nok (error, leave);
MONO_HANDLE_ASSIGN_RAW (drivestr, s);
mono_array_handle_setref (result, ndrives, drivestr);
ndrives ++;
while (*dname++);
} while (*dname);
leave:
if (ptr != buf)
g_free (ptr);
return result;
} gint32
mono_w32file_get_logical_drive (guint32 len, gunichar2 *buf, MonoError *error)
{
return GetLogicalDriveStrings_Mtab (len, buf);
}
#endif
static gint32
GetLogicalDriveStrings_Mtab (guint32 len, gunichar2 *buf)
{
FILE *fp;
gunichar2 *ptr, *dir;
glong length, total = 0;
gchar buffer [512];
gchar **splitted;
memset (buf, 0, sizeof (gunichar2) * (len + 1));
buf [0] = '/';
buf [1] = 0;
buf [2] = 0;
/* Sigh, mntent and friends don't work well.
* It stops on the first line that doesn't begin with a '/'.
* (linux 2.6.5, libc 2.3.2.ds1-12) - Gonz */
MONO_ENTER_GC_SAFE;
fp = fopen ("/etc/mtab", "rt");
MONO_EXIT_GC_SAFE;
if (fp == NULL) {
MONO_ENTER_GC_SAFE;
fp = fopen ("/etc/mnttab", "rt");
MONO_EXIT_GC_SAFE;
if (fp == NULL)
return 1;
}
ptr = buf;
while (1) {
gchar *fgets_res;
MONO_ENTER_GC_SAFE;
fgets_res = fgets (buffer, 512, fp);
MONO_EXIT_GC_SAFE;
if (!fgets_res)
break;
if (*buffer != '/')
continue;
splitted = g_strsplit (buffer, " ", 0);
if (!*splitted || !*(splitted + 1)) {
g_strfreev (splitted);
continue;
}
unescape_octal (*(splitted + 1));
dir = g_utf8_to_utf16 (*(splitted + 1), -1, NULL, &length, NULL);
g_strfreev (splitted);
if (total + length + 1 > len) {
MONO_ENTER_GC_SAFE;
fclose (fp);
MONO_EXIT_GC_SAFE;
g_free (dir);
return len * 2; /* guess */
}
memcpy (ptr + total, dir, sizeof (gunichar2) * length);
g_free (dir);
total += length + 1;
}
MONO_ENTER_GC_SAFE;
fclose (fp);
MONO_EXIT_GC_SAFE;
return total; The Linux implementation of |
Is there an existing issue for this?
Operating System
Ubuntu 22.04
CKAN Version
1.35.2+24280
Games
KSP 1
Game Version
1.12.5.3190
Did you make any manual changes to your game folder (i.e., not via CKAN)?
No response
Describe the bug
Installed CKAN from DEB. Made sure all dependencies (mono) were installed and working as expected. However, will not run properly.
Steps to reproduce
Launched CKAN and it appears to start normally. I can select mods and go to the download screen after clicking "Apply". At that point top menu items are grayed out and the three buttons Back / Clear / Apply are clickable. However, clicking "Apply" does nothing at all. Clicking "Back" returns me to the mod list but the top menus remain blank and I can't exit CKAN without killing the process. Clicking "Clear" works some of the time and some of the time it covers the app with a red X and I again have to kill the process.
Tried executing "mono ckan.exe" within installation folder but it makes no difference.
ckan consoleui also does not work. Hit "+" to install the mod and then nothing. Mod pops to the top of the list. I never get the option to download.
Mono is version 6.8.0.105
Relevant log output
No response
The text was updated successfully, but these errors were encountered: