<feed xmlns='http://www.w3.org/2005/Atom'>
<title>samba.git/ctdb/config/debug-hung-script.sh, branch talloc-2.1.3</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/'/>
<entry>
<title>ctdb-scripts: Fix stack dumping when debugging hung scripts</title>
<updated>2014-11-18T05:37:44+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-11-17T03:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=7f377cf26ecec10cd77f28c1993c48337279892d'/>
<id>7f377cf26ecec10cd77f28c1993c48337279892d</id>
<content type='text'>
There are parentheses missing that stop the default pattern from
matching commands with trailing garbage (e.g. "exportfs.orig").

A careful check of POSIX (and running GNU sed with --posix) suggests
that "\|" isn't a supported way of specifying alternation in a regular
expression.  Therefore, it is clearer to switch to extended regular
expressions so that this has a chance of being portable (even though
the point is to print /proc/&lt;pid&gt;/stack, which only works on Linux).

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Tue Nov 18 06:37:45 CET 2014 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are parentheses missing that stop the default pattern from
matching commands with trailing garbage (e.g. "exportfs.orig").

A careful check of POSIX (and running GNU sed with --posix) suggests
that "\|" isn't a supported way of specifying alternation in a regular
expression.  Therefore, it is clearer to switch to extended regular
expressions so that this has a chance of being portable (even though
the point is to print /proc/&lt;pid&gt;/stack, which only works on Linux).

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Tue Nov 18 06:37:45 CET 2014 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-tests: Fix racy test for debugging hung scripts</title>
<updated>2014-07-03T06:19:22+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-06-26T05:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=a7c55007659ab768293f15c5f5fc00c5d9e5c814'/>
<id>a7c55007659ab768293f15c5f5fc00c5d9e5c814</id>
<content type='text'>
Debugging can still be running when a monitor event times out and
scriptstatus output changes.

When debugging a hung script to a log file, write to a temporary file
and move the temporary file over the log file when done.  The test
then waits for the log file to appear.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Thu Jul  3 08:19:23 CEST 2014 on sn-devel-104
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Debugging can still be running when a monitor event times out and
scriptstatus output changes.

When debugging a hung script to a log file, write to a temporary file
and move the temporary file over the log file when done.  The test
then waits for the log file to appear.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;

Autobuild-User(master): Amitay Isaacs &lt;amitay@samba.org&gt;
Autobuild-Date(master): Thu Jul  3 08:19:23 CEST 2014 on sn-devel-104
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-scripts: Always print footer when debugging hung script</title>
<updated>2014-07-03T03:55:13+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-06-26T04:46:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=b0c191e5de15e54646b02925e37458d6a56db015'/>
<id>b0c191e5de15e54646b02925e37458d6a56db015</id>
<content type='text'>
There shouldn't be an early exit for the "init" event.  Just make the
"ctdb scriptstatus" call conditional.

While here, move the comment about only running a single instance to
be near locking code.  The comment is more useful there.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There shouldn't be an early exit for the "init" event.  Just make the
"ctdb scriptstatus" call conditional.

While here, move the comment about only running a single instance to
be near locking code.  The comment is more useful there.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ctdb-scripts: Enhancements to hung script debugging</title>
<updated>2014-02-19T01:04:47+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2014-02-07T06:37:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=2532149f8f9bbe6d3c8f5ac6e5e4bc2ad1681e27'/>
<id>2532149f8f9bbe6d3c8f5ac6e5e4bc2ad1681e27</id>
<content type='text'>
* Add stack dumps for "interesting" processes that sometimes get
  stuck, so try to print stack traces for them if they appear in the
  pstree output.

* Add new configuration variables CTDB_DEBUG_HUNG_SCRIPT_LOGFILE and
  CTDB_DEBUG_HUNG_SCRIPT_STACKPAT.  These are primarily for testing
  but the latter may be useful for live debugging.

* Load CTDB configuration so that above configuration variables can be
  set/changed without restarting ctdbd.

Add a test that tries to ensure that all of this is working.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Add stack dumps for "interesting" processes that sometimes get
  stuck, so try to print stack traces for them if they appear in the
  pstree output.

