Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Jan 2005 13:46:18 +0200 (EET)
From:      Andriy Gapon <avg@icyb.net.ua>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/75848: linux emulation: linprocfs-related oracle problem with linu_base-8
Message-ID:  <200501051146.j05BkIXn057191@oddity.topspin.kiev.ua>
Resent-Message-ID: <200501051150.j05BoPtM022811@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         75848
>Category:       kern
>Synopsis:       linux emulation: linprocfs-related oracle problem with linu_base-8
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 05 11:50:24 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andriy Gapon
>Release:        FreeBSD 5.2.1-RELEASE-p13 i386
>Organization:
>Environment:
System: FreeBSD 5.2.1-RELEASE-p13 #32: Wed Dec 22 02:44:07 EET 2004 i386
linux_base-8-8.0_4
linux_devtools-8.0_3

	
>Description:
I have Oracle installation made with previous default linux base (7), now after
upgrade to linux_base-8 (and linux_devtools-8) I can not start oracle
server (actually database instance) with the following error:

oracle$ ./dbora.sh start

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 4 18:49:51 2005

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

SQL> Connected to an idle instance.
SQL> ORA-00600: internal error code, arguments: [kcbbnwa_1], [0], [0],
[], [], [], [], []
SQL> Disconnected

I see that there was at least one other person who had the similar problem
with linux_base-8 a while ago:
http://lists.freebsd.org/pipermail/freebsd-database/2004-February/000149.html

Using ktrace I tracked it down to reading "/proc/stat" and after playing
around a little bit I found out that Oracle (or some redhat 8 lib that
Oracle used) probably missed one line there:

cpu 2010442 17367 694544 14507692
+ cpu0 2010442 17367 694544 14507692
page 131869 24567
swap 1570 51873
intr 772076592
ctxt 1512209526
btime 1104346761

I see that "real linux" (Fedora Core 2) has this line too (yes, even in
the single CPU case).

After I fixed sys/compat/linprocfs/linprocfs.c to always produce cpu%d
line(s) my oracle started to behave again.

I am not sure if this is actually linux_base or linux_devtools related
or if this affects fresh Oracle installations.

>How-To-Repeat:
please see above

>Fix:

	

--- linprocfs.patch begins here ---
--- sys/compat/linprocfs/linprocfs.c	Wed Dec  1 23:34:43 2004
+++ sys/compat/linprocfs/linprocfs.c.new	Wed Jan  5 13:38:33 2005
@@ -426,13 +426,12 @@
 	    T2J(cp_time[CP_NICE]),
 	    T2J(cp_time[CP_SYS] /*+ cp_time[CP_INTR]*/),
 	    T2J(cp_time[CP_IDLE]));
-	if (ncpu > 1)
-		for (i = 0; i < ncpu; ++i)
-			sbuf_printf(sb, "cpu%d %ld %ld %ld %ld\n", i,
-			    T2J(cp_time[CP_USER]) / ncpu,
-			    T2J(cp_time[CP_NICE]) / ncpu,
-			    T2J(cp_time[CP_SYS]) / ncpu,
-			    T2J(cp_time[CP_IDLE]) / ncpu);
+	for (i = 0; i < ncpu; ++i)
+		sbuf_printf(sb, "cpu%d %ld %ld %ld %ld\n", i,
+		    T2J(cp_time[CP_USER]) / ncpu,
+		    T2J(cp_time[CP_NICE]) / ncpu,
+		    T2J(cp_time[CP_SYS]) / ncpu,
+		    T2J(cp_time[CP_IDLE]) / ncpu);
 	sbuf_printf(sb,
 	    "disk 0 0 0 0\n"
 	    "page %u %u\n"
--- linprocfs.patch ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501051146.j05BkIXn057191>