TurnKey Linux Virtual Appliance Library

Problems in tklpatch-prepare-cdroot

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

Attached: 

I'll answer here my own question

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 easier than rebooting

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

Nice!

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

Basil Kurian's picture

fuser

Wow , that is is nice info . normally i do

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

then

kill -9 <Process_id>


Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)