Subject: bin/22421: fortune always returns the same fortune since updating current
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dive@endersgame.net>
List: netbsd-bugs
Date: 08/09/2003 23:59:13
>Number:         22421
>Category:       bin
>Synopsis:       fortune is returning the same fortune over and over again
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 10 00:00:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     dive
>Release:        NetBSD 1.6W
>Organization:
/~\ The ASCII
\ / Ribbon Campaign                   Sean Davis
 X  Against HTML                       aka dive
/ \ Email!
>Environment:
System: NetBSD eros.endersgame.net 1.6W NetBSD 1.6W (EROS) #561: Sat Aug 9 19:33:53 EDT 2003 dive@eros.endersgame.net:/sys/arch/i386/compile/EROS i386
Architecture: i386
Machine: i386
/usr/games/fortune:
	 -lc.12 => /usr/lib/libc.so.12
/usr/games/fortune:
     $NetBSD: crt0.c,v 1.13 2003/07/26 19:24:27 salo Exp $
     $NetBSD: fortune.c,v 1.39 2003/08/07 09:37:14 agc Exp $
>Description:
/usr/games/fortune always returns the same fortune. It seems this started
after rebuilding and updating -current with gcc3. userland and kernel are in
sync. Observe:
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune
!07/11 PDP a ni deppart m'I  !pleH
<dive@eros(/home/dive)> % fortune netbsd

%____ __   _  ____ __ __ ___  ___   ___
___ /  | / /__  _/ /_  /   |/ __\ / _ |
__ /   |/ // _\/_  _/ / ' / \_ \ / /  /
_ / /|   // __/ / /_ / , | __/ // / ,/
 /_/ |__/_\__/__\__//___/__\__//___'
                -- Greywolf
<dive@eros(/home/dive)> % fortune netbsd

%____ __   _  ____ __ __ ___  ___   ___
___ /  | / /__  _/ /_  /   |/ __\ / _ |
__ /   |/ // _\/_  _/ / ' / \_ \ / /  /
_ / /|   // __/ / /_ / , | __/ // / ,/
 /_/ |__/_\__/__\__//___/__\__//___'
                -- Greywolf
<dive@eros(/home/dive)> % fortune netbsd

%____ __   _  ____ __ __ ___  ___   ___
___ /  | / /__  _/ /_  /   |/ __\ / _ |
__ /   |/ // _\/_  _/ / ' / \_ \ / /  /
_ / /|   // __/ / /_ / , | __/ // / ,/
 /_/ |__/_\__/__\__//___/__\__//___'
                -- Greywolf

fortune -o gives the same (obscene) fortune over and over again, as well. I
just looked, and the fortune files contain a lot more than one fortune, so
it can't be that they were mysteriously truncated to one fortune.
>How-To-Repeat:
build a new toolchain with USE_TOOLS_TOOLCHAIN=no to get a gcc3 toolchain,
build userland, build kernel, install both, reboot, run fortune (the problem
very well might have been present before the reboot after I installed
userland, but if it was I didn't notice - I only logged in once, to reboot
the system, and thus only got a fortune once.)
random() is not broken, nor is the code behind /dev/{u,}random. I have
tested all three, and they all function as they should.
>Fix:
unknown.
>Release-Note:
>Audit-Trail:
>Unformatted: