NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/53261: kernel crash during test run



The following reply was made to PR kern/53261; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/53261: kernel crash during test run
Date: Mon, 7 May 2018 13:17:45 +0200

 I added a bit of instrumentation. This goes via sys_syscall(), but everything
 there is fine:
 
 [ 304.7820925] syscall(mmap): nargs=8, copyargs=0xcbcfbf50
 [ 304.7820925] calling sy_invoke with callp=0xc04cf318, args=0xcbcfbf50
 
 I added a KASSERTMSG in sy_invoke:
 
 		KASSERTMSG((uintptr_t)uap % 8 == 0, "%p", uap);       
 		error = sy_call(sy, l, uap, rval);
 
 but this did not fire (fine so far, 0xcbcfbf50 is aligned enough).
 But then in sy_call:
 
 static __inline int
 sy_call(const struct sysent *sy, struct lwp *l, const void *uap,
         register_t *rval)
 {
         int error;
  
         KASSERTMSG((uintptr_t)uap % 8 == 0, "uap=%p, call=%p", uap, sy->sy_call$
   
         l->l_sysent = sy;
         error = (*sy->sy_call)(l, uap, rval);
         l->l_sysent = NULL;
 
 this KASSERTMSG fires:
 
 [ 304.8020837] panic: kernel diagnostic assertion "(uintptr_t)uap % 8 == 0" failed: file "../../../../sys/syscallvar.h", line 64 uap=0xcbcfbf54, call=0xc024e664
 [ 304.8020837] cpu0: Begin traceback...
 [ 304.8020837] 0xcbcfbeb4: netbsd:db_panic+0x14
 [ 304.8020837] 0xcbcfbecc: netbsd:vpanic+0x12c
 [ 304.8020837] 0xcbcfbee4: netbsd:kern_assert+0x40
 [ 304.8020837] 0xcbcfbf2c: netbsd:sys_syscall+0x124
 [ 304.8020837] 0xcbcfbfac: netbsd:syscall+0xb8
 
 
 Either I typoed something stupid or this is a compiler bug?
 
 Martin
 


Home | Main Index | Thread Index | Old Index