Adrian Moya's picture

Hi guys, after a succesfull run of tklpatch-apply, when I run tklpatch-prepare-cdroot, I'm getting lots of errors like this:

 

Failed to read file turnkey-core-beta-lucid-x86.rootfs/proc/796/task/796/wchan, creating empty file

Failed to read file turnkey-core-beta-lucid-x86.rootfs/proc/796/wchan, creating empty file

Failed to read file turnkey-core-beta-lucid-x86.rootfs/proc/8/attr/current, creating empty file

Read failed because Invalid argument

Failed to read file turnkey-core-beta-lucid-x86.rootfs/proc/8/attr/exec, creating empty file

Read failed because Invalid argument

Failed to read file turnkey-core-beta-lucid-x86.rootfs/proc/9/cpuset, creating empty file

Failed to read symlink turnkey-core-beta-lucid-x86.rootfs/proc/9/exe, creating empty symlink

Read failed because Invalid argument

Any ideas how to avoid this? Thanks...

I attached the list of running processes at the time of finishing tklpatch-apply

Also, the process (tklpatch-prepare-cdroot) hangs. 

Thanks for your support

Forum: 
Adrian Moya's picture

If you've been messing with tklpatch-chroot while developing your tklpatch, and you get errors like this, this is due to running services which have blocked files in the rootfs. I stopped all services and couldn't get rid of this error. But, today I started again testing and had no errors. The learned lesson is: Apply a windows solution, reboot your development appliance! Some times it's difficult to track which process is locking the files, so it's easier to just reboot the appliance and test the tklpatch again with a clean system.

This also happened to me: I was unable to rm -Rf turnkey-*.rootfs. The same solution apply. Reboot to kill running processes locking files in rootfs.

Liraz Siri's picture

Fuser is a utility which sends signals (e.g., KILL) to any process that has open files in a filesystem path. You can use it to kill rogue processes. Easier than rebooting.
fuser -k path/to/rootfs
man fuser
Adrian Moya's picture

Nothing makes me happier than knowing a new command line tool :D

Wow , that is is nice info . normally i do

ps -ef |grep mysql
ps -ef |grep apache 

then

kill -9 <Process_id>

Add new comment