[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] fsck -A goes into infinite loop and kills all processes
From:       Roy Marples <roy () marples ! name>
Date:       2008-01-31 20:32:47
Message-ID: 1201811567.3887.1.camel () uberlaptop ! marples ! name
[Download RAW message or body]

On Thu, 2008-01-31 at 18:17 +0000, Roy Marples wrote:
> On Thu, 2008-01-31 at 12:52 -0500, Paul Fox wrote:
> > > Which isn't good.
> >  > 
> >  > I get "wait: No more child process?!?" a zillion times down the screen,
> >  > hit ctrl-c and then boom, everything dies.
> >  > 
> >  > Debugging is ..... tricky as such and I can't see anything obviously
> >  > wrong.
> > 
> > do you have strace?  try "strace -f -e execve fsck -A".  that may give
> > a clue as to what's being run.
> 
> Ah yes, it's because there is no helper installed for ext4dev. Ensuring
> that all helpers exist fixes the error. So it's not handling exec errors
> correctly. I'll see if I can fix fsck now.

The execute function does not return when pid is <1, so it stores -1 as
a pid to kill, which kills quite a bit really :)

Patch attached to fix.

Thanks

Roy

["busybox-fsck.patch" (busybox-fsck.patch)]

diff -ur busybox-1.9.0.orig/e2fsprogs/fsck.c busybox-1.9.0/e2fsprogs/fsck.c
--- busybox-1.9.0.orig/e2fsprogs/fsck.c	2007-12-21 22:00:31.000000000 +0000
+++ busybox-1.9.0/e2fsprogs/fsck.c	2008-01-31 20:17:12.000000000 +0000
@@ -658,8 +658,10 @@
 	pid = -1;
 	if (!noexecute) {
 		pid = spawn(argv);
-		if (pid < 0)
+		if (pid < 0) {
 			bb_simple_perror_msg(argv[0]);
+			return;
+		}
 	}
 
 	for (i = num_args+1; i < argc; i++)


_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic