Re: [Sqlrelay-discussion] Listener crash on Linux64
Brought to you by:
mused
|
From: Adrian-Cristian G. <adr...@gm...> - 2009-03-03 13:22:29
|
I use strace and ltrace, maybe you can we this:
It crash in function detach():
In /sqlrelay-0.40/src/listener/sqlrlistener.C
bool sqlrlistener::initListener(int argc, const char **argv) {
init=true;
cmdl=new cmdline(argc,argv);
tempdir tmpdir(cmdl);
if (!cfgfl.parse(cmdl->getConfig(),cmdl->getId())) {
return false;
}
setUserAndGroup();
if (!verifyAccessToConfigFile(cmdl->getConfig())) {
return false;
}
dbgfile.init("listener",cmdl->getLocalStateDir());
if (cmdl->found("-debug")) {
dbgfile.enable();
}
if (!handlePidFile(&tmpdir,cmdl->getId())) {
return false;
}
handleDynamicScaling();
setHandoffMethod();
if (cfgfl.getAuthOnListener()) {
authc=new authenticator(&cfgfl);
}
setIpPermissions();
if (!createSharedMemoryAndSemaphores(&tmpdir,cmdl->getId())) {
return false;
}
if ((passdescriptor=cfgfl.getPassDescriptor())) {
if (!listenOnHandoffSocket(&tmpdir,cmdl->getId())) {
return false;
}
if (!listenOnDeregistrationSocket(&tmpdir,cmdl->getId())) {
return false;
}
if (!listenOnFixupSocket(&tmpdir,cmdl->getId())) {
return false;
}
}
idleclienttimeout=cfgfl.getIdleClientTimeout();
maxquerysize=cfgfl.getMaxQuerySize();
maxlisteners=cfgfl.getMaxListeners();
listenertimeout=cfgfl.getListenerTimeout();
detach();
createPidFile(pidfile,permissions::ownerReadWrite());
return true;
}
The function detach() is defined here:
/rudiments-0.32/src/daemonprocess.C:
bool daemonprocess::detach() const {
// fork off a child process
int result;
do {
result=fork();
} while (result==-1 && error::getErrorNumber()==EINTR);
if (result==-1) {
return false;
}
// let the parent process exit
if (result) {
// cygwin needs a sleep or both processes will exit
#ifdef __CYGWIN__
snooze::macrosnooze(1);
#endif
_exit(0);
}
// become process group and session group leader
// with no controlling terminal
setsid();
// change directory to root to avoid keeping any directories in use
do {} while (chdir("/")==-1 && error::getErrorNumber()==EINTR);
// Set umask such that files are created 666 and directories 777.
// This way we can change them to whatever we like using chmod().
// We want to avoid inheriting a umask which wouldn't give us write
// permissions to files we create.
umask(0);
return true;
}
which is implemented with fork()
Fron listener.str(strace):
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x2adc653e82e0) = 9760
exit_group(0)
Thank you in advance!
On Mon, Mar 2, 2009 at 5:31 PM, Adrian-Cristian Grigoras <
adr...@gm...> wrote:
> Hi,
> I need to run sqlrelay on a RHEL 5 on 64 bits. I use sqlrelay 0.4. It
> starts the listener, but the listener crashes when I execute :
> /usr/local/firstworks/bin/sqlrsh -id oratest
>
> I receive thie error: Authentification failed.
>
> I set up the authentier to: listener, connection and database, but with no
> luck.
>
> How to resolve this? Does version 0.39.4 work on Linux64 or has the same
> problems? I saw that the problem with listener in happening in version 0.40.
>
> Thank you in advance!
>
|