Manuel Bouyer | 1 Dec 2003 01:31

Re: Lots of pkgsrc warnings...

On Sun, Nov 30, 2003 at 03:55:12AM -0600, Richard Rauch wrote:
> I've been seeing a lot of pkgsrc code complain that a logical expression
> is always true (or false, as the case may be) due to the size of the
> types in question.  (One case was libxml, where I mentally unwrapped
> a macro that it was using for the (non-UNICODE) character class tests,
> and I couldn't see why it should always be true---SOME of the
> values were in the positive range of a signed 8-bit byte, and some where
> out of range, and without knowing a' priori the value of the byte, I
> couldn't see any way to categorically classify the condition "always true".)
> 
> 
> Have others noticed this?  Is it a -current, GCC 3.x, general 64-bit,
> or port-amd64 issue?  Or none of the above?

I've seen complains from some packages on alpha too.
I suspect at last some of these packages are buggy.

--

-- 
Manuel Bouyer <bouyer <at> antioche.eu.org>
     NetBSD: 24 ans d'experience feront toujours la difference
--

Martin Husemann | 1 Dec 2003 02:04
Picon

Re: Lots of pkgsrc warnings...

On Mon, Dec 01, 2003 at 01:31:22AM +0100, Manuel Bouyer wrote:
> I've seen complains from some packages on alpha too.

Same here for sparc64.

You can typically divide errors into

 - signed char vs. unsigned char
 - int == long vs int != long

these two account for most of the "comparision always true/false" warnings
(if they do not happen on all archs).

and things like

 - "cast increases alignement" warnings from the compiler
 - general runtime errors due to bad alignement

which come from a "all the worlds a i386 and doesn't care about alignment"
philosophy (or, more diplomaticaly: simple portability bugs in the source)

My personal rule of thumb is: if it runs on sparc64 (64bit, big endian, strict 
alignement) + arm (unsigned chars, "alignement picky"), it probably runs 
everywhere. Very, very few pkgs fall into this class, unfortunately.

Martin

Richard Rauch | 1 Dec 2003 04:57

Re: Lots of pkgsrc warnings...

On Mon, Dec 01, 2003 at 01:31:22AM +0100, Manuel Bouyer wrote:
> On Sun, Nov 30, 2003 at 03:55:12AM -0600, Richard Rauch wrote:
> > I've been seeing a lot of pkgsrc code complain that a logical expression
> > is always true (or false, as the case may be) due to the size of the
 [...]
> > Have others noticed this?  Is it a -current, GCC 3.x, general 64-bit,
> > or port-amd64 issue?  Or none of the above?
> 
> I've seen complains from some packages on alpha too.
> I suspect at last some of these packages are buggy.

It may just be a more pedantic set of warnings from the compiler.
But I'm bothered.  One case that I tried to sort out was in a
while() (I think) test-case, which used a macro to check for
character-classes of unicode data.  If the symbol {UNICODE} was
defined, you got a 16-bit (or larger) data type.  Else, you got
a {char}.

The macro was defined with a long list of test-cases.  One or
two fell in the range of ASCII (e.g., test for upper-case let-
ters; 0x41 through 0x5b, I believe).  Others were in the posi-
tive range of a signed 16-bit value (0x4???, for example).
The overall test condition should not have *always* been true,
nor *always* false.  *Many* of the individual cases should have
been *always* false, however, because of range limits on an 8-
bit {char}.

The compiler produced a single warning for the entire statement,
leading me to wonder at exactly what it was trying to tell me.
I would have been happier if it had somehow conveyed that there
(Continue reading)

Nicolas Joly | 1 Dec 2003 15:15
Picon
Picon
Favicon

`panic: lockmgr' while running compat netbsd32 binaries


Hi,

I just got a kernel crash while testing compat netbsd32 on our
bi-opteron.

The problem arise with this small program, compiled on i386 and run on
amd64 with compat netbsd32 :

#include <stdio.h>

int foo() { return 0; }

int main(int argc, char **argv) {

  printf("Hello World\n");
  foo();

  exit(0); }

njoly <at> calimero [~]> while true; do ./a32.out; done
Hello World
Hello World
[...]
Hello World
Hello World
panic: lockmgr: processor 0, not exclusive lock holder 1 unlocking
Stopped at      netbsd:cpu_Debugger+0x1:
db{0}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x1
(Continue reading)

Frank van der Linden | 1 Dec 2003 15:20
Picon

Re: `panic: lockmgr' while running compat netbsd32 binaries

On Mon, Dec 01, 2003 at 03:15:14PM +0100, Nicolas Joly wrote:
> panic: lockmgr: processor 0, not exclusive lock holder 1 unlocking
> Stopped at      netbsd:cpu_Debugger+0x1:
> db{0}> bt
> cpu_Debugger() at netbsd:cpu_Debugger+0x1
> kernel: page fault trap, code=0
> Faulted in DDB; continuing...
> 
> This is a GENERIC.MP kernel with the following 2 lines for the kernel
> debugger :
> 
> options DDB
> options DDB_ONPANIC=1

Could you try two things for me:

1) use -fno-omit-frame-pointer in the makeoptions in the kernel config
   file (there's a commented line right by the DDB option that must
   be used, or backtraces won't work).
2) Try switching on LOCKDEBUG, this should catch the problem earlier.

I don't have that much time today or tomorrow to look myself.

- Frank

--

-- 
Frank van der Linden                                            fvdl <at> netbsd.org
===============================================================================
NetBSD. Free, Unix-like OS. > 45 different platforms.    http://www.netbsd.org/ 

(Continue reading)

Nicolas Joly | 1 Dec 2003 15:59
Picon
Picon
Favicon

Re: `panic: lockmgr' while running compat netbsd32 binaries

On Mon, Dec 01, 2003 at 03:20:12PM +0100, Frank van der Linden wrote:
> On Mon, Dec 01, 2003 at 03:15:14PM +0100, Nicolas Joly wrote:
> > panic: lockmgr: processor 0, not exclusive lock holder 1 unlocking
> > Stopped at      netbsd:cpu_Debugger+0x1:
> > db{0}> bt
> > cpu_Debugger() at netbsd:cpu_Debugger+0x1
> > kernel: page fault trap, code=0
> > Faulted in DDB; continuing...
> > 
> > This is a GENERIC.MP kernel with the following 2 lines for the kernel
> > debugger :
> > 
> > options DDB
> > options DDB_ONPANIC=1
> 
> Could you try two things for me:
> 
> 1) use -fno-omit-frame-pointer in the makeoptions in the kernel config
>    file (there's a commented line right by the DDB option that must
>    be used, or backtraces won't work).
> 2) Try switching on LOCKDEBUG, this should catch the problem earlier.

Ok, i've make a new kernel with (1)+(2). And it really looks better
...

panic: lockmgr: processor 1, not exclusive lock holder 0 unlocking
Stopped at      netbsd:cpu_Debugger+0x5:
db{1}> bt
cpu_Debugger() at netbsd:cpu_Debugger+0x5
panic() at netbsd:panic+0x1c8
(Continue reading)

Mark G. Spencer | 5 Dec 2003 05:35

NVIDIA nforce3-150 Ethernet on Shuttle SN85G4 Athlon64?

I just got my first exposure to NetBSD this morning when I found the g4u ("ghost for unix") utility at http://rfhs8012.fh-regensburg.de/~feyrer/g4u/.

The g4u utility uses a modified NetBSD boot floppy.  I tried to run it on my Shuttle SN85G4 w/ an Athlon64 cpu,
and noticed the machine wasn't assigned an IP address.  I went to the Shuttle website to determine what
chipset was being used, and I'm not very optimistic at this point.  It looks like the SN85G4 uses the
nForce3-150 chipset?  I found this document, which mentions NVIDIA took the Ethernet off the PCI bus to
optimize performance:

http://www.nvidia.com/object/IO_8451.html

I then browsed some NetBSD mailing list posts and saw some mentions of support not likely for NVIDIA chipsets?

So .. I'm just trying to find out what the situation is.  I imagine the Shuttle SN85G4 will be a popular
platform for the Athlon64, and being able to get NetBSD running on it would be great.

Thanks for putting up with a newbie!

Mark

Nicolas Joly | 5 Dec 2003 14:19
Picon
Picon
Favicon

ftp(1) abort during download wihtout any message


Hi,

To check nfs on our amd64 machine (-current 20031205), i wanted to
download a set of files from and other server (340 files for a total
of 17GB) with ftp(1).

I started the file transfert, but hopefully noticed that it was
incomplete (only 392 files). Indeed, the program stoppped without any
message, and the command status was strange !

njoly <at> calimero [calimero/ftp]> ftp xxxxxxx.pasteur.fr
Connected to xxxxxxx.pasteur.fr.
220 xxxxxxx.pasteur.fr FTP server (Compaq Tru64 UNIX Version 5.60)
ready.
Name (xxxxxxx.pasteur.fr:guest): guest
331 Password required for guest.
Password:
230 User guest logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /mount/banques_rel/prod/ftp/genbank/release
250 CWD command successful.
ftp> mget *
mget gbbct1.seq.gz [anpqy?]? a
Prompting off for duration of mget.
229 Entering Extended Passive Mode (|||2475|)
150 Opening BINARY mode data connection for gbbct1.seq.gz (157.99.xx.xxx,65137) (70306405 bytes).
100% |*************************************| 68658 KB    7.04 MB/s    00:00 ETA
226 Transfer complete.
(Continue reading)

Frank van der Linden | 5 Dec 2003 17:27
Picon

Re: ftp(1) abort during download wihtout any message

On Fri, Dec 05, 2003 at 02:19:40PM +0100, Nicolas Joly wrote:
>   4252 ftp      CALL  compat_16___sigreturn14(0x7f7ffffff270)
>   4252 ftp      RET   compat_16___sigreturn14 -1 errno 22 Invalid argument

The context validity check in compat_16___sigreturn14 must have an error
in it.. I'll have a look.

- Frank

--

-- 
Frank van der Linden                                            fvdl <at> netbsd.org
===============================================================================
NetBSD. Free, Unix-like OS. > 45 different platforms.    http://www.netbsd.org/ 

Frank van der Linden | 5 Dec 2003 17:49
Picon

Re: NVIDIA nforce3-150 Ethernet on Shuttle SN85G4 Athlon64?

On Thu, Dec 04, 2003 at 08:35:59PM -0800, Mark G. Spencer wrote:
> So .. I'm just trying to find out what the situation is.  I imagine the Shuttle SN85G4 will be a popular
platform for the Athlon64, and being able to get NetBSD running on it would be great.

I'm not quite sure if the nForce 3 chipset you mention has an actually
different gigabit implementation, or if they just licensed an existing
one and hooked it up differently. I can't find any documentation for it,
nor any open source drivers for other OSs..

Can you mail the output of the dmesg command to see what the PCI id
of the gig-e part is?

- Frank

--

-- 
Frank van der Linden                                            fvdl <at> netbsd.org
===============================================================================
NetBSD. Free, Unix-like OS. > 45 different platforms.    http://www.netbsd.org/ 


Gmane