Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVE]Lock is alwasy held by pid * after install new kernel

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ching
Posts: 20
Joined: 2009-03-14 08:21

[SOLVE]Lock is alwasy held by pid * after install new kernel

#1 Post by ching »

Hello,
Yesterday I've compiled the kernel 2.6.31.1 in order to fix my buggy DSDT.
On bootup, it tell me that
Starting enhanced syslogd Can't lock,lock is held by pid ***.
Can't write pid.
After some mins, the login prompt appears and then execute

Code: Select all

/etc/init.d/rsyslog restart
Show me that cannot write pid file, lock is held by pid *** ( the pid will be changed every time I execute this command )

Some weird info:

/var/run/rsyslogd.pid is empty
updatedb: `/var/lib/mlocate/mlocate.db' is locked (probably by an earlier updatedb)
Configuring network interfaces...ifup: failed to lock statefile /etc/network/run/ifstate: Permission denied
failed.
Same to http://forums.debian.net/viewtopic.php?f=5&t=45412

Ntfs-3g warn me the same permission question above.
My fstab about ntfs-3g
/dev/hda1 /media/hda1 ntfs-3g defaults,iocharset=utf8,umask=000,relatime 0 1

Sorry I don't know what exact info I need to give, so feel free to tell me.
Kind regard,
Ching


EDIT:
set File Systems->Enable POSIX file locking api to y
Last edited by ching on 2009-09-29 07:11, edited 1 time in total.

User avatar
bugsbunny
Posts: 5354
Joined: 2008-07-06 17:04
Been thanked: 1 time

Re: Lock is alwasy held by pid * after install new kernel

#2 Post by bugsbunny »

What if you boot into the old kernel?

ching
Posts: 20
Joined: 2009-03-14 08:21

Re: Lock is alwasy held by pid * after install new kernel

#3 Post by ching »

bugsbunny wrote:What if you boot into the old kernel?
Everything goes well in my old kernel 2.6.30-1-amd64

SR-Software.at
Posts: 1
Joined: 2017-05-14 08:06

Re: [SOLVE]Lock is alwasy held by pid * after install new ke

#4 Post by SR-Software.at »

Some may think it's a bad idea to answer an 7 Years old post, but this problem also exists today (with google i haven't found a solution to resolve this)...
After about more than five hours of stumbling around, recompiling the kernel a dozen times (replacing rsyslog with syslog is no option as aptitude also stoped working).
(In fact the pid or lockfile gets created by the programm, but there gets no data writen to it, since the filecontent is "", the readed pid from the file is interpreted as somthing like "0" or "-1").
if thought there must be an error with some file function, i searched (make menuconfig) for file, and found the key "file_locking" was set to "n"

The solution should be:

Code: Select all

file_locking=y
when using menuconfig
File systems --->
[*] Enable POSIX file locking API

after starting with the file_locking enabled kernel, rsyslogd and crond resumed working as espected...

Post Reply