Sponsored Content
Operating Systems Linux Red Hat Process with S state(Interruptable) in RHEL and gives Advertise error after restarting/Killing the p Post 303006407 by hicksd8 on Thursday 2nd of November 2017 04:23:56 AM
Old 11-02-2017
Your attachment does not show the output from the 'Strace' command.

However, The interruptable S state means it is waiting on a resource that is not currently available and/or has been put to sleep by the scheduler for a set waiting time.

I attach a very brief and widely available RedHat document on this subject.

Do post back any further questions.

Last edited by hicksd8; 11-03-2017 at 09:47 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Restarting a Crashed Process

Hello, I host a couple of Call of Duty gameing servers. There are some hackers who love the crash them. When they crash them it simply causes a segmentaion fault and kills the PID. I was wondering it you could help me write a script to simply restart the program after it has been crashed. The... (9 Replies)
Discussion started by: Phobos
9 Replies

2. Shell Programming and Scripting

Killing of a process and send a mail if the process doesnot come up within 2 minutes

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There is a... (1 Reply)
Discussion started by: Prince89
1 Replies

3. Shell Programming and Scripting

Finding the age of a unix process, killing old processes, killing zombie processes

I had issues with processes locking up. This script checks for processes and kills them if they are older than a certain time. Its uses some functions you'll need to define or remove, like slog() which I use for logging, and is_running() which checks if this script is already running so you can... (0 Replies)
Discussion started by: sukerman
0 Replies

4. UNIX and Linux Applications

Unix pkill error; does wily obstruct me killing the process?

have two scripts on Unix; one that starts some processes and the other one for killing a process. At first, I ran the .sh without WILY in it and it worked perfectly; in this way, I could also ran my stopper process. However I need WILY in this so I added it to my script but this time, a message... (1 Reply)
Discussion started by: nerdogan551
1 Replies

5. UNIX for Dummies Questions & Answers

Restarting a process

Hi, How is it possible to restart only your process. I can get the process killed but I am not able to start it. For eg : i first did this ps -ef|grep _out --displays all the process with _out in the name then I killed kill -15 36044 -- process id. Now how can i start the same... (1 Reply)
Discussion started by: TH3M0Nk
1 Replies

6. Solaris

SSH : Restarting too quickly, changing state to maintenance

Hi, I'm new to Solaris. I have an issue with ssh service. When I restart the service it exits with an exit status of 0 $svcadm restart svc:/network/ssh:default $echo $? 0 $ However, the service goes into maintenance mode after restart. I'm able to connect even though the service is in... (3 Replies)
Discussion started by: maverick_here
3 Replies

7. Shell Programming and Scripting

Need help in restarting process

Hi friends, I have one unix command which is used to check the network status manually. followig is the command check_Network this command give follwoing status Network 1 is ok Network 2 is ok network 3 is ok network 4 is ok . . . . Network 10 is... (8 Replies)
Discussion started by: Nakul_sh
8 Replies

8. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

9. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

10. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies
CONDVAR(9)						   BSD Kernel Developer's Manual						CONDVAR(9)

NAME
cv, condvar, cv_init, cv_destroy, cv_wait, cv_wait_sig, cv_timedwait, cv_timedwait_sig, cv_signal, cv_broadcast, cv_has_waiters -- condition variables SYNOPSIS
#include <sys/condvar.h> void cv_init(kcondvar_t *cv, const char *wmesg); void cv_destroy(kcondvar_t *cv); void cv_wait(kcondvar_t *cv, kmutex_t *mtx); int cv_wait_sig(kcondvar_t *cv, kmutex_t *mtx); int cv_timedwait(kcondvar_t *cv, kmutex_t *mtx, int ticks); int cv_timedwait_sig(kcondvar_t *cv, kmutex_t *mtx, int ticks); void cv_signal(kcondvar_t *cv); void cv_broadcast(kcondvar_t *cv); bool cv_has_waiters(kcondvar_t *cv); options DIAGNOSTIC options LOCKDEBUG DESCRIPTION
Condition variables (CVs) are used in the kernel to synchronize access to resources that are limited (for example, memory) and to wait for pending I/O operations to complete. The kcondvar_t type provides storage for the CV object. This should be treated as an opaque object and not examined directly by consumers. OPTIONS
options DIAGNOSTIC Kernels compiled with the DIAGNOSTIC option perform basic sanity checks on CV operations. options LOCKDEBUG Kernels compiled with the LOCKDEBUG option perform potentially CPU intensive sanity checks on CV operations. FUNCTIONS
cv_init(cv, wmesg) Initialize a CV for use. No other operations can be performed on the CV until it has been initialized. The wmesg argument specifies a string of no more than 8 characters that describes the resource or condition associated with the CV. The kernel does not use this argument directly but makes it available for utilities such as ps(1) to display. cv_destroy(cv) Release resources used by a CV. The CV must not be in use when it is destroyed, and must not be used afterwards. cv_wait(cv, mtx) Cause the current LWP to wait non-interruptably for access to a resource, or for an I/O operation to complete. The LWP will resume execution when awoken by another thread using cv_signal() or cv_broadcast(). mtx specifies a kernel mutex to be used as an interlock, and must be held by the calling LWP on entry to cv_wait(). It will be released once the LWP has prepared to sleep, and will be reacquired before cv_wait() returns. A small window exists between testing for availability of a resource and waiting for the resource with cv_wait(), in which the resource may become available again. The interlock is used to guarantee that the resource will not be signalled as available until the calling LWP has begun to wait for it. Non-interruptable waits have the potential to deadlock the system, and so must be kept short (typically, under one second). cv_wait_sig(cv, mtx) As per cv_wait(), but causes the current LWP to wait interruptably. If the LWP receives a signal, or is interrupted by another condi- tion such as its containing process exiting, the wait is ended early and an error code returned. If cv_wait_sig() returns as a result of a signal, the return value is ERESTART if the signal has the SA_RESTART property. If awoken normally, the value is zero, and EINTR under all other conditions. cv_timedwait(cv, mtx, ticks) As per cv_wait(), but will return early if a timeout specified by the ticks argument expires. ticks is an architecture and system dependent value related to the number of clock interrupts per second. See hz(9) for details. The mstohz(9) macro can be used to convert a timeout expressed in milliseconds to one suitable for cv_timedwait(). If the ticks argument is zero, cv_timedwait() behaves exactly like cv_wait(). If the timeout expires before the LWP is awoken, the return value is EWOULDBLOCK. If awoken normally, the return value is zero. cv_timedwait_sig(cv, mtx, ticks) As per cv_wait_sig(), but also accepts a timeout value and will return EWOULDBLOCK if the timeout expires. cv_signal(cv) Awaken one LWP (potentially among many) that is waiting on the specified condition variable. The mutex passed to the wait function (mtx) must also be held when calling cv_signal(). (Note that cv_signal() is erroneously named in that it does not send a signal in the traditional sense to LWPs waiting on a CV.) cv_broadcast(cv) Awaken all LWPs waiting on the specified condition variable. The mutex passed to the wait function (mtx) must also be held when call- ing cv_broadcast(). cv_has_waiters(cv) Return true if one or more LWPs are waiting on the specified condition variable. cv_has_waiters() cannot test reliably for interruptable waits. It should only be used to test for non-interruptable waits made using cv_wait(). cv_has_waiters() should only be used when making diagnostic assertions, and must be called while holding the interlocking mutex passed to cv_wait(). EXAMPLES
Consuming a resource: /* * Lock the resource. Its mutex will also serve as the * interlock. */ mutex_enter(&res->mutex); /* * Wait for the resource to become available. */ while (res->state == BUSY) cv_wait(&res->condvar, &res->mutex); /* * It's now available to us. Take ownership of the * resource, and consume it. */ res->state = BUSY; mutex_exit(&res->mutex); consume(res); Releasing a resource for the next consumer to use: mutex_enter(&res->mutex); res->state = IDLE; cv_signal(&res->condvar); mutex_exit(&res->mutex); CODE REFERENCES
The core of the CV implementation is in sys/kern/kern_condvar.c. The header file sys/sys/condvar.h describes the public interface. SEE ALSO
sigaction(2), errno(9), mb(9), mstohz(9), mutex(9), rwlock(9) Jim Mauro and Richard McDougall, Solaris Internals: Core Kernel Architecture, Prentice Hall, 2001, ISBN 0-13-022496-0. HISTORY
The CV primitives first appeared in NetBSD 5.0. BSD
June 4, 2008 BSD
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy