Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!rutgers!sri-spam!mordor!lll-tis!elxsi!marduk!gww From: gww@marduk.UUCP (Gary Winiger) Newsgroups: comp.bugs.4bsd Subject: abort(3) returns to user. +fix Message-ID: <517@elxsi.UUCP> Date: Fri, 4-Sep-87 18:10:14 EDT Article-I.D.: elxsi.517 Posted: Fri Sep 4 18:10:14 1987 Date-Received: Sat, 5-Sep-87 21:25:11 EDT Sender: nobody@elxsi.UUCP Reply-To: gww@marduk.UUCP (Gary Winiger) Organization: ELXSI Super Computers, San Jose Lines: 60 Subject: abort(3) returns to user. +fix Index: libc/gen/abort.c 4.3BSD Description: When abort is called, it may return to the user and continue processing before core is dumped. Repeat-By: Run a program that calls abort(3) on a multiprocessor system where the kernel process is on a different cpu from the user process. Examine the core dump stack trace with adb and notice that the program has continued to run after abort was called. Fix: It is possible for the user process calling abort() to continue after the abort before the kernel process gets it stopped. Add code to abort to wait for the kill signal to occur. The attached code modification solves this problem at Elxsi. Gary.. {ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww --------- cut --------- snip --------- :.,$w diff ------------- *** /tmp/,RCSt1001187 Thu Jun 18 17:56:07 1987 --- abort.c Thu Jun 18 17:55:11 1987 *************** *** 1,5 **** --- 1,8 ---- /* * $Log: abort.c,v $ + * Revision 1.2 87/06/18 17:54:12 gww + * Guarantee abort doesn't return to user. + * * Revision 1.1 87/01/15 15:35:03 gww * Initial revision * *************** *** 11,17 **** */ #if defined(LIBC_SCCS) && !defined(lint) ! static char *ERcsId = "$Header: abort.c,v 1.1 87/01/15 15:35:03 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)abort.c 5.3 (Berkeley) 3/9/86"; #endif LIBC_SCCS and not lint --- 14,20 ---- */ #if defined(LIBC_SCCS) && !defined(lint) ! static char *ERcsId = "$Header: abort.c,v 1.2 87/06/18 17:54:12 gww Exp $ ENIX BSD"; static char sccsid[] = "@(#)abort.c 5.3 (Berkeley) 3/9/86"; #endif LIBC_SCCS and not lint *************** *** 25,28 **** --- 28,32 ---- signal(SIGILL, SIG_DFL); sigsetmask(~sigmask(SIGILL)); kill(getpid(), SIGILL); + sigpause(~sigmask(SIGILL)); }