Update statistics log on cores tdm_arkcmp with a non DB__ROOT user

Bug #1446390 reported by Weishiun Tsai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
Roberta Marton

Bug Description

“Update statistics log on” currently cores tdm_arkcmp if it is run by a non DB__ROOT user. This is probably not allowed to begin with, but it shouldn’t core tdm_arkcmp. A proper error message should be returned instead.

This is seen on the v1.1.0rc1 (v0417) build.

-------------------------------------------------------------

Here are the steps to reproduce it:

(1) cd $MY_SQROOT/trafci/bin
(2) trafci.sh -h <machine>:<port> -u <user> -p <password>
(3) execute ‘update statistics log on;’

-------------------------------------------------------------

Here is the execution output:

[trafodion@n001 bin]$ trafci.sh -h localhost:37800 -u <user> -p <password>

Welcome to Trafodion Command Interface
Copyright(C) 2013-2014 Hewlett-Packard Development Company, L.P.

Host Name/IP Address: localhost:37800
User Name: <user>

Connected to Trafodion

SQL>update statistics log on;

*** ERROR[8838] Unable to receive reply from Compiler, possibly caused by internal errors when compiling SQL statements, processing DDL statements, or executing the builtin stored procedures. [2015-04-20 21:19:44]

-------------------------------------------------------------

Here is the stack trace of the core file:

(gdb) bt
#0 0x00007fffee542625 in raise () from /lib64/libc.so.6
#1 0x00007fffee543e05 in abort () from /lib64/libc.so.6
#2 0x00007ffff1252c55 in os::abort(bool) ()
   from /usr/java/jdk1.7.0_75/jre/lib/amd64/server/libjvm.so
#3 0x00007ffff13d4cd7 in VMError::report_and_die() ()
   from /usr/java/jdk1.7.0_75/jre/lib/amd64/server/libjvm.so
#4 0x00007ffff1257b6f in JVM_handle_linux_signal ()
   from /usr/java/jdk1.7.0_75/jre/lib/amd64/server/libjvm.so
#5 <signal handler called>
#6 HSGlobalsClass::isAuthorized (this=0x7fffffff9fe0, isShowStats=0)
    at ../ustat/hs_globals.cpp:3298
#7 0x00007ffff5d12d11 in UpdateStats (input=<optimized out>,
    requestedByCompiler=0) at ../ustat/hs_update.cpp:312
#8 0x00007ffff3eb6804 in CmpStatement::process (this=0x7fffdc068150,
    statement=...) at ../arkcmp/CmpStatement.cpp:849
#9 0x00007ffff3ea002b in ExCmpMessage::actOnReceive (this=0x7fffffffbe00)
    at ../arkcmp/CmpConnection.cpp:405
#10 0x00007ffff6e7b7a6 in IpcMessageStream::internalActOnReceive (
    this=0x7fffffffbe00, buffer=<optimized out>, connection=0xb9e560)
    at ../common/Ipc.cpp:3546
#11 0x00007ffff6e9627b in GuaConnectionToClient::acceptBuffer (this=0xb9e560,
    buffer=<optimized out>, receivedDataLength=<optimized out>)
    at ../common/IpcGuardian.cpp:2542
#12 0x00007ffff6e96f8f in GuaReceiveControlConnection::wait (this=0xb8ddc0,
    timeout=-1, eventConsumed=<optimized out>, ipcAwaitiox=0x7fffffffb780)
    at ../common/IpcGuardian.cpp:3251
#13 0x00007ffff6e98332 in GuaConnectionToClient::wait (this=0xb9e560,
    timeout=<optimized out>, eventConsumed=0x0, ipcAwaitiox=0x0)
    at ../common/IpcGuardian.cpp:2211
#14 0x00007ffff6e8c21a in IpcSetOfConnections::waitOnSet (this=0x7fffffffbfa0,
    timeout=-1, calledByESP=0, timedout=0x0) at ../common/Ipc.cpp:1702
#15 0x00007ffff6e8d0ad in IpcMessageStream::waitOnMsgStream (
    this=0x7fffffffbe00, timeout=-1) at ../common/Ipc.cpp:3265
#16 0x00007ffff6e8d402 in IpcMessageStream::receive (this=0x7fffffffbe00,
    waited=1) at ../common/Ipc.cpp:3247
#17 0x00000000004064ae in main (argc=2, argv=0x7fffffffc578)
    at ../bin/arkcmp.cpp:303

Tags: sql-security
Revision history for this message
Roberta Marton (roberta-marton) wrote :

The code was calling the isAuthorized method expecting a valid table descriptor. There is no need to perform an authorization check for this command so code was changed to not check privileges.

Changed in trafodion:
status: New → Fix Committed
assignee: nobody → Roberta Marton (roberta-marton)
Revision history for this message
Weishiun Tsai (wei-shiun-tsai) wrote :

Verified on the v0519 build installed on a cluster. This problem is now fixed:

[trafodion@n001 bin]$ trafci.sh -h localhost:37800 -u <user> -p <pass>

Welcome to Trafodion Command Interface
Copyright(C) 2013-2014 Hewlett-Packard Development Company, L.P.

Host Name/IP Address: localhost:37800
User Name: <user>

Connected to Trafodion

SQL>update statistics log on;

*** WARNING[2244] ULOG file path invalid : Directory /opt/home/trafodion/sqllogs does not exist. [2015-05-20 16:19:56]
--- SQL operation complete.

SQL>

Changed in trafodion:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.