<p dir="auto">I ran tensorflow debugger using the command "python -m  --debug" but got the following error (i,e Signal only works in main thread):</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/21690396/23540767/24df69c6-ff98-11e6-96bf-5ee98a439f77.PNG"><img src="https://cloud.githubusercontent.com/assets/21690396/23540767/24df69c6-ff98-11e6-96bf-5ee98a439f77.PNG" alt="screenshot3png" style="max-width: 100%;"></a></p>
<p dir="auto">The error is thrown when a session run call is executed in a child thread (spawned from main thread). Is tensorflow debugger only supported for single threaded applications?</p>
<h3 dir="auto">What related GitHub issues or StackOverflow threads have you found by searching the web for your problem?</h3>
<p dir="auto">None</p>
<h3 dir="auto">Environment info</h3>
<p dir="auto">Operating System: CentOS 7.2.1511</p>
<p dir="auto">Installed version of CUDA and cuDNN:<br>
(please attach the output of <code class="notranslate">ls -l /path/to/cuda/lib/libcud*</code>):<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/21690396/23540624/38732a46-ff97-11e6-9749-a43b8af6c5aa.PNG"><img src="https://cloud.githubusercontent.com/assets/21690396/23540624/38732a46-ff97-11e6-9749-a43b8af6c5aa.PNG" alt="screenshot" style="max-width: 100%;"></a></p>
<p dir="auto">If installed from binary pip package, provide:</p>
<ol dir="auto">
<li>
<p dir="auto">A link to the pip package you installed: <a href="https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp35-cp35m-linux_x86_64.whl" rel="nofollow">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.0.0-cp35-cp35m-linux_x86_64.whl</a></p>
</li>
<li>
<p dir="auto">The output from <code class="notranslate">python -c "import tensorflow; print(tensorflow.__version__)"</code>.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/21690396/23540694/b42648f8-ff97-11e6-93ff-4cabc2d2d199.PNG"><img src="https://cloud.githubusercontent.com/assets/21690396/23540694/b42648f8-ff97-11e6-93ff-4cabc2d2d199.PNG" alt="screenshot2" style="max-width: 100%;"></a></p>
</li>
</ol>
<p dir="auto">If installed from source, provide</p>
<ol dir="auto">
<li>The commit hash (<code class="notranslate">git rev-parse HEAD</code>)</li>
<li>The output of <code class="notranslate">bazel version</code></li>
</ol>
<h3 dir="auto">If possible, provide a minimal reproducible example (We usually don't have time to read hundreds of lines of your code)</h3>
<h3 dir="auto">What other attempted solutions have you tried?</h3>
<h3 dir="auto">Logs or other output that would be helpful</h3>
<p dir="auto">(If logs are large, please upload as attachment or provide link).</p>
<ul dir="auto">
<li><strong>OS Platform and Distribution (e.g., Linux Ubuntu 16.04)</strong>: archlinux</li>
<li><strong>TensorFlow installed from (source or binary)</strong>: binary</li>
<li><strong>TensorFlow version (use command below)</strong>: v1.3.0-rc2-20-g0787eee 1.3.0</li>
<li><strong>Python version</strong>: 3.6</li>
<li><strong>CUDA/cuDNN version</strong>: 8.0/6.0</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import tensorflow as tf
m = tf.placeholder(tf.bool, shape=[None, 1], name='m')
b = tf.placeholder(tf.float32, shape=[1, None], name='b')
output = tf.boolean_mask(b, m)
mask = [[True],[True],[True],[True],[True]]
y = np.random.rand(1, 4)

with tf.Session() as sess:
    print(y)
    print(sess.run(output, feed_dict={m: mask, b:y}))"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">tensorflow</span> <span class="pl-k">as</span> <span class="pl-s1">tf</span>
<span class="pl-s1">m</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">bool</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">None</span>, <span class="pl-c1">1</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'m'</span>)
<span class="pl-s1">b</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">placeholder</span>(<span class="pl-s1">tf</span>.<span class="pl-s1">float32</span>, <span class="pl-s1">shape</span><span class="pl-c1">=</span>[<span class="pl-c1">1</span>, <span class="pl-c1">None</span>], <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">'b'</span>)
<span class="pl-s1">output</span> <span class="pl-c1">=</span> <span class="pl-s1">tf</span>.<span class="pl-en">boolean_mask</span>(<span class="pl-s1">b</span>, <span class="pl-s1">m</span>)
<span class="pl-s1">mask</span> <span class="pl-c1">=</span> [[<span class="pl-c1">True</span>],[<span class="pl-c1">True</span>],[<span class="pl-c1">True</span>],[<span class="pl-c1">True</span>],[<span class="pl-c1">True</span>]]
<span class="pl-s1">y</span> <span class="pl-c1">=</span> <span class="pl-s1">np</span>.<span class="pl-s1">random</span>.<span class="pl-en">rand</span>(<span class="pl-c1">1</span>, <span class="pl-c1">4</span>)

<span class="pl-k">with</span> <span class="pl-s1">tf</span>.<span class="pl-v">Session</span>() <span class="pl-k">as</span> <span class="pl-s1">sess</span>:
    <span class="pl-en">print</span>(<span class="pl-s1">y</span>)
    <span class="pl-en">print</span>(<span class="pl-s1">sess</span>.<span class="pl-en">run</span>(<span class="pl-s1">output</span>, <span class="pl-s1">feed_dict</span><span class="pl-c1">=</span>{<span class="pl-s1">m</span>: <span class="pl-s1">mask</span>, <span class="pl-s1">b</span>:<span class="pl-s1">y</span>}))</pre></div>
<p dir="auto">The code runs, while I expect an index out-of-bound error.</p>
<p dir="auto">In fact, even when mask is a 4x1 boolean, I still expect an error (since b is 1x4). But that's somewhat arguable.</p>