List Info

Thread: Attaching to a running CMUCL process




Attaching to a running CMUCL process
user name
2006-10-31 20:50:32
Other than using detachtty/attachtty, is there any way to
attach to a
running CMUCL process and have access to its top level?

I tried using gdb with the process id, but the stack frames
and symbol
tables I got back were meaningless (they all said
"??").

I thought I could start a new CMUCL process, and attach to
the other
process using its pid, but I couldn't find anything in
manual which
indicates how to do that.

Is it even possible?

Unfortunately, I can't run the process I want to monitor
under detachtty.

Attaching to a running CMUCL process
user name
2006-11-01 01:13:37
On Tue, Oct 31, 2006 at 03:50:32PM -0500, Denis
Papathanasiou wrote:
> Other than using detachtty/attachtty, is there any way
to attach to
> a running CMUCL process and have access to its top
level?
[...]
> Unfortunately, I can't run the process I want to
monitor under
> detachtty.

It's a long shot, but can you use screen?
http://en.wik
ipedia.org/wiki/GNU_Screen

-- L


Attaching to a running CMUCL process
user name
2006-11-01 01:13:37
On Tue, Oct 31, 2006 at 03:50:32PM -0500, Denis
Papathanasiou wrote:
> Other than using detachtty/attachtty, is there any way
to attach to
> a running CMUCL process and have access to its top
level?
[...]
> Unfortunately, I can't run the process I want to
monitor under
> detachtty.

It's a long shot, but can you use screen?
http://en.wik
ipedia.org/wiki/GNU_Screen

-- L


Attaching to a running CMUCL process
user name
2006-11-01 03:17:10
On Tue, 31 Oct 2006 15:50:32 -0500, "Denis
Papathanasiou" <denis.papathanasiougmail.com> wrote:

> Other than using detachtty/attachtty, is there any way
to attach to
> a running CMUCL process and have access to its top
level?
>
> I tried using gdb with the process id, but the stack
frames and
> symbol tables I got back were meaningless (they all
said "??").
>
> I thought I could start a new CMUCL process, and attach
to the other
> process using its pid, but I couldn't find anything in
manual which
> indicates how to do that.
>
> Is it even possible?
>
> Unfortunately, I can't run the process I want to
monitor under
> detachtty.

On x86 you could try this:

  http://
www.cons.org/cmucl/doc/lispserver.html

Attaching to a running CMUCL process
user name
2006-11-01 03:17:10
On Tue, 31 Oct 2006 15:50:32 -0500, "Denis
Papathanasiou" <denis.papathanasiougmail.com> wrote:

> Other than using detachtty/attachtty, is there any way
to attach to
> a running CMUCL process and have access to its top
level?
>
> I tried using gdb with the process id, but the stack
frames and
> symbol tables I got back were meaningless (they all
said "??").
>
> I thought I could start a new CMUCL process, and attach
to the other
> process using its pid, but I couldn't find anything in
manual which
> indicates how to do that.
>
> Is it even possible?
>
> Unfortunately, I can't run the process I want to
monitor under
> detachtty.

On x86 you could try this:

  http://
www.cons.org/cmucl/doc/lispserver.html

Attaching to a running CMUCL process
user name
2006-11-03 14:21:47
On 10/31/06, Edi Weitz <ediagharta.de> wrote:
> On x86 you could try this:
>
>   http://
www.cons.org/cmucl/doc/lispserver.html
>

Edi,

Many thanks for mentioning this (we do run on x86); I'll get
a chance
to explore that option in the next few days

In the end (or at least for right now), I wound up going
back to using
detachtty/attachtty -- I find it is a good solution,
provided all the
jobs can be started under detachtty in the first place (the
particular
processes I wanted to monitor were kicked off by a complex
set of cron
and startup scripts, and my first reaction was not to touch
any of
that stuff).

If lispserver is not the solution, though, I'd be curious to
know what
it would take to have a future version of CMUCL be able to
do this; I
know there's a gdb-like debugger (ldb) embedded inside
CMUCL, so how
much work would it take to allow it to communicate and
attach to other
CMUCL processes?

Attaching to a running CMUCL process
user name
2006-11-01 19:29:04
Larry Clapp wrote:
> On Tue, Oct 31, 2006 at 03:50:32PM -0500, Denis
Papathanasiou wrote:
>   
>> Other than using detachtty/attachtty, is there any
way to attach to
>> a running CMUCL process and have access to its top
level?
>>     
> [...]
>   
>> Unfortunately, I can't run the process I want to
monitor under
>> detachtty.
>>     
>
> It's a long shot, but can you use screen?
> http://en.wik
ipedia.org/wiki/GNU_Screen
>
>   
Screen is way better and more stable. screen -d -m
<your-lisp-executable>.


Attaching to a running CMUCL process
user name
2006-11-01 21:09:55
HÃ¥kon Alstadheim writes:
> Larry Clapp wrote:
> > On Tue, Oct 31, 2006 at 03:50:32PM -0500, Denis
Papathanasiou wrote:
> >   
> >> Other than using detachtty/attachtty, is there
any way to attach to
> >> a running CMUCL process and have access to its
top level?
> >>     
> > [...]
> >   
> >> Unfortunately, I can't run the process I want
to monitor under
> >> detachtty.
> >>     
> >
> > It's a long shot, but can you use screen?
> > http://en.wik
ipedia.org/wiki/GNU_Screen
> >
> >   
> Screen is way better and more stable. screen -d -m
<your-lisp-executable>.

AFAIK, there's a big problem with screen:

  su - user -c 'screen -d -m any-program' 

doesn't work.  So you cannot use it for processes launched
at boot
time, if not under root.

 

-- 
__Pascal Bourguignon__                     http://www.informatimag
o.com/

Nobody can fix the economy.  Nobody can be trusted with
their finger
on the button.  Nobody's perfect.  VOTE FOR NOBODY.

Attaching to a running CMUCL process
user name
2006-11-01 22:56:38
On Wed, Nov 01, 2006 at 10:09:55PM +0100, Pascal Bourguignon
wrote:
> H??kon Alstadheim writes:
> > Larry Clapp wrote:
> > > On Tue, Oct 31, 2006 at 03:50:32PM -0500,
Denis Papathanasiou wrote:
> > >   
> > >> Other than using detachtty/attachtty, is
there any way to
> > >> attach to a running CMUCL process and
have access to its top
> > >> level?
> > >>     
> > > [...]
> > >   
> > >> Unfortunately, I can't run the process I
want to monitor under
> > >> detachtty.
> > >
> > > It's a long shot, but can you use screen?
> > > http://en.wik
ipedia.org/wiki/GNU_Screen
> > >   
> > Screen is way better and more stable. screen -d -m
> > <your-lisp-executable>.
> 
> AFAIK, there's a big problem with screen:
> 
>   su - user -c 'screen -d -m any-program' 
> 
> doesn't work.  So you cannot use it for processes
launched at boot
> time, if not under root.

I don't understand.  If you want "su - user" to
work unattended, I
thought you had to be root.

Running this in a normal (not-at-startup) root window works
for me:

  su - lmc -c '. ~lmc/.zshrc ; screen -S lmc -d -m vim'

What problems do you encounter?

(Of course all this is moot as far as the original question:
Denis has
already said he can't use screen.)

-- Larry


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )