2006-02-16 10:03:03 (in Berlin, Germany)
Unsolvable problem (PHP/Oracle)
*Sigh*. The command line PHP at a customer's site broke from one day
to the other. When invoking it it just hangs at 100% CPU. Here is an
strace:
...
gettimeofday({1140077364, 254381}, NULL) = 0
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
access("./network/admin/sqlnet.ora", F_OK) = -1 ENOENT (No such file or directory)
fcntl64(169826488, F_SETFD, FD_CLOEXEC) = -1 EBADF (Bad file descriptor)
brk(0) = 0xa20b000
brk(0xa22d000) = 0xa22d000
times(NULL) = -2126335408
times(NULL) = -2126335408
times(NULL) = -2126335408
...
And it keeps calling times() until it is interrupted. Here is a trace
at this time:
(gdb) bt
#0 0x0040d3ed in times () from /lib/tls/libc.so.6
#1 0x01a27599 in sltrgatime64 () from /usr/lib/oracle/10.2.0.1/client/lib/libclntsh.so.10.1
#2 0x0152070f in kghinp () from /usr/lib/oracle/10.2.0.1/client/lib/libclntsh.so.10.1
#3 0x01129b47 in kpuinit0 () from /usr/lib/oracle/10.2.0.1/client/lib/libclntsh.so.10.1
#4 0x01128f8e in kpuinit () from /usr/lib/oracle/10.2.0.1/client/lib/libclntsh.so.10.1
#5 0x011f4c5e in OCIEnvInit () from /usr/lib/oracle/10.2.0.1/client/lib/libclntsh.so.10.1
#6 0x0808d6ea in php_oci_init_globals (oci_globals_p=0x82e7a60) at /root/php-4.4.1/ext/oci8/oci8.c:451
#7 0x0808d765 in zm_startup_oci (type=1, module_number=0) at /root/php-4.4.1/ext/oci8/oci8.c:495
#8 0x08137823 in zend_startup_module (module=0x82c6420) at /root/php-4.4.1/Zend/zend_API.c:1006
#9 0x08111e39 in php_startup_extensions (ptr=0x82e657c, count=-2126330213) at /root/php-4.4.1/main/main.c:1041
#10 0x081471da in php_startup_internal_extensions () at main/internal_functions.c:65
#11 0x08112222 in php_module_startup (sf=0xffffffff, additional_modules=0x0, num_additional_modules=0)
at /root/php-4.4.1/main/main.c:1216
#12 0x0814659d in main (argc=1, argv=0xbfffe654) at /root/php-4.4.1/sapi/cg
The question is: How can such a thing simply break? Is the uptime too
long? What is the Oracle client waiting for? How can I even approach
this proplem? Oh there's no fun anymore (end quote).
2006-02-10 13:31:33 (in Berlin, Germany)
Debian: Multiple gcc versions in the alternatives system
I'm still getting used to the alternatives system of Debian which is
used to allow parallel installation of equivalent packages. Some
packages ship this way, some (as gcc) need this being done by hand:
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-3.3 1 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-3.4 2 update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.0 3The last argument is the priority, the highest priority wins and is the default. Here is how to change your selection:
# update-alternatives --config gcc
There are 3 alternatives which provide `gcc'.
Selection Alternative
_______________________________________________
1 /usr/bin/gcc-3.3
2 /usr/bin/gcc-3.4
*+ 3 /usr/bin/gcc-4.0
Press enter to keep the default[*], or type selection number: 3
Using `/usr/bin/gcc-4.0' to provide `gcc'.
And there you go, have different gcc installed at once and have a
global default. Please note: This is for site-defaults, not user
preferences.
