Subject: port-dreamcast/34243: Some commands of NetBSD/dreamcast-current hang-up
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 08/20/2006 17:00:01
>Number:         34243
>Category:       port-dreamcast
>Synopsis:       Some commands of NetBSD/dreamcast-current hang-up
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-dreamcast-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 20 17:00:01 +0000 2006
>Originator:     Yasushi Oshima
>Release:        NetBSD 4.99.1
NetBSD dreamcast 4.99.1 NetBSD 4.99.1 (GENERIC) #0: Fri Aug 18 23:38:14
UTC 2006
ome/builds/ab/HEAD/src/sys/arch/dreamcast/compile/GENERIC dreamcast

Some commands of current (after Feb 4, 2006) not work, hang-up. 

I use 4.99.1-kernel and 3.99.15-userland(at Jan, 2006), this works well.
However the userland after Feb 4,2006 are not well.
Some important commands don't work, it hangups.

# /bin/sleep
(no response)
# /bin/ssh -V
(no response)

Interrupt(Control-C) works.

gdb's log:

# gdb /bin/sleep
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "shle--netbsdelf"...(no debugging symbols found)...
(gdb) run
Starting program: /bin/sleep 
(no debugging symbols found)...(no debugging symbols found)...

**** ((( no return while very long time. Hang-up. Hit Interrupt ))) ****

^C(no debugging symbols found)...
Program received signal SIGINT, Interrupt.
0x00400ccc in frame_dummy ()
(gdb) bt
#0  0x00400ccc in frame_dummy ()
#1  0x00400824 in init_fallthru ()
#2  0x7fffdd1c in ?? ()
(gdb) c

******** ((( no return again )))  ********

Strangely,&#12288;When using 'stepi' once, this works normally.

(gdb) stepi
0x00400cce in frame_dummy ()
(gdb) c
usage: sleep seconds

Program exited with code 01.

For more information,

When build userland by GCC 3.3.x (not GCC4), this problem occurs with other commands, for example, /sbin/mknod, /usr/bin/tset.
However, /bin/sleep works well. I don't know why.

I think the cause of this problem is not GCC4.

and I checkout with cvs co -Dxxxx and build some userland.
The results:

2006.  work.
2006.  not work. some commands (Ex./usr/bin/tset) hang-up.

It seems that this strange problem occurs after imported binutils 2.16.1.
And this problem does not occur on NetBSD/hpcsh with Jornada690 (SH3), it works well. 
I think this occurs with SH4 CPUs only.

Use userland before Feb, 2006 (Befor import binutils 2.16.1).
Extracted 4.99.1-userland to /altroot/, then chroot to here.

# uname -srm
NetBSD 4.99.1 dreamcast
# file /bin/sleep
/bin/sleep: ELF 32-bit LSB executable, Hitachi SH, version 1 (SYSV), for NetBSD 3.99.15, dynamically linked (uses shared libs), for NetBSD 3.99.15, not stripped
# /bin/sleep
usage: sleep seconds
# cd /altroot
# file ./bin/sleep
/bin/sleep: ELF 32-bit LSB executable, Hitachi SH, version 1 (SYSV), for NetBSD 4.99.1, dynamically linked (uses shared libs), for NetBSD 4.99.1, not stripped
# chroot /altroot
# /bin/sleep 

no idea.