Create Materialized View Fails With ORA-600 [Kglunp-Bad-Pin] Error (Doc ID 950179.1)

Last updated on MAY 12, 2017

Applies to:

Oracle Server - Enterprise Edition - Version 11.1.0.6 and later
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

Getting following ora-600 [kglunp-bad-pin] error while trying to create a mview with WITH clause.

ORA-00600: internal error code, arguments: [kglunp-bad-pin], [0x1ABD7A5C], [0], [0x21C83810], [],
[], [], []
----- Current SQL Statement for this session (sql_id=7vsbusrra4x6p) -----
CREATE TABLE "BB"."MV_BAS" AS WITH
temptab AS
(
SELECT a,b,c
FROM tab1
)
SELECT
tab2.a,
tab2.b,
tab2.c
FROM
tab2
LEFT JOIN
temptab mk
ON mk.a = tab2.a
LEFT JOIN
temptab mn
ON mn.b = tab2.b


Call stack similar to:

 dbkedDefDump <- ksedmp <- ksfdmp <- dbgexPhaseII <- dbgexProcessError <- dbgeExecuteForErro <- VInfreq__dbgePost <- ErrorKGE <- dbkePostKGE_kgsf <- kgeadse <- kgerinv_internal <- kgerinv <- kgeasnmierr <- kglUnPin <- ctcdrv <- opiexe <- opiosq0 <- opiall0 <- opikpr <- opiodr <- rpidrus <- .......

Sometimes also observe the following errors for the same create mview command.

CREATE MATERIALIZED VIEW "MV_BAS"
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01400: cannot insert NULL into ("SYS"."SUMINLINE$"."TEXT")

If we replace ANSI syntax with classic (+) all works fine.

SQL> CREATE MATERIALIZED VIEW "MV_BAS"
2 USING INDEX REFRESH FORCE AS
3 WITH
4 temptab AS
5 (
6 SELECT min(a) a,max(b) b,c
7 FROM tab1
8 group by c
9 )
10 SELECT
11 tab2.a,
12 tab2.b,
13 tab2.c
14 FROM
15 tab2,
16 temptab mk,
17 temptab mn
18 WHERE mk.a (+) = tab2.a
19 AND mn.b (+) = tab2.b
20 /

Materialized view created.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms