Messages in this thread | | | Date | Mon, 28 Feb 2000 22:50:42 +0100 | From | François Désarménien <> | Subject | /proc/PID bug, it seems |
| |
Hello,
I already post a message about this two weeks ago, an as I haven't had any suggestion, I repost. Sorry for any inconvenience, but I think (and you probably too) that bugs, whatever they are should be tracked and eliminated. And this looks to me like a /proc bug. But maybe I'm missing something...
Oracle background processes all come from a single binary called $ORACLE_HOME/bin/oracle, but they are exec'ed with different names, such as 'ora_pmon_SID' where pmon means 'process monitor' and 'SID' is the session ID.
Every background processes are awaked by a SIGALRM every few seconds to check if something has to be done. For example, the pmon process awakes every 3 seconds: doing a 'ptrace -p PID' shows:
semop(0x300, 0x1, 0, 0xbfffeb5c) = -1 EINTR (Interrupted system call) --- SIGALRM (Alarm clock) --- rt_sigprocmask(SIG_BLOCK, [], NULL, 8) = 0 gettimeofday({950728786, 770759}, NULL) = 0 rt_sigprocmask(SIG_UNBLOCK, [], NULL, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0 rt_sigprocmask(SIG_BLOCK, [ALRM], NULL, 8) = 0 gettimeofday({950728786, 771556}, NULL) = 0 setitimer(ITIMER_REAL, {it_interval={0, 0}, it_value={3, 0}}, NULL) = 0 rt_sigprocmask(SIG_UNBLOCK, [ALRM], NULL, 8) = 0
repeating every 3 seconds until cancel, so they shouldn't be swaped out.
When I do a 'ps ax', the process is usually shown fully qualified, as I understand coming from '/proc/PID/cmdline', but sometimes, it is shown as [oracle] , /proc/PID/cmdline returning nothing, so the executable name is taken (as I understand) from /proc/PID/stat.
Reading the 'proc.txt' documentation, I understood that it is the case when processes are swapped out to disk, but clearly, those *shouldn't, as they are quite often running (maybe not from a scheduler point of view ?), and in fact their state are 'S', not 'SW'.
This is quite annoying, because the *only* (documented) way to know if an instance is running from a script point of view is to 'ps ax | grep ora_pmon_A', which s not reliable at all.
Oracle support came too to he conclusion that there is a bug in the /proc filesystem.
I'm running a 2.2.13 plain kernel, compiled with gcc 2.7.2, no SMP support.
Could someone having knowledge about the proc filesystem enlighten me ?
I've red as much kernel documentation as I found, but found nothing that could help on this topic. I've tried to follow the proc code too, but with no success :-(
Thank you in advance,
François
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |