udev 16, two copies of udevd
When I boot I'm getting two copies of udevd running. If I kill them, then insert/remove a device I only get one udevd. Maybe a race condition when first starting udevd?
==Jon Smirl
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · Jon Smirl
When I boot I'm getting two copies of udevd running. If I kill them, then insert/remove a device I only get one udevd. Maybe a race condition when first starting udevd?
Are you mounting a tmpfs over udev?
The lockfile is placed in there, so it is lost if you mount it over.
Kay
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Yes, I'm mounting a tmpfs. I'm using the tmpfs becuase I've been having trouble with stale nodes in my udev dir when I crash the kernel.
How is this going to work in final form? Will I need an initial /dev with mknod for the 4-5 minimal devices needed to boot, and then can I mount a tmpfs over this to hold udev devices?
Quoted 13 lines · --- Kay Sievers
Quoted 2 lines · Jon Smirl
When I boot I'm getting two copies of udevd running. If I kill them, then insert/remove a device I only get one udevd. Maybe a race condition when
first
Quoted 1 line
starting udevd?
Are you mounting a tmpfs over udev?
The lockfile is placed in there, so it is lost if you mount it over.Kay
Quoted 9 lines
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
==Jon Smirl
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Jon Smirl
Yes, I'm mounting a tmpfs. I'm using the tmpfs becuase I've been having trouble with stale nodes in my udev dir when I crash the kernel.
How is this going to work in final form? Will I need an initial /dev with mknod for the 4-5 minimal devices needed to boot, and then can I mount a tmpfs over this to hold udev devices?
I don't know, what do you think it should look like?
:)
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 9 lines · Greg KH
Quoted 6 lines · Jon Smirl
Yes, I'm mounting a tmpfs. I'm using the tmpfs becuase I've been having trouble with stale nodes in my udev dir when I crash the kernel.
How is this going to work in final form? Will I need an initial /dev with mknod for the 4-5 minimal devices needed to boot, and then can I mount a tmpfs over this to hold udev devices?
I don't know, what do you think it should look like?
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.
Greg, it seems we can remove the lock file code completely. Anyone willing to try? Just comment out the one_and_only() and look if you can produce any situation with two udevd's running. It works for me nice without it, also on tmpfs.
thanks,
Kay
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
I just tried current bk. I still get two copies of udevd running.
Quoted 19 lines · --- Kay Sievers
Quoted 2 lines · Greg KH
Quoted 1 line · Jon Smirl
Yes, I'm mounting a tmpfs. I'm using the tmpfs becuase I've been having
trouble
Quoted 3 lines
Quoted 3 lines
with stale nodes in my udev dir when I crash the kernel.
How is this going to work in final form? Will I need an initial /dev with
mknod
Quoted 1 line
Quoted 1 line
for the 4-5 minimal devices needed to boot, and then can I mount a tmpfs
over
Quoted 3 lines
Quoted 1 line
this to hold udev devices?
I don't know, what do you think it should look like?
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.
Quoted 8 lines
Greg, it seems we can remove the lock file code completely. Anyone willing to try? Just comment out the
one_and_only()and look if you can produce any situation with two udevd's running. It works for me nice without it, also on tmpfs.thanks,
Kay
==Jon Smirl
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines · --- Jon Smirl
I just tried current bk. I still get two copies of udevd running.
Not true. My pull went into PENDING so I ran the old code.
Fixing that problem now I only have one copy of udevd running.
==Jon Smirl
[email protected]
__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 1 line · Jon Smirl
I just tried current bk. I still get two copies of udevd running.
What says "lsof |grep udevd"?
Kay
Quoted 5 lines
Quoted 4 lines · --- Kay Sievers
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 6 lines · Jon Smirl
Quoted 2 lines · --- Jon Smirl
I just tried current bk. I still get two copies of udevd running.
Not true. My pull went into PENDING so I ran the old code.
Fixing that problem now I only have one copy of udevd running.
Ahh, nice. I feel better now :)
Looks promising, next thing to kill is the lock file.
Kay
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Kay Sievers
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.Greg, it seems we can remove the lock file code completely.
I agree, it should be safe to remove that now, which is a very good thing.
Care to send a patch? Or I can do it.
thanks,
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 7 lines · Greg KH
Quoted 6 lines · Kay Sievers
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.
Quoted 6 lines
Quoted 1 line
Greg, it seems we can remove the lock file code completely.
I agree, it should be safe to remove that now, which is a very good thing.
Care to send a patch? Or I can do it.
Here we go...
===== Makefile 1.103 vs edited =====
Makefile +0 -1
@@ -241,7 +241,6 @@ @echo \#define UDEV_PERMISSION_FILE \"$(configdir)\udev.permissions\" >> $@ @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@ @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@ - @echo \#define UDEVD_LOCK \"$(udevdir)/\.udevd.lock\" >> $@ # config files automatically generated GEN_CONFIGS = $(LOCAL_CFG_DIR)/udev.conf
===== udev-remove.c 1.17 vs edited =====
udev-remove.c +0 -1
@@ -34,7 +34,6 @@#include "logging.h" #include "namedev.h" #include "udevdb.h" -#include "libsysfs/libsysfs.h" static int delete_path (char *path) {
===== udevd.c 1.13 vs edited =====
udevd.c +0 -29
@@ -21,7 +21,6 @@#include <pthread.h> #include <stddef.h> -#include <sys/types.h> #include <sys/wait.h> #include <signal.h> #include <unistd.h>
@@ -30,7 +29,6 @@#include <stdlib.h> #include <string.h> #include <time.h> -#include <fcntl.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h>
@@ -324,7 +322,6 @@switch (signum) {case SIGINT :case SIGTERM : -unlink (UDEVD_LOCK );exit (20 + signum);break ;default :
@@ -332,28 +329,6 @@ } } -static int one_and_only (void ) -{ -char string[50 ]; -int lock_file; - - lock_file =open (UDEVD_LOCK ,O_RDWR |O_CREAT ,0x640 ); -if (lock_file <0 ) -return -1 ; - -/* see if we can lock */ -if (lockf (lock_file,F_TLOCK ,0 ) <0 ) { -dbg ("file is already locked, exit" ); -close (lock_file); -return -1 ; - } - -snprintf (string,sizeof (string),"%d\n" ,getpid ()); -write (lock_file, string,strlen (string)); - -return 0 ; -} -int main (int argc,char *argv[]) {int ssock;
@@ -368,10 +343,6 @@int retval;init_logging ("udevd" ); - -/* only let one version of the daemon run at any one time */ -if (one_and_only () !=0 ) -exit (0 );signal (SIGINT , sig_handler);signal (SIGTERM , sig_handler);
Greg KH
AppliedQuoted 8 lines · Kay Sievers
Quoted 7 lines · Greg KH
Quoted 6 lines · Kay Sievers
Jon, please try the current bk tree. We switched away from the socket file, that gets missing with the tmpfs mount.
It should work now, cause we can't listen twice on the same socket in abstract namespace.
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
Greg, it seems we can remove the lock file code completely.
I agree, it should be safe to remove that now, which is a very good thing.
Care to send a patch? Or I can do it.
Here we go...
Applied, thanks.
greg k-h
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel