# Cannot remove I/O lock / kill process



## The Alchemist (Aug 12, 2017)

Hello everyone,

I am using Node.js and NPM on my FreeBSD 10.3 server (with ZFS).
Sometimes, during the npm install command, the installation freezes and stops working.

The I/O lock, however, stays in place.
I have had this issue 3 times now, and the only thing that works is rebooting. (that I know of)

What I tried to do:


Kill the npm process:
`$ ps aux | grep npm
bart        25706   0.0  0.8  790740 135220  2- T+    5:37PM     0:08.40 npm (node)
bart        26114   0.0  0.0   18832   2224  5  S+    5:57PM     0:00.00 grep npm
$ sudo kill 25706`


This is not working, trying -9:
`$ sudo kill -9 25706`


This however, did not remove the file lock, because when I wanted to remove the folder, the command froze up again! Sigh..
Trying fuser:
`$ fuser -m -u ng2-file-manager/
/data/node_root/ng2-file-manager/: 25706c(bart) 25823c(bart)`


Ok, so there are still processes that keep the folder locked:
`$ sudo fuser -k ng2-file-manager/`


I tried to remove the folder again, but it is still freezing my sh session...

Any idea's to fix this?
Is there a ZFS lock that I need to remove?


----------



## The Alchemist (Aug 12, 2017)

More info:

It appears that killing the npm installation process using CTRL + C is causing the `locking`.
I have run the npm install with logging and I was just impatient.
I have killed the process during a make build.

However, those processes that I stopped using the shortcut do lock up my folder.
Any idea to remove the locks?


----------



## The Alchemist (Jan 13, 2018)

Still having the same issues with not being able to remove file locks on my system.

Anyone ideas on how to detect and remove I/O locks?


----------



## fronald (Dec 12, 2019)

Sorry for exhuming this post. But, i have same problem.

My Jenkins CI hosted in a FreeBSD Jail, locks the filesystem during an execution of "npm install". All filesystem hangs. Inside and outside of jail that running npm.

It is so catastrophic that a server reboot is required, resulting in a great downtime for some applications in our company.

Any ideas?

FreeBSD 10.1-RELEASE #0 r274401 - ZFS


----------



## Crivens (Dec 12, 2019)

Updating to a newer version?
Maybe one which is not EOL, preferably?


----------



## SirDice (Dec 12, 2019)

FreeBSD 10.1 has been End-of-Life since December 2016 and is not supported any more.









						Unsupported FreeBSD Releases
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org
				



Topics about unsupported FreeBSD versions


----------



## fronald (Dec 12, 2019)

I know about 10.1 and your EOL status. But our hosting vendor not supports latest versions (We are quite disappointed with them  , but we do not have time to change them now).

Any workaround would be welcome...


----------

