* Init hangs
@ 2004-08-05 9:54 Marco Schramel
2004-08-05 10:33 ` Wolfgang Denk
0 siblings, 1 reply; 14+ messages in thread
From: Marco Schramel @ 2004-08-05 9:54 UTC (permalink / raw)
To: PPC_LINUX
Hi,
my kernel hangs by initializing the system. My target is mpc8270-based. I use ELDK 3.0 and mount my root-fs over nfs.
Denx-kernel 2.4.25.
I added some printk's in the function "static int init(void * unused)" of linux/init/main.c to see what happens.
#############################################################
.
.
.
(void) dup(0);
(void) dup(0);
/*
* We try each of these until one succeeds.
*
* The Bourne shell can be used instead of init if we are
* trying to recover a really broken machine.
*/
if (execute_command)
run_init_process(execute_command);
printk("before /sbin/init\n");
run_init_process("/sbin/init");
printk("before /etc/init\n");
run_init_process("/etc/init");
printk("before /bin/init\n");
run_init_process("/bin/init");
printk("before /bin/sh\n");
run_init_process("/bin/sh");
##################################
the last lines of my boot messages
#######################################
IP-Config: Complete:
device=eth0, addr=192.168.55.3, mask=255.255.255.0, gw=255.255.255.255,
host=192.168.55.3, domain=, nis-domain=(none),
bootserver=192.168.55.1, rootserver=192.168.55.1, rootpath=
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Looking up port of RPC 100003/2 on 192.168.55.1
Looking up port of RPC 100005/1 on 192.168.55.1
VFS: Mounted root (nfs filesystem).
Freeing unused kernel memory: 72k init
before /sbin/init
##############################################
It seems like it hangs in "run_init_process("/sbin/init");" or the /sbin/init - file does not work.
Sometimes the message "INIT: version 2.84 booting" is showed. And after printing this message it hangs, too.
But the most times it looks like above.
Any ideas?
Thanks in advance
Marco
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Init hangs
2004-08-05 9:54 Init hangs Marco Schramel
@ 2004-08-05 10:33 ` Wolfgang Denk
2004-08-05 15:28 ` Marco Schramel
0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2004-08-05 10:33 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
In message <200408051154.54426.Schramel.Linux@go.bartec.de> you wrote:
>
> my kernel hangs by initializing the system. My target is mpc8270-based. I use ELDK 3.0 and mount my root-fs over nfs.
> Denx-kernel 2.4.25.
...
> It seems like it hangs in "run_init_process("/sbin/init");" or the /sbin/init - file does not work.
> Sometimes the message "INIT: version 2.84 booting" is showed. And after printing this message it hangs, too.
> But the most times it looks like above.
>
> Any ideas?
Run ethereal and have a look at the network traffic. Check which
files get loaded and/or accessed. This might give you an idea.
But first check your memory map. Kernels crashing when entering user
space are often an indication of illegal memory maps. See
http://www.denx.de/twiki/bin/view/PPCEmbedded/Kernel#Section_10.2.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
How much net work could a network work, if a network could net work?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Init hangs
2004-08-05 10:33 ` Wolfgang Denk
@ 2004-08-05 15:28 ` Marco Schramel
2004-08-05 17:48 ` Wolfgang Denk
0 siblings, 1 reply; 14+ messages in thread
From: Marco Schramel @ 2004-08-05 15:28 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: PPC_LINUX
Hi Wolfgang,
thanks for your reply.
> > my kernel hangs by initializing the system. My target is mpc8270-based. I use ELDK 3.0 and mount my root-fs over nfs.
> > Denx-kernel 2.4.25.
> ...
> > It seems like it hangs in "run_init_process("/sbin/init");" or the /sbin/init - file does not work.
> > Sometimes the message "INIT: version 2.84 booting" is showed. And after printing this message it hangs, too.
> > But the most times it looks like above.
> >
> > Any ideas?
>
> Run ethereal and have a look at the network traffic. Check which
> files get loaded and/or accessed. This might give you an idea.
i started ethereal and saw that the NFS read calls from target to host, are answered with two IP "fragmented IP protocols" by the host,
followed by a NFS read reply [Unreassembled Packet] by the host, too. And that goes on and on until the connection is dead.
I am not sure whether the fragmentation of ip in two packets is correct? There is no additional traffic it is "only" mounting and using rootfs over NFS.
Can you help me ?
Thanks
Marco
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread* Re: Init hangs
2004-08-05 15:28 ` Marco Schramel
@ 2004-08-05 17:48 ` Wolfgang Denk
2004-08-06 6:26 ` Marco Schramel
0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2004-08-05 17:48 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
Dear Marco,
in message <200408051728.52442.Schramel.Linux@go.bartec.de> you wrote:
>
> i started ethereal and saw that the NFS read calls from target to host, are answered with two IP "fragmented IP protocols" by the host,
> followed by a NFS read reply [Unreassembled Packet] by the host, too. And that goes on and on until the connection is dead.
> I am not sure whether the fragmentation of ip in two packets is correct? There is no additional traffic it is "only" mounting and using rootfs over NFS.
The fragmentation is OK, but this is not what you're looking for.
You should see a couple of LOOKUP calls, probably in the sequence of
/dev, console, sbin, init, lib, ld.so.1, and so on. Find out what the
last succesful lookup call was, and what happens after this.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
A metaphor is like a simile.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-05 17:48 ` Wolfgang Denk
@ 2004-08-06 6:26 ` Marco Schramel
2004-08-06 8:11 ` Wolfgang Denk
0 siblings, 1 reply; 14+ messages in thread
From: Marco Schramel @ 2004-08-06 6:26 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: PPC_LINUX
Dear Wolfgang,
> The fragmentation is OK, but this is not what you're looking for.
Ok.
> You should see a couple of LOOKUP calls, probably in the sequence of
> /dev, console, sbin, init, lib, ld.so.1, and so on. Find out what the
> last succesful lookup call was, and what happens after this.
Searching the outputfile of ethereal tells me that the last working nfs LOOKUP call is the libc-2.3.1 call. After this and a lot of Read Call, Read Reply transfers the Target doesn't answer the host.
(ARP "who has targetip-address?"). Before this, the ld.so.preload LOOKUP call fails.
(History: dev, console, sbin, init, lib, ld.so.1, ld-2.3.1.so, etc, ld.so.preload (fails), ld.so.cache, libc.so.6, libc-2.3.1, than it crashes). Is the ld.so.preload necessary?
Best regards
Marco
--
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 6:26 ` Marco Schramel
@ 2004-08-06 8:11 ` Wolfgang Denk
2004-08-06 11:22 ` Ralph Siemsen
0 siblings, 1 reply; 14+ messages in thread
From: Wolfgang Denk @ 2004-08-06 8:11 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
In message <200408060826.21301.Schramel.Linux@go.bartec.de> you wrote:
>
> Searching the outputfile of ethereal tells me that the last working nfs LOOKUP call is the libc-2.3.1 call. After this and a lot of Read Call, Read Reply transfers the Target doesn't answer the host.
> (ARP "who has targetip-address?"). Before this, the ld.so.preload LOOKUP call fails.
> (History: dev, console, sbin, init, lib, ld.so.1, ld-2.3.1.so, etc, ld.so.preload (fails), ld.so.cache, libc.so.6, libc-2.3.1, than it crashes). Is the ld.so.preload necessary?
No, it's not necesary. It's normal that this lookup fails.
Looks as if your init is crashing.
Try running a (statically linked) shell instead (by passing some
init=/bin/sh" option on the boot command line).
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
It is easier to write an incorrect program than understand a correct
one.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 8:11 ` Wolfgang Denk
@ 2004-08-06 11:22 ` Ralph Siemsen
2004-08-06 12:38 ` Dan Malek
2004-08-06 12:46 ` Wolfgang Denk
0 siblings, 2 replies; 14+ messages in thread
From: Ralph Siemsen @ 2004-08-06 11:22 UTC (permalink / raw)
To: PPC_LINUX
Wolfgang Denk wrote:
> Looks as if your init is crashing.
>
> Try running a (statically linked) shell instead (by passing some
> init=/bin/sh" option on the boot command line).
This could also be a floating point issue. Most code compiled against
libc will try to "reset" the floating point state upon startup. This
will cause a fault if you do not have a kernel floating point emulator
of some sort loaded to handle it. (Even though init doesn't use any
floating point itself). So as a quick test try building your kernel
with CONFIG_MATH_EMULATION=y
-R
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 11:22 ` Ralph Siemsen
@ 2004-08-06 12:38 ` Dan Malek
2004-08-06 13:14 ` Robert P. J. Day
2004-08-06 12:46 ` Wolfgang Denk
1 sibling, 1 reply; 14+ messages in thread
From: Dan Malek @ 2004-08-06 12:38 UTC (permalink / raw)
To: Ralph Siemsen; +Cc: PPC_LINUX
On Aug 6, 2004, at 7:22 AM, Ralph Siemsen wrote:
> This could also be a floating point issue.
I doubt it. The processor in question is an 8270, which
has an FPU.
> Most code compiled against
> libc will try to "reset" the floating point state upon startup. This
> will cause a fault if you do not have a kernel floating point emulator
> of some sort loaded to handle it.
On the MPC8xx, which does not have a floating point unit,
there is still sufficient support in the kernel to trap and emulate
FPU reset and context save/restore for this purpose. You only
need the CONFIG_MATH_EMULATION is you intend to
really do floating point arithmetic.
> (Even though init doesn't use any
> floating point itself). So as a quick test try building your kernel
> with CONFIG_MATH_EMULATION=y
This should not be used with any processor that has hardware
floating point. In the rare cases where you may actually be
utilizing IEEE trap conditions, these functions could get in the
way and produce erroneous results.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 12:38 ` Dan Malek
@ 2004-08-06 13:14 ` Robert P. J. Day
2004-08-06 13:49 ` Dan Malek
0 siblings, 1 reply; 14+ messages in thread
From: Robert P. J. Day @ 2004-08-06 13:14 UTC (permalink / raw)
To: Dan Malek; +Cc: Ralph Siemsen, PPC_LINUX
On Fri, 6 Aug 2004, Dan Malek wrote:
> On the MPC8xx, which does not have a floating point unit, there is
> still sufficient support in the kernel to trap and emulate FPU reset
> and context save/restore for this purpose. You only need the
> CONFIG_MATH_EMULATION is you intend to really do floating point
> arithmetic.
thanks for that tidbit. i've always wondered, for our 850DE, hmmm ...
math emulation or no math emulation? i guess i can just make sure
it's turned off, and see if it ever causes a problem.
rday
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 13:14 ` Robert P. J. Day
@ 2004-08-06 13:49 ` Dan Malek
0 siblings, 0 replies; 14+ messages in thread
From: Dan Malek @ 2004-08-06 13:49 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: PPC_LINUX, Ralph Siemsen
On Aug 6, 2004, at 9:14 AM, Robert P. J. Day wrote:
> thanks for that tidbit.
Trivia time. The reason I did that many years ago when first ported
the 8xx
was I had only 6xx tools and libraries available. Even though you don't
have any floating point in your program, things like initialization,
set/longjmp,
signals and so on would assume an FPU was available. So, I just
trapped those few FP load/store instructions. Later on, I did the whole
math emulation thing. Of course, today the best solution is a
development
kit specific to the 8xx that has applications and libraries already
properly
compiled. Without math emulation enabled, you still get those few
trivial traps emulated.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 11:22 ` Ralph Siemsen
2004-08-06 12:38 ` Dan Malek
@ 2004-08-06 12:46 ` Wolfgang Denk
2004-08-06 13:12 ` Ralph Siemsen
2004-08-06 13:44 ` Dan Malek
1 sibling, 2 replies; 14+ messages in thread
From: Wolfgang Denk @ 2004-08-06 12:46 UTC (permalink / raw)
To: Ralph Siemsen; +Cc: PPC_LINUX
In message <411369F9.5060506@rossvideo.com> you wrote:
>
> This could also be a floating point issue. Most code compiled against
> libc will try to "reset" the floating point state upon startup. This
> will cause a fault if you do not have a kernel floating point emulator
No, this has nothing to do with it.
First, Marco wrote that he is working on a 8270 processor which has a
FPU, so FP issues should not play a role here.
Second, he mentioned that he was using the ELDK which takes care of
using soft-float on processors without a MMU.
Thanks.
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
The following statement is not true. The previous statement is true.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 12:46 ` Wolfgang Denk
@ 2004-08-06 13:12 ` Ralph Siemsen
2004-08-06 13:44 ` Dan Malek
1 sibling, 0 replies; 14+ messages in thread
From: Ralph Siemsen @ 2004-08-06 13:12 UTC (permalink / raw)
To: PPC_LINUX
Wolfgang Denk wrote:
> No, this has nothing to do with it.
I stand corrected ;) Thanks Dan and Wolfgang. I'm still a ppc newbie,
not yet familiar with all of the different sub-architecture features and
options, sorry :(
I had "init troubles" on the 44x and it had turned out to be FP issue
(my init for testing is actually busybox, so it kind of makes sense).
-Ralph
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 12:46 ` Wolfgang Denk
2004-08-06 13:12 ` Ralph Siemsen
@ 2004-08-06 13:44 ` Dan Malek
2004-08-06 14:36 ` Wolfgang Denk
1 sibling, 1 reply; 14+ messages in thread
From: Dan Malek @ 2004-08-06 13:44 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: PPC_LINUX, Ralph Siemsen
On Aug 6, 2004, at 8:46 AM, Wolfgang Denk wrote:
> Second, he mentioned that he was using the ELDK which takes care of
> using soft-float on processors without a MMU.
Without an MMU? Really? :-) Just kidding. I'm just glad I'm
not the only one that types stuff like that once in a while.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: Init hangs
2004-08-06 13:44 ` Dan Malek
@ 2004-08-06 14:36 ` Wolfgang Denk
0 siblings, 0 replies; 14+ messages in thread
From: Wolfgang Denk @ 2004-08-06 14:36 UTC (permalink / raw)
To: Dan Malek; +Cc: PPC_LINUX, Ralph Siemsen
In message <C47B18AA-E7AE-11D8-9B14-003065F9B7DC@embeddededge.com> you wrote:
>
> On Aug 6, 2004, at 8:46 AM, Wolfgang Denk wrote:
...
> > using soft-float on processors without a MMU.
>
> Without an MMU? Really? :-) Just kidding. I'm just glad I'm
> not the only one that types stuff like that once in a while.
Brain offline, please wait ;-)
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
The only way to learn a new programming language is by writing pro-
grams in it. - Brian Kernighan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-08-06 14:36 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 9:54 Init hangs Marco Schramel
2004-08-05 10:33 ` Wolfgang Denk
2004-08-05 15:28 ` Marco Schramel
2004-08-05 17:48 ` Wolfgang Denk
2004-08-06 6:26 ` Marco Schramel
2004-08-06 8:11 ` Wolfgang Denk
2004-08-06 11:22 ` Ralph Siemsen
2004-08-06 12:38 ` Dan Malek
2004-08-06 13:14 ` Robert P. J. Day
2004-08-06 13:49 ` Dan Malek
2004-08-06 12:46 ` Wolfgang Denk
2004-08-06 13:12 ` Ralph Siemsen
2004-08-06 13:44 ` Dan Malek
2004-08-06 14:36 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).