[SunHELP] How to kill a kernel-blocked process ?

DAUBIGNE Sebastien - BOR ( SDaubigne@bordeaux-bersol.sema.slb.com ) SDaubigne at bordeaux-bersol.sema.slb.com
Mon Jan 21 13:13:02 CST 2002


I'm unable to kill a multi-threaded java process. The process is sleeping,
but doesn't catch any signal, including SIGKILL.
"ps" says the process is sleeping :

# ps -lfp 24185
F S      UID   PID  PPID  C PRI NI     ADDR     SZ    WCHAN    STIME TTY
TIME CMD
 8 S     root 24185     1  0  40 20 772c0198   9399 772c0210 11:10:37 ?
8:33 /usr/java1.1/bin/..//bin/sparc/nati

However, the "-L" option tells that each of the 21 LWP is stopped ("T"
state), except the 18th, which is sleeping ("S").
It seems each thread is blocked in the kernel (bloking syscall).
"truss" cannot contol the process, but the "pflags" command tells that some
LWP are waiting for semaphore conditions, others
are waiting for connexion or datas from TCP sockets.
Using lsof, I tried to identify and connect to each of the 3 sockets the
process is listening on, but it doesn't help. 
I also tried to identify and kill each of the local TCP peers process, with
no result.

I suspect some deadlock in the semaphore conditions.
Do I have any chance to kill the process witout rebooting ?

# truss -aeflp 24185
Pgrab: process is not stopped
truss: cannot control process 24185
# /usr/proc/bin/pflags 24185 
24185:  /usr/java1.1/bin/..//bin/sparc/native_threads/java -classpath
$CLASSPATH
        flags = PR_ORPHAN
  sigpend = 0xfe3ffeff,0x00001fff
  /1:   flags = PR_STOPPED|PR_ASLEEP [ recv(0x27,0xe9f043f8,0xc,0x0) ]
  why = PR_SUSPENDED
  /2:   flags = PR_STOPPED|PR_ASLWP|PR_ASLEEP [ signotifywait() ]
  why = PR_SUSPENDED
  lwppend = 0xfe3ffeff,0x00001fff
  /3:   flags = PR_STOPPED|PR_ASLEEP [ recv(0x28,0xe7e708e0,0xc,0x0) ]
  why = PR_SUSPENDED
  /4:   flags = PR_STOPPED|PR_ASLEEP [ recv(0x24,0xe9f7f390,0xc,0x0) ]
  why = PR_SUSPENDED
  /5:   flags = PR_STOPPED|PR_ASLEEP [
accept(0x25,0xef130f9c,0xef130fac,0x1) ]
  why = PR_SUSPENDED
  /6:   flags = PR_STOPPED|PR_ASLEEP [
accept(0x2a,0xee7f0efc,0xee7f0f0c,0x1) ]
  why = PR_SUSPENDED
  /7:   flags = PR_STOPPED|PR_ASLEEP [
accept(0x29,0xee7c0f9c,0xee7c0fac,0x1) ]
  why = PR_SUSPENDED
  /8:   flags = PR_STOPPED|PR_ASLEEP [ recv(0x2c,0xe7ed94e0,0xc,0x0) ]
  why = PR_SUSPENDED
  /9:   flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xe59e1e78) ]
  why = PR_SUSPENDED
  /10:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xee721e78) ]
  why = PR_SUSPENDED

  /11:  flags = PR_STOPPED|PR_ASLEEP [ recv(0x3d,0xea066ba8,0x8,0x0) ]
  why = PR_SUSPENDED
  /12:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xef638580) ]
  why = PR_SUSPENDED
  sigmask = 0xffbfdeff,0x00001ff6  lwppend = 0x00002000,0x00000000
  /13:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xe57a1e78) ]
  why = PR_SUSPENDED
  /14:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xee641e78) ]
  why = PR_SUSPENDED
  /15:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xe5831e78) ]
  why = PR_SUSPENDED
  /16:  flags = PR_STOPPED|PR_ASLEEP [ recv(0x35,0xe8044510,0x8,0x0) ]
  why = PR_SUSPENDED
  /17:  flags = PR_STOPPED|PR_ASLEEP [ poll(0xee60ec30,0x3,0xffffffff) ]
  why = PR_SUSPENDED
  /18:  flags = PR_PCINVAL
  /19:  flags = PR_STOPPED|PR_ASLEEP [ lwp_sema_p(0xef091e78) ]
  why = PR_SUSPENDED
  /20:  flags = PR_STOPPED|PR_ASLEEP [
lwp_cond_wait(0xef63b260,0xef63b270,0xe56
f5c48) ]
  why = PR_SUSPENDED
  /21:  flags = PR_STOPPED|PR_ASLEEP [ door(0x0,0x0,0x0,0x0,0xe56e5d70,0x4)
]
  why = PR_SUSPENDED

---
Sebastien DAUBIGNE 
sebastien.daubigne at sema.fr <mailto:sebastien.daubigne at sema.fr>  - (+33)
(0)5.57.26.56.36
Sema Global Services - AFM/DW/Pessac



More information about the SunHELP mailing list