DB2 Java routine may fail with SQL1646N error on AIX and db2fmp process killed with signal 4

Technote (troubleshooting)


Problem(Abstract)

Calling a Java stored procedure or user defined function on DB2 running on AIX systems may fail with a SQL1646N error as well as the db2fmp processes will be killed with a signal 4 (SIGILL)

Symptom

The following error may be seen when calling the Java Routine:

SQL1646N A routine failed because the fenced user ID cannot access
required files in the sqllib directory or other instance or
database directories.

In the db2diag.log, the following errors may be reported:

2014-02-05-23.27.55.861318+060 I9193A672 LEVEL: Severe
PID : 10158550 TID : 18021 PROC : db2sysc 0
INSTANCE: instance NODE : 000 DB : db
APPHDL : 0-2185 APPID: *LOCAL.instance.140205222738
AUTHID : authid HOSTNAME: host
EDUID : 18021 EDUNAME: db2agent (DB) 0
FUNCTION: DB2 UDB, routine_infrastructure, sqlerGetFmpThread, probe:20
RETCODE : ZRC=0xFFFFF992=-1646
SQL1646N A routine failed because the fenced user ID cannot access
required files in the sqllib directory or other instance or database
directories.


2014-02-05-23.27.55.861313+060 E9866A447 LEVEL: Error
PID : 11731124 TID : 258 PROC : db2wdog 0 [db]
INSTANCE: instance NODE : 000
HOSTNAME: host
EDUID : 258 EDUNAME: db2wdog 0 [instance]
FUNCTION: DB2 UDB, base sys utilities, sqleChildCrashHandler, probe:6921
DATA #1 : <preformatted>
Beginning cleanup of Process id: 18874612, OSS term code: 0x101, signal: 4

2014-02-05-23.27.55.873511+060 E10314A478 LEVEL: Error
PID : 11731124 TID : 258 PROC : db2wdog 0 [db]
INSTANCE: instance NODE : 000
HOSTNAME: host
EDUID : 258 EDUNAME: db2wdog 0 [instance]
FUNCTION: DB2 UDB, base sys utilities, sqleChildCrashHandler, probe:7127
DATA #1 : <preformatted>
A 64-bit fenced mode process crashed. Process id: 18874612, OSS term code: 0x101, signal: 4, bringDown: 0


Cause

AIX Stack Execution Disable (SED) will prevent the running of Just-In-Time (JIT) compiled code and the loader needs to be exempted in order to run JIT

Resolving the problem

Since Java routines run inside a fenced mode process (db2fmp), In order to make the db2fmp process exempted from SED, run the following command:
sedmgr -c exempt $INSTHOME/sqllib/adm/db2fmp

The dump command can then be ran to verify that the DEP_EXEMPT flag is set.
dump -X64 -ov $INSTHOME/sqllib/adm/db2fmp

Where $INSTHOME is the home directory of the instance userid, such as /home/db2inst1

For example:
> dump -X64 -ov db2fmp

db2fmp:

***Object Module Header***
# Sections Symbol Ptr # Symbols Opt Hdr Len Flags
5 0x0000d332 674 120 0x1082
Flags=( EXEC DYNLOAD DEP_EXEMPT )
Timestamp = "Nov 28 01:35:38 2012"
Magic = 0x1f7 (64-bit XCOFF)

Related information

JIT Compiler / SED

Rate this page:

(0 users)Average rating

Document information


More support for:

DB2 for Linux, UNIX and Windows
DB2 Programming Interfaces - Non SQL Stored Procedure

Software version:

9.5, 9.7, 10.1, 10.5

Operating system(s):

AIX

Reference #:

1666901

Modified date:

2014-03-10

Translate my page

Machine Translation

Content navigation