CIFS Mount Input/Output Errors With Windows 7 Share - centos

I spent several days trying to solve this, so I'm going to post both the question and answer for the next person.
In CentOS 7, mounting a folder shared by Windows 7 with the following command:
mount -t cifs //MyWindowsPC/SharedFolder $MOUNTPOINT -o user=$USER,uid=$USER,gid="`id -g "$USER"`",cache=none
resulted in Input/Output errors using parallel make (make -j), but not with sequential make. The files that gcc/g++ were unable to read changed with each attempt and occasionally gcc/g++ would note that the error was not reproducible. This led me on quite a wild goose chase as system logs showed very generic CIFS/VFS errors.

There is an issue on the Windows side of things. I tried a combination of suggestions from various websites. I haven't spent time to understand the solution, but I narrowed it down to just two Windows registry changes. I have tested that this fixes the problem on 5+ different Windows 7 machines sharing with several different CentOS 7 and CentOS 6.2 machines. Input/output errors disappear and accessing the share is fast. Here is the solution:
Go to Start and search for “regedit”. Open that and navigate to HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/services/LanmanServer/Parameters/. In that folder, change the “Size” parameter from 1 to 3 by right clicking it and selecting “modify”.
In the same folder, right click and select “new->DWORD (32 bit)”. Name it “SMB2” and ensure that it is set to zero (should be default).
Restart your windows machine and that should resolve issues compiling in the windows share.
I'm not sure that both changes are necessary, but I am sure that together they fix the problem.

Related

Snap applications not showing in "show applications", Ubuntu 20.04

Yesterday, after Ubuntu (or maybe Dell) installed some updates and I restarted, my snap applications were not showing on my sidebar, nor are they present in "show applications" or a normal search.
They are still installed and snap list still shows them, and they will still run via snap run <application>.
I've tried uninstalling them all (although I did not use --purge when I ran snap remove <application>), followed by uninstalling snap itself, then re-installing everything. They are still present but not showing up.
More searching has brought me to sites referencing the XDG_DATA_DIRS environment variable (explained HERE). If I understand correctly this should link all the folders where applications are stored, and the paths within should be separated by colons, not spaces. Thus I ran echo $XDG_DATA_DIRS and was rewarded with:
/usr/local/share/:/usr/share/:/var/lib/snapd/desktop /var/lib/snapd/desktop /var/lib/snapd/desktop
So I suspect my issue is the facts that the snapd directory is listed three times, and it is separated by spaces.
Does anyone have any ideas how I could fix this? I suspect, but am not certain that this is the issue.
I'm on Ubuntu 20.04, using fish shell.
I've found THIS post showing a possible solution, and upon running sudo ag "XDG_DATA_DIRS=" / 2>/dev/null | grep -v snap (and waiting a while) I got the following output (minus a few auth.log references which I've removed) Apologies for the big, possibly irreverent, "data dump"
/etc/profile.d/xdg_dirs_desktop_session.sh:4:DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
/etc/profile.d/xdg_dirs_desktop_session.sh:18: XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
/etc/profile.d/xdg_dirs_desktop_session.sh:21: XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
/etc/profile.d/apps-bin-path.sh:12: export XDG_DATA_DIRS="/usr/local/share:/usr/share"
/etc/X11/Xsession.d/55gnome-session_gnomerc:17: XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
/etc/X11/Xsession.d/55gnome-session_gnomerc:19: XDG_DATA_DIRS=/usr/share/gnome:"$XDG_DATA_DIRS"
/etc/X11/Xsession.d/60x11-common_xdg_path:5:DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
/etc/X11/Xsession.d/60x11-common_xdg_path:17: XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
/etc/X11/Xsession.d/60x11-common_xdg_path:20: XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
/usr/share/doc/gnome-software/README.md:24:$ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS ./install/bin/gnome-software
I'm not certain I have found the correct places to think about updating the environment variable, as none of these referenced /var/lib/snaped/desktop...And this might not be the issue causing the problem at all! Any help would be welcome!
You are running into https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1957948 which will require a fix in snapd.
Using a different shell as your login shell, and then executing fish once it has started, is the right workaround.
I am also having the same problem (suddenly Firefox disappeared in Gnome Shell) and I'm using Ubuntu 21.10 with fish shell. And just like you I could not figure out what caused this XDG_DATA_DIRS modification with the separation by spaces. Because you apparently also use fish I tried switching back to bash as login shell (chsh -s /bin/bash), rebooted and voila, the desktop files are loaded again. After that I set fish as the command to start with in gnome-terminal.
TLDR: My quickfix/workaround was chsh -s /bin/bash to switch to bash as login shell (instead of fish) and reboot.
After following Zanchy's links and reading around the issue I found the solution here!!!
I needed to replace
set XDG_DATA_DIRS $XDG_DATA_DIRS $snap_xdg_path
with
set XDG_DATA_DIRS $XDG_DATA_DIRS:$snap_xdg_path
in /usr/share/fish/vendor_conf.d/snapd.fish
Update: After another update I found my snaped.fish file had reverted, and I needed to edit it again - so this solution may need to be re-applied until fish updates it's snap?
I had the same problem on Linux Lite 6.0 (basically same as Ubuntu 22.04). Snap applications (Spotify, Prospect Mail) would not show up our could not even be found when searching for them. Just logging out and back in again put the application shortcuts in the Menu and all worked fine.

Having problems with installing AnyLogic PE on Windows 10

I am having problem with installing the PE version on a Windows 10 machine. Even if I skip this error, several other errors pop up. Any idea how to proceed?
I have similar problems on client machines. Skipping all errors usually works, actually. In my case, they are caused by the installer trying to copy example models into a part of Windows that is locked.
Skipping still lets me use AnyLogic, just no example models.
See if you can install as an admin (right-click the installer and launch as admin)

Github for windows - ssh-agent.exe using high CPU + 100% disk?

I've just installed Github for Windows on my Windows 8.1 machine and it appears to work fine except that my machine performance drops down dramatically.
Looking at task manager I see that ssh-agent.exe is using a constant 25% CPU (no doubt 100% of one of my cores) and the disk usage is at 100%.
I have had a look on the Internet but can't find any reference to what might be causing this.
Any ideas what might be causing this and how to resolve it?
UPDATE:
I can kill the process and GitHub for Windows appears to keep working but the ssh-agent.exe process starts up again as soon as I close and restart Github for Windows.
Further to moggizx's comment in one of the other answers, I found this was influenced by SourceTree too.
The instance of ssh-agent.exe with the high CPU actually gets terminated when you close SourceTree. Restarting SourceTree does cause another ssh-agent process to be spawned, but the CPU is then idle.
We've seen this happen on occasion due to a race condition between ssh-agent and anti-virus software competing over resources. Do you have any anti-virus software installed? Would you be able to temporarily turn it off and see if the problem persists? We'd be very keen to dig deeper into this if you could reach out to support#github.com.
I found the same issue, my solution was to add the file and the process C:\Program Files\Git\usr\bin\ssh-agent.exe to exclusion list in Windows Defender on Windows 10.
The reason this happens is most likely that your git repository is huge. Probably you have mistakenly instantiated it in a folder where you have an enormous amount of files. So git loops over them constantly and thus takes up alot of processing power needlessly. You can try and delete your .git folder(s) and this should stop.
Try and initialize your git repo in a folder where you exclusively use your projects.
I would still consider this to be a sort of bug, because we should be notified if this happens(we shouldn't need to find out by opening task manager).

MATLAB compiled code under mac OS X

I'm having some issues with a MATLAB compiled code under mac. I've tested the same program under windows and linux aswell with NO issue at all.
My program needs two folders to work properly, but it seems that mac doesn't like them, because it can't see them. On the contrary win and linux have no problem seeing and using that folders.
I just want to underline that I obviously put these folders in the deploytool package before creating the package.
Any idea?
Maybe I'm running the program unproperly setting the environmental variables in an unproper way.
edit:
matlab error just after the program has started.
Warning: Name is nonexistent or not a directory: materials
but materials folder is in my "current directory" and I did put that in the deploytool folder too, why it can't see that? It seems an addpath error, but why it doesn't appear under linux and windows?!
Here are a few things to think about:
Have you set your permissions to the folders correctly? I would assume the permissions for OSX should be the same as you used in Linux, but perhaps you forgot to update them after you created the folders?
Is Matlab running as the user you think it is? I don't know about Matlab specifically, but its possible it runs as a particular user depending on the environment you are in.
Is your error definitely that the folders are not found? Sometimes errors regarding disk IO are vague or misleading (like when due to permissions - see point 1 and 2).

Howto share NetBeans profile across 3 computers and 4 separate OS's (Windows and Linux)?

I use 3 different computers and 4 separate OS's (Windows and Linux) and want to take the pain out of making sure plugins are installed correctly, formatting settings are the same, other settings are the same, etc. I don't want to copy them.
Sharing across multiple windows installations is easy, I just need to set the --userdir switch to the location. However one of the OS's is Ubuntu linux, and from this post, it looks like its not going to work.
I heavily use both Windows and Linux for development, so this is an issue. What can I do to make the profile cross compatible? Better yet, is there a plugin that does this automatically?
I have been doing this for quite some time now. Basically here's how I did it
I have a .netbeans folder on my portable hard drive which contains the profile
Each machine has their own netbeans installation due to performance issues. All I do is modify the etc/netbeans.conf configuration file and set it to the path thats for that machine (remember that the drive mounts on different letters and locations)