[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mimeheaders etc
On Fri, Dec 01, 2000 at 01:00:17PM +0300, Eugene Crosser wrote:
> > Could you truss such process to see if it does some syscalls ?
> > (It would, after all, spend a lot more CPU if it were busy spinning..)
>
> Possibly this is some Solaris speciality:
>
> ...
> link("/var/virtual/online.ru/mail/F/F/owen2000.L2a3c.3a27745d.80c4e5bf",
> "/var/virtual/online.ru/mail/F/F/owen2000.lock") = 0
> stat("/var/virtual/online.ru/mail/F/F/owen2000.L2a3c.3a27745d.80c4e5bf",
> 0xFFBEE0E8) = 0
> unlink("/var/virtual/online.ru/mail/F/F/owen2000.L2a3c.3a27745d.80c4e5bf") = 0
This is mailbox dot-lock.
> lseek(7, 0, SEEK_SET) = 0
> fcntl(7, F_SETLKW, 0xFFBEEA5C) (sleeping...)
And this is FCNTL-lock of the same.
... and THAT one is SLEEPing. Why ? Who else blocks it ?
(User reading the mailbox ?)
Some other process holds the lock, obviously.
(I sure hope it doesn't do FCNTL+DOTLOCK in that order,
if it does, we have deadlock danger..)
> signotifywait() (sleeping...)
> door_return(0x00000000, 0, 0x00000000, 0) (sleeping...)
> lwp_cond_wait(0xFF0BF618, 0xFF0BF628, 0xFF073CA0) (sleeping...)
> lwp_sema_wait(0xFF0BC8D8) (sleeping...)
>
> and here it stops scrolling and waits. Does not make very much sense to
> me, though...
The door_*() stuff on Solaris is used for resolver, and syslog,
I recall. It is some sort of RPC call mechanism sharing some
of caller's process context while executing the remote side.
Solaris 7 adds those lwp things to everything, including non-
threaded software, and I think that is simply sleep().
(Or then it is part of the door_call() )
> ... Other case, same process:
>
> write(1, " # h u n g r y\n", 8) = 8
> read(0, " # i d l e\n", 8192) = 6
> write(1, " # h u n g r y\n", 8) = 8
> read(0, 0x0005395C, 8192) (sleeping...)
> signotifywait() (sleeping...)
> door_return(0x00000000, 0, 0x00000000, 0) (sleeping...)
> lwp_cond_wait(0xFF0BF618, 0xFF0BF628, 0xFF073CA0) (sleeping...)
> lwp_sema_wait(0xFF0BC8D8) (sleeping...)
Perhaps it is that thread stuff -- the CLUE here is that
read() is SLEEPING. All the rest is propably LWP switching.
( ... non linearly thinking, now I spotted that above the
FCNTL is also sleeping... )
Perhaps the '-l' option of 'truss' clues more by listing also
the LWP id on each line. (At least per Solaris 2.6 documentation.)
> Eugene
--
/Matti Aarnio <mea@nic.funet.fi>