* Add new configuration variables CTDB_DEBUG_HUNG_SCRIPT_LOGFILE and
  CTDB_DEBUG_HUNG_SCRIPT_STACKPAT.  These are primarily for testing
  but the latter may be useful for live debugging.

* Load CTDB configuration so that above configuration variables can be
  set/changed without restarting ctdbd.

Add a test that tries to ensure that all of this is working.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Reviewed-by: Amitay Isaacs &lt;amitay@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: Do not run ctdb tool commands when debugging hung "init" event</title>
<updated>2013-08-09T01:04:55+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2013-08-06T06:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=98163e01a9f112d2fb1c92a3eccd40b7869a37aa'/>
<id>98163e01a9f112d2fb1c92a3eccd40b7869a37aa</id>
<content type='text'>
CTDB daemon is not ready to accept clients in INIT runstate (init event).
CTDB daemon will start accepting connections in SETUP runstate (setup event)
and later.

Also, minor log formatting changes.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;

(This used to be ctdb commit 81d7ce03b28d592a1337639e14d9ea141e20bfff)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CTDB daemon is not ready to accept clients in INIT runstate (init event).
CTDB daemon will start accepting connections in SETUP runstate (setup event)
and later.

Also, minor log formatting changes.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;

(This used to be ctdb commit 81d7ce03b28d592a1337639e14d9ea141e20bfff)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: Run scriptstatus for hung event</title>
<updated>2013-07-29T04:02:13+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2013-07-22T05:08:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=67b22b6e94784b4ac324881a25993f9cecd2946d'/>
<id>67b22b6e94784b4ac324881a25993f9cecd2946d</id>
<content type='text'>
The timeout information printed by ctdbd is less than useful because
it refers to the cumulative time taken by the eventscripts run so far.
Adding scriptstatus output indicates where time was actually spent.

Since there is now quite a bit of output, serialise the calls to this
script using flock.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Pair-programmed-with: Amitay Isaacs &lt;amitay@gmail.com&gt;

(This used to be ctdb commit 1b016b2dfc5d7d3f2a42ce4dfe569608e90eb714)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The timeout information printed by ctdbd is less than useful because
it refers to the cumulative time taken by the eventscripts run so far.
Adding scriptstatus output indicates where time was actually spent.

Since there is now quite a bit of output, serialise the calls to this
script using flock.

Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;
Pair-programmed-with: Amitay Isaacs &lt;amitay@gmail.com&gt;

(This used to be ctdb commit 1b016b2dfc5d7d3f2a42ce4dfe569608e90eb714)
</pre>
</div>
</content>
</entry>
<entry>
<title>scripts: debug-hung-script.sh doesn't need functions/loadconfig</title>
<updated>2013-01-08T04:18:47+00:00</updated>
<author>
<name>Martin Schwenke</name>
<email>martin@meltin.net</email>
</author>
<published>2013-01-03T04:33:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=4157efdcbbc8636aba1f914cead55cf65fec7904'/>
<id>4157efdcbbc8636aba1f914cead55cf65fec7904</id>
<content type='text'>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;

(This used to be ctdb commit 8507303b525d20c74e8ec4e7c4f5f275945cd3b6)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Martin Schwenke &lt;martin@meltin.net&gt;

(This used to be ctdb commit 8507303b525d20c74e8ec4e7c4f5f275945cd3b6)
</pre>
</div>
</content>
</entry>
<entry>
<title>Debug: When scripts hang, we may need to collect additional data in order to debug why the script hung.</title>
<updated>2012-05-17T00:29:03+00:00</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>ronniesahlberg@gmail.com</email>
</author>
<published>2012-05-17T00:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/samba.git/commit/?id=dce5969d1262f759abd7ba10602ff37ba6f5a3aa'/>
<id>dce5969d1262f759abd7ba10602ff37ba6f5a3aa</id>
<content type='text'>
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Break this debug and datacollection out into an external script to make it easier to modify what data we need to collect.
For now we only collect a pstree so we can see what part of the script we hung in.

S1037271

(This used to be ctdb commit 6e68797af67bee36f2bad045f94806e7e98f27e9)
</pre>
</div>
</content>
</entry>
</feed>
