public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: problem with devfsd compilation
@ 2001-02-01 19:26 Andris Pavenis
  0 siblings, 0 replies; 9+ messages in thread
From: Andris Pavenis @ 2001-02-01 19:26 UTC (permalink / raw)
  To: alan, hiren_mehta; +Cc: linux-kernel

>> I am trying to compile devfsd on my system running RedHat linux 7.0
>> (kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
>> sure where this symbol is defined. Is there anything that I am missing 
>> on my system. 
>
>
>Sounds like a missing include in the devfsd code. That comes from 
>dlfcn.h. 

Following small patch fixes this and workarounds devfs related problem
which appeared in 2.4.0-test12-pre8:
	when I'm logging out, devfsd tries to state /dev/vcc/[1-6] but sometimes
	fails perhaps due to some race in kernel. As result devfsd quits with 
	error message. Retrying to state node suceeds on next attempt.
	I don't know why it happens, but I guess it's related to 
	change in drivers/char/tty_io.c between test12-pre7 and pre8
	(change to use flush_scheduled_tasks())

Hint: it seems to be easier to reproduce on slower machine (it happens seldom 
	on PIII-700, but very often on P200MMX)

Andris


--- devfsd/devfsd.c~1	Mon Jul  3 22:43:07 2000
+++ devfsd/devfsd.c	Fri Jan 12 13:19:33 2001
@@ -189,6 +189,7 @@
 #include <signal.h>
 #include <regex.h>
 #include <errno.h>
+#define __USE_GNU
 #include <dlfcn.h>
 #include <rpcsvc/ypclnt.h>
 #include <rpcsvc/yp_prot.h>
@@ -918,15 +919,29 @@
     [RETURNS] Nothing.
 */
 {
+    int tries=0;
     mode_t new_mode;
     struct stat statbuf;
 
+Retry:   
     if (lstat (info->devname, &statbuf) != 0)
     {
-	SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
-		info->devname, ERRSTRING);
-	SYSLOG (LOG_ERR, "exiting\n");
-	exit (1);
+	if (tries<10)
+	{
+	   tries++;
+           SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+	   	   info->devname, ERRSTRING);
+           SYSLOG (LOG_ERR, "retrying (attempt %d) ...\n",tries);
+	   usleep (1000);  /* Let's sleep a bit  */
+	   goto Retry;
+	}
+	else
+	{
+	   SYSLOG (LOG_ERR, "error stat(2)ing: \"%s\"\t%s\n",
+	   	   info->devname, ERRSTRING);
+	   SYSLOG (LOG_ERR, "exiting\n");
+	   exit (1);
+	}
     }
     new_mode = (statbuf.st_mode & S_IFMT) |
 	(entry->u.permissions.mode & ~S_IFMT);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: problem with devfsd compilation
@ 2001-02-02  2:50 Frédéric L. W. Meunier
  2001-02-02 14:46 ` Georg Nikodym
  0 siblings, 1 reply; 9+ messages in thread
From: Frédéric L. W. Meunier @ 2001-02-02  2:50 UTC (permalink / raw)
  To: Linux Kernel

Georg Nikodym wrote:

> Also, RH7's /etc/rc.sysinit can already start devfsd
> automatically with the following line:   

> [ -e /dev/.devfsd -a -x /sbin/devfsd ] && /sbin/devfsd /dev

If devfs is mounted and devfsd exists, start devfsd.

> So, all you have to do is create an empty file /dev/.devfsd

Not true. I'm pretty sure /dev/.devfsd is only created when you
mount devfs at boot time or via mount -t devfs devfs /dev in
your system initialization script. Creating /dev/.devfsd with
touch defeats the purpose of /etc/rc.sysinit example.

crw-------  1 root     root     144,  0 Dec 31  1969 .devfsd

-- 
Frédéric L. W. Meunier - http://www.pervalidus.net/
0@pervalidus.{net, {dyndns.}org} Tel: 55-21-717-2399 (Niterói-RJ BR)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread
* problem with devfsd compilation
@ 2001-02-01 18:37 hiren_mehta
  2001-02-01 18:44 ` Georg Nikodym
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: hiren_mehta @ 2001-02-01 18:37 UTC (permalink / raw)
  To: linux-kernel

Hi,

I am trying to compile devfsd on my system running RedHat linux 7.0
(kernel 2.2.16-22). I get the error "RTLD_NEXT" undefined. I am not
sure where this symbol is defined. Is there anything that I am missing 
on my system. 

Also, I applied the devfs patch to the kernel, installed the new
kernel, modified lilo.conf, ran lilo and rebooted the system
with the  option "devfs=nomount". The system is able to mount
the root file system in readonly mode. But after that when
it tries to do fsck to the root file system before mounting 
it in "rw" mode, it fails. Looks like devfs seems to be
having a problem with my /etc/fstab. My /etc/fstab has device names
specified in the "LABEL=.." format. Does devfs understand LABEL=..
format ?

Any help is appreciated.

-hiren
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-02-06 10:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-01 19:26 problem with devfsd compilation Andris Pavenis
  -- strict thread matches above, loose matches on Subject: below --
2001-02-02  2:50 Frédéric L. W. Meunier
2001-02-02 14:46 ` Georg Nikodym
2001-02-01 18:37 hiren_mehta
2001-02-01 18:44 ` Georg Nikodym
2001-02-01 18:45 ` Alan Cox
2001-02-02  6:25   ` Michael B. Trausch
2001-02-01 18:52 ` Georg Nikodym
2001-02-02  8:21 ` Michael B. Trausch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox