Subject: kern/16284: running function in stoped gdb causes signal 93
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lha@stacken.kth.se>
List: netbsd-bugs
Date: 04/10/2002 15:07:46
>Number: 16284
>Category: kern
>Synopsis: running function in stoped gdb causes signal 93
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 10 06:09:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Love
>Release: NetBSD 1.5ZC
>Organization:
Stacken Computer Club
>Environment:
System: NetBSD nutcracker.stacken.kth.se 1.5ZC NetBSD 1.5ZC (NUTCRACKER) #8: Mon Apr 8 06:06:20 CEST 2002 lha@nutcracker.stacken.kth.se:/usr/src/sys/arch/i386/compile/NUTCRACKER i386
Architecture: i386
Machine: i386
>Description:
Running function in stoped gdb causes signal 93, example:
On a 1.5ZC/i386 host:
: root@nutcracker ; uname -rm
1.5ZC i386
: root@nutcracker ; cp /afs/e.kth.se/home/staff/lha/src/hacks/bar.c /tmp
: root@nutcracker ; gcc -o bar bar.c -g
: root@nutcracker ; gdb -q bar
(gdb) r
Starting program: /tmp/bar
^C
Program received signal SIGINT, Interrupt.
0x4809e9ef in select () from /usr/lib/libc.so.12
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x4809e9ef in select () from /usr/lib/libc.so.12
(gdb) p foo()
hej
$1 = void
(gdb) c
Continuing.
bar: select: Unknown error: 93
Program exited with code 01.
On a 1.5.3_ALPHA/i386 host:
: root@leif ; uname -rm
1.5.3_ALPHA i386
: root@leif ; gcc -o bar bar.c -g
: root@leif ; gdb -q bar
(gdb) r
Starting program: /tmp/bar
^C
Program received signal SIGINT, Interrupt.
0x48093c4b in select ()
(gdb) c
Continuing.
^C
Program received signal SIGINT, Interrupt.
0x48093c4b in select ()
(gdb) p foo()
hej
$1 = void
(gdb) c
Continuing.
>How-To-Repeat:
Use the following testprogram bar.c and do like above.
cat > bar.c <<EOF
#include <sys/types.h>
#include <sys/time.h>
#include <stdio.h>
#include <errno.h>
#include <err.h>
#include <unistd.h>
void
foo(void)
{
write(1, "hej\n", 4);
}
int
main(int argc, char **argv)
{
int ret;
struct timeval tv, t = { 1, 0};
while(1) {
tv = t;
ret = select(0, NULL, NULL, NULL, &tv);
if (ret < 0 && errno != EAGAIN)
err(1, "select");
}
}
EOF
>Fix:
Unknown at this moment.
>Release-Note:
>Audit-Trail:
>Unformatted: