All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcf-agent: Fix daemon termination
@ 2017-04-30 15:28 Jan Kiszka
  2017-05-01 16:41 ` Martin Kelly
  0 siblings, 1 reply; 16+ messages in thread
From: Jan Kiszka @ 2017-04-30 15:28 UTC (permalink / raw)
  To: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 1407 bytes --]

From: Jan Kiszka <jan.kiszka@siemens.com>

The upstream init script uses SIGUSR2 to terminate that daemon because
SIGTERM is ignored. As the killproc function does not support specifying
a signal, switch to start-stop-daemon. Drop the retry loop because
SIGUSR2 is lethal for agent.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
index 6303280aae..bd602c67cb 100755
--- a/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
+++ b/meta/recipes-devtools/tcf-agent/tcf-agent/tcf-agent.init
@@ -33,16 +33,7 @@ case "$1" in
 
     stop)
         echo -n "Stopping $DAEMON_NAME: "
-        count=0
-        while [ -n "`/bin/pidof $DAEMON_PATH`" -a $count -lt 10 ] ; do
-            killproc $DAEMON_PATH >& /dev/null
-            sleep 1
-            RETVAL=$?
-            if [ $RETVAL != 0 -o -n "`/bin/pidof $DAEMON_PATH`" ] ; then
-                sleep 3
-            fi
-            count=`expr $count + 1`
-        done
+        start-stop-daemon -K -q -x $DAEMON_PATH -s USR2
         rm -f /var/lock/subsys/$DAEMON_NAME
         if [ -n "`/bin/pidof $DAEMON_PATH`" ] ; then
             echo "FAIL"


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-04-30 15:28 [PATCH] tcf-agent: Fix daemon termination Jan Kiszka
@ 2017-05-01 16:41 ` Martin Kelly
  2017-06-01  0:17   ` Martin Kelly
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kelly @ 2017-05-01 16:41 UTC (permalink / raw)
  To: Jan Kiszka, openembedded-core

On 04/30/2017 08:28 AM, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> The upstream init script uses SIGUSR2 to terminate that daemon because
> SIGTERM is ignored. As the killproc function does not support specifying
> a signal, switch to start-stop-daemon. Drop the retry loop because
> SIGUSR2 is lethal for agent.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>

Thanks! I noticed this bug and was planning to look into it, but it 
looks like you found the issue first! This was bringing shutdowns to a 
crawl for me.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-05-01 16:41 ` Martin Kelly
@ 2017-06-01  0:17   ` Martin Kelly
  2017-06-01  5:45     ` Martin Kelly
  2017-06-06 10:11     ` Jan Kiszka
  0 siblings, 2 replies; 16+ messages in thread
From: Martin Kelly @ 2017-06-01  0:17 UTC (permalink / raw)
  To: Jan Kiszka, openembedded-core

On 05/02/2017 01:41 AM, Martin Kelly wrote:
> On 04/30/2017 08:28 AM, Jan Kiszka wrote:
>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> The upstream init script uses SIGUSR2 to terminate that daemon because
>> SIGTERM is ignored. As the killproc function does not support specifying
>> a signal, switch to start-stop-daemon. Drop the retry loop because
>> SIGUSR2 is lethal for agent.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>
> Thanks! I noticed this bug and was planning to look into it, but it
> looks like you found the issue first! This was bringing shutdowns to a
> crawl for me.

I just noticed, I think we need to fix the same bug in the systemd 
service script too.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-01  0:17   ` Martin Kelly
@ 2017-06-01  5:45     ` Martin Kelly
  2017-06-06 10:11     ` Jan Kiszka
  1 sibling, 0 replies; 16+ messages in thread
From: Martin Kelly @ 2017-06-01  5:45 UTC (permalink / raw)
  To: openembedded-core

On 06/01/2017 09:17 AM, Martin Kelly wrote:
> On 05/02/2017 01:41 AM, Martin Kelly wrote:
>> On 04/30/2017 08:28 AM, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> The upstream init script uses SIGUSR2 to terminate that daemon because
>>> SIGTERM is ignored. As the killproc function does not support specifying
>>> a signal, switch to start-stop-daemon. Drop the retry loop because
>>> SIGUSR2 is lethal for agent.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Thanks! I noticed this bug and was planning to look into it, but it
>> looks like you found the issue first! This was bringing shutdowns to a
>> crawl for me.
>
> I just noticed, I think we need to fix the same bug in the systemd
> service script too.

OK, I sent a patch to fix the same issue in the systemd service script.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-01  0:17   ` Martin Kelly
  2017-06-01  5:45     ` Martin Kelly
@ 2017-06-06 10:11     ` Jan Kiszka
  2017-06-06 17:28       ` Martin Kelly
  1 sibling, 1 reply; 16+ messages in thread
From: Jan Kiszka @ 2017-06-06 10:11 UTC (permalink / raw)
  To: Martin Kelly, openembedded-core

On 2017-06-01 02:17, Martin Kelly wrote:
> On 05/02/2017 01:41 AM, Martin Kelly wrote:
>> On 04/30/2017 08:28 AM, Jan Kiszka wrote:
>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> The upstream init script uses SIGUSR2 to terminate that daemon because
>>> SIGTERM is ignored. As the killproc function does not support specifying
>>> a signal, switch to start-stop-daemon. Drop the retry loop because
>>> SIGUSR2 is lethal for agent.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>
>> Thanks! I noticed this bug and was planning to look into it, but it
>> looks like you found the issue first! This was bringing shutdowns to a
>> crawl for me.
> 
> I just noticed, I think we need to fix the same bug in the systemd
> service script too.

Does this block this patch, or should this be done in a separate one? I
noticed that it's still not merged.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-06 10:11     ` Jan Kiszka
@ 2017-06-06 17:28       ` Martin Kelly
  2017-06-07 16:08         ` Burton, Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kelly @ 2017-06-06 17:28 UTC (permalink / raw)
  To: Jan Kiszka, openembedded-core

On 06/06/2017 03:11 AM, Jan Kiszka wrote:
> On 2017-06-01 02:17, Martin Kelly wrote:
>> On 05/02/2017 01:41 AM, Martin Kelly wrote:
>>> On 04/30/2017 08:28 AM, Jan Kiszka wrote:
>>>> From: Jan Kiszka <jan.kiszka@siemens.com>
>>>>
>>>> The upstream init script uses SIGUSR2 to terminate that daemon because
>>>> SIGTERM is ignored. As the killproc function does not support specifying
>>>> a signal, switch to start-stop-daemon. Drop the retry loop because
>>>> SIGUSR2 is lethal for agent.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Thanks! I noticed this bug and was planning to look into it, but it
>>> looks like you found the issue first! This was bringing shutdowns to a
>>> crawl for me.
>>
>> I just noticed, I think we need to fix the same bug in the systemd
>> service script too.
>
> Does this block this patch, or should this be done in a separate one? I
> noticed that it's still not merged.
>

I sent a separate patch for fixing the systemd issue, so I think we can 
merge the two patches separately (they're both needed):

https://patchwork.openembedded.org/patch/140355/

Neither of our patches have been merged yet.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-06 17:28       ` Martin Kelly
@ 2017-06-07 16:08         ` Burton, Ross
  2017-06-07 16:29           ` Jan Kiszka
  2017-06-07 16:33           ` Martin Kelly
  0 siblings, 2 replies; 16+ messages in thread
From: Burton, Ross @ 2017-06-07 16:08 UTC (permalink / raw)
  To: Martin Kelly; +Cc: Jan Kiszka, OE-core

[-- Attachment #1: Type: text/plain, Size: 549 bytes --]

On 6 June 2017 at 18:28, Martin Kelly <mkelly@xevo.com> wrote:

> I sent a separate patch for fixing the systemd issue, so I think we can
> merge the two patches separately (they're both needed):
>
> https://patchwork.openembedded.org/patch/140355/
>
> Neither of our patches have been merged yet.
>

Sorry, somehow slipped through the net.

This patch doesn't apply as it's been corrupted by the mailer.  Please use
git-send-email instead of copy/pasting (I've managed to apply it manually
as it's a simple patch this time).

Ross

[-- Attachment #2: Type: text/html, Size: 1088 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-07 16:08         ` Burton, Ross
@ 2017-06-07 16:29           ` Jan Kiszka
  2017-06-07 16:33           ` Martin Kelly
  1 sibling, 0 replies; 16+ messages in thread
From: Jan Kiszka @ 2017-06-07 16:29 UTC (permalink / raw)
  To: Burton, Ross, Martin Kelly; +Cc: OE-core

On 2017-06-07 18:08, Burton, Ross wrote:
> 
> On 6 June 2017 at 18:28, Martin Kelly <mkelly@xevo.com
> <mailto:mkelly@xevo.com>> wrote:
> 
>     I sent a separate patch for fixing the systemd issue, so I think we
>     can merge the two patches separately (they're both needed):
> 
>     https://patchwork.openembedded.org/patch/140355/
>     <https://patchwork.openembedded.org/patch/140355/>
> 
>     Neither of our patches have been merged yet.
> 
> 
> Sorry, somehow slipped through the net.
> 
> This patch doesn't apply as it's been corrupted by the mailer.  Please
> use git-send-email instead of copy/pasting (I've managed to apply it
> manually as it's a simple patch this time).

GnuPG signatures cause troubles... I added to my blacklist.

Sorry,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-07 16:08         ` Burton, Ross
  2017-06-07 16:29           ` Jan Kiszka
@ 2017-06-07 16:33           ` Martin Kelly
  2017-06-07 16:34             ` Jan Kiszka
  2017-06-07 19:09             ` Burton, Ross
  1 sibling, 2 replies; 16+ messages in thread
From: Martin Kelly @ 2017-06-07 16:33 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Jan Kiszka, OE-core

On 06/07/2017 09:08 AM, Burton, Ross wrote:
>
> On 6 June 2017 at 18:28, Martin Kelly <mkelly@xevo.com
> <mailto:mkelly@xevo.com>> wrote:
>
>     I sent a separate patch for fixing the systemd issue, so I think we
>     can merge the two patches separately (they're both needed):
>
>     https://patchwork.openembedded.org/patch/140355/
>     <https://patchwork.openembedded.org/patch/140355/>
>
>     Neither of our patches have been merged yet.
>
>
> Sorry, somehow slipped through the net.
>
> This patch doesn't apply as it's been corrupted by the mailer.  Please
> use git-send-email instead of copy/pasting (I've managed to apply it
> manually as it's a simple patch this time).
>
> Ross
>

Which patch are you referring to? I used git send-email for the systemd 
patch, and it applies just fine for me on OE-core master (using patch -p1).


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-07 16:33           ` Martin Kelly
@ 2017-06-07 16:34             ` Jan Kiszka
  2017-06-07 19:09             ` Burton, Ross
  1 sibling, 0 replies; 16+ messages in thread
From: Jan Kiszka @ 2017-06-07 16:34 UTC (permalink / raw)
  To: Martin Kelly, Burton, Ross; +Cc: OE-core

On 2017-06-07 18:33, Martin Kelly wrote:
> On 06/07/2017 09:08 AM, Burton, Ross wrote:
>>
>> On 6 June 2017 at 18:28, Martin Kelly <mkelly@xevo.com
>> <mailto:mkelly@xevo.com>> wrote:
>>
>>     I sent a separate patch for fixing the systemd issue, so I think we
>>     can merge the two patches separately (they're both needed):
>>
>>     https://patchwork.openembedded.org/patch/140355/
>>     <https://patchwork.openembedded.org/patch/140355/>
>>
>>     Neither of our patches have been merged yet.
>>
>>
>> Sorry, somehow slipped through the net.
>>
>> This patch doesn't apply as it's been corrupted by the mailer.  Please
>> use git-send-email instead of copy/pasting (I've managed to apply it
>> manually as it's a simple patch this time).
>>
>> Ross
>>
> 
> Which patch are you referring to? I used git send-email for the systemd
> patch, and it applies just fine for me on OE-core master (using patch -p1).

Wasn't you, was mine. :)

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-07 16:33           ` Martin Kelly
  2017-06-07 16:34             ` Jan Kiszka
@ 2017-06-07 19:09             ` Burton, Ross
  2017-06-13 16:35               ` Martin Kelly
  1 sibling, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2017-06-07 19:09 UTC (permalink / raw)
  To: Martin Kelly; +Cc: Jan Kiszka, OE-core

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

On 7 June 2017 at 17:33, Martin Kelly <mkelly@xevo.com> wrote:

> Which patch are you referring to? I used git send-email for the systemd
> patch, and it applies just fine for me on OE-core master (using patch -p1).
>

Sorry, forgot to trim recipients.  Yes, it was Jan's patch.

Ross

[-- Attachment #2: Type: text/html, Size: 678 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-07 19:09             ` Burton, Ross
@ 2017-06-13 16:35               ` Martin Kelly
  2017-06-13 16:38                 ` Burton, Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kelly @ 2017-06-13 16:35 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Jan Kiszka, OE-core

On 06/07/2017 12:09 PM, Burton, Ross wrote:
>
> On 7 June 2017 at 17:33, Martin Kelly <mkelly@xevo.com
> <mailto:mkelly@xevo.com>> wrote:
>
>     Which patch are you referring to? I used git send-email for the
>     systemd patch, and it applies just fine for me on OE-core master
>     (using patch -p1).
>
>
> Sorry, forgot to trim recipients.  Yes, it was Jan's patch.
>

Alright, makes sense. Do the patches look OK to you?


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-13 16:35               ` Martin Kelly
@ 2017-06-13 16:38                 ` Burton, Ross
  2017-06-13 16:46                   ` Martin Kelly
  0 siblings, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2017-06-13 16:38 UTC (permalink / raw)
  To: Martin Kelly; +Cc: Jan Kiszka, OE-core

[-- Attachment #1: Type: text/plain, Size: 170 bytes --]

On 13 June 2017 at 17:35, Martin Kelly <mkelly@xevo.com> wrote:

> Alright, makes sense. Do the patches look OK to you?
>

Yes, they're both in master now.

Ross

[-- Attachment #2: Type: text/html, Size: 555 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-13 16:38                 ` Burton, Ross
@ 2017-06-13 16:46                   ` Martin Kelly
  2017-06-13 16:52                     ` Burton, Ross
  0 siblings, 1 reply; 16+ messages in thread
From: Martin Kelly @ 2017-06-13 16:46 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Jan Kiszka, OE-core

On 06/13/2017 09:38 AM, Burton, Ross wrote:
>
> On 13 June 2017 at 17:35, Martin Kelly <mkelly@xevo.com
> <mailto:mkelly@xevo.com>> wrote:
>
>     Alright, makes sense. Do the patches look OK to you?
>
>
> Yes, they're both in master now.
>

Ah, I was checking meta-openembedded by mistake. Thanks.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-13 16:46                   ` Martin Kelly
@ 2017-06-13 16:52                     ` Burton, Ross
  2017-06-13 16:56                       ` Martin Kelly
  0 siblings, 1 reply; 16+ messages in thread
From: Burton, Ross @ 2017-06-13 16:52 UTC (permalink / raw)
  To: Martin Kelly; +Cc: Jan Kiszka, OE-core

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

On 13 June 2017 at 17:46, Martin Kelly <mkelly@xevo.com> wrote:

> Ah, I was checking meta-openembedded by mistake. Thanks.
>

The Best Known Method is to have a oe-core clone that you use for pushing
stuff upstream, and then you can just rebase to see what has been merged or
what hasn't yet merged and needs rebasing.

Ross

[-- Attachment #2: Type: text/html, Size: 718 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] tcf-agent: Fix daemon termination
  2017-06-13 16:52                     ` Burton, Ross
@ 2017-06-13 16:56                       ` Martin Kelly
  0 siblings, 0 replies; 16+ messages in thread
From: Martin Kelly @ 2017-06-13 16:56 UTC (permalink / raw)
  To: Burton, Ross; +Cc: Jan Kiszka, OE-core

On 06/13/2017 09:52 AM, Burton, Ross wrote:
>
> On 13 June 2017 at 17:46, Martin Kelly <mkelly@xevo.com
> <mailto:mkelly@xevo.com>> wrote:
>
>     Ah, I was checking meta-openembedded by mistake. Thanks.
>
>
> The Best Known Method is to have a oe-core clone that you use for
> pushing stuff upstream, and then you can just rebase to see what has
> been merged or what hasn't yet merged and needs rebasing.
>

Yep, I normally do that, but I have a few patches in flight between 
OE-core and meta-oe and I had forgotten which went where :).


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-06-13 17:12 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 15:28 [PATCH] tcf-agent: Fix daemon termination Jan Kiszka
2017-05-01 16:41 ` Martin Kelly
2017-06-01  0:17   ` Martin Kelly
2017-06-01  5:45     ` Martin Kelly
2017-06-06 10:11     ` Jan Kiszka
2017-06-06 17:28       ` Martin Kelly
2017-06-07 16:08         ` Burton, Ross
2017-06-07 16:29           ` Jan Kiszka
2017-06-07 16:33           ` Martin Kelly
2017-06-07 16:34             ` Jan Kiszka
2017-06-07 19:09             ` Burton, Ross
2017-06-13 16:35               ` Martin Kelly
2017-06-13 16:38                 ` Burton, Ross
2017-06-13 16:46                   ` Martin Kelly
2017-06-13 16:52                     ` Burton, Ross
2017-06-13 16:56                       ` Martin Kelly

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.