On Fri, 30 Apr 2004, Doug White wrote: > I've been having problems with adm64 hanging under load on my dual opteron > 244 machine. Its a HDAMA mainboard with 2GB RAM. The problems started > around April 8. I finally found some time this week to narrow down the > commit that causes the breakage; its rev 1.43 of src/sys/vm/vm_init.c. Update to this. 1. Peter and I kicked this around on IRC yesterday. He wasn't able to reproduce it with a separate program, at least immediately. We also did some math and the numbers involved aren't large enough to be overflowing. 2. Changing COPTFLAGS to '-O -frename-registers -pipe' from the default '-O2 -frename-registers -pipe' stops the crash. So it may be an O2-specific optimization bug. 3. Assigning the values to a local variable doesn't seem to affect things, although it allows for easier experimentation. Using this, I found that the parentheses around the multiplications affects the crash. First, I added these variables: vm_size_t nswbufsize; vm_size_t nbufsize; then later assigned them: nbufsize = (nbuf*BKVASIZE); nswbufsize = (nswbuf*MAXPHYS); and changed the size argument to kmem_suballoc() to use the variables instead of the expressions directly. This setup triggers the crash. Removing the parentheses from the variable assignments: nbufsize = nbuf*BKVASIZE; nswbufsize = nswbuf*MAXPHYS; stops the crash. So in the end, at -O2, (nswbuf*MAXPHYS) != nswbuf*MAXPHYS. Creepy, eh? I'll see if I can come up with a standalone test case to submit to the gcc folks. -- Doug White | FreeBSD: The Power to Serve dwhite_at_gumbysoft.com | www.FreeBSD.orgReceived on Sat May 01 2004 - 06:42:46 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC