I’ve just installed Oracle Client 10.2.0.1 on some machines and came accross an interesting bug with some tools (sqlplus, exp, etc.) hanging. It affects all systems with high uptime (according to the latest times() manual this time may vary depending on the OS and the kernel version) and 10.2.0.1 installed. It turns out that it is a known bug and it has been discussed in Oracle’s Instant Client forum back in October 2006. However this bug seems to be reintroduced (as such bugs existed in previous versions of different Oracle products) in the full Oracle Database 10g Client version 10.2.0.1. Here is how you can recognize this problem (on Linux): install the strace utility and execute sqlplus the way you do it usually, but through strace. For example:

strace sqlplus / as sysdba 2> sqlplus.log

and press Ctrl+C after a few seconds. Take a look at sqlplus.log and you find something like this:

open("/home/oracle/client/rdbms/mesg/ocius.msb", O_RDONLY) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC)         = 0
lseek(6, 0, SEEK_SET)                   = 0
read(6, "\\25\\23\\"\\1\\23\\3\\t\\t\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"..., 256) = 256
lseek(6, 512, SEEK_SET)                 = 512
read(6, "\\337y\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"..., 512) = 512
lseek(6, 1024, SEEK_SET)                = 1024
read(6, "\\25\\7\\'\\0072\\7>\\7j\\7\\276\\17$\\'\\6K5S\\24TfT\\307T(VsV\\222"..., 86) = 86
brk(0x80ad000)                          = 0x80ad000
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
times(NULL)                             = -1850439679
...

you definitely have a problem. A temporary workaround is to reboot your system (which I wouldn’t because of an… Oracle (yuck !). Back in October Oracle promised to fix this bug in 10.2.0.2 but it’s not been released by now (except for z/Linux and z/OS). However patches for 10.2.0.2 are available at Oracle MetaLink.

UPDATE: It turned out that this problem exists in all the tools and libraries that use the libclntsh library. This includes the oci8 PHP extension. You’re urged to upgrade or reboot your system. :)

Popularity: 13% [?]