AS is killed if the agent is killed (provided it was started/restarted by the agent)

Jiri Kremser jkremser at redhat.com
Tue Feb 12 13:34:30 UTC 2013


Hi,
  I tried your program and the AS survived, but if I add some waiting after the Runtime.exec()[*], make a jar from it, run it in the console and send it SIGINT (Ctrl+C) , it will kill the AS 7. All the steps unfortunately happen in the real environment.

[*] http://pastebin.test.redhat.com/127325

The good news is that this bug happens only if the agent is run by the rhq-agent.sh. Because rhq-agent-wrapper.sh runs in background, it doesn't allow for pressing CTRL+C, but user can still send it the signal by calling kill -2 pid-of-the-agent. But it is less likely. That's probably why this bug hasn't been discovered yet, because customers use rhq-agent-wrappers for running it.

jk
  

----- Original Message -----
> From: "Thomas Segismont" <tsegismo at redhat.com>
> To: rhq-devel at lists.fedorahosted.org
> Sent: Monday, February 11, 2013 6:44:13 PM
> Subject: Re: AS is killed if the agent is killed (provided it was	started/restarted by the agent)
> 
> Hi Jiri,
> 
> I'm not sure it would be a good idea.
> 
> Orphan processes don't get killed automatically (it's true on Windows
> and on *nix). So I think we may do something wrong on the agent side.
> 
> Just try this test case [1] (with appropriate values for your box)
> and
> try to connect to AS7 after JVM died, it will work.
> 
> [1] http://pastebin.test.redhat.com/127207
> 
> Thomas
> 
> Le 11/02/2013 16:21, Jiri Kremser a écrit :
> > Hi,
> >    wrt https://bugzilla.redhat.com/show_bug.cgi?id=909341
> >
> > I suggest 2 possible fixes.
> >
> > 1) To provide some intermediate simple script, for instance
> > rhq-background-launcher.sh:
> >
> > #!/bin/sh
> > $@&
> >
> > and then calling the launch script with
> > ./rhq-background-launcher.sh ${path_to_standalone.sh}
> > I was trying it and it solves the problem (trying it only in
> > terminal, but it should work also for the case agent has executed
> > the script).
> >
> > 2) Search for the "trap" commands in the launch script (they are
> > the culprit) and comment them out before the execution, then
> > uncomment them out (or create a temp. copy just for 1 usage).
> >
> >
> > I think the fix should be hidden to the end user. If you have any
> > other suggestions please respond to this email.
> > JK
> > _______________________________________________
> > rhq-devel mailing list
> > rhq-devel at lists.fedorahosted.org
> > https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
> >
> 
> 
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/rhq-devel
>


More information about the rhq-devel mailing list