Broken pipe error during CREATE TABLE AS query


I’ve got the following table
\d tx_out;
btc_value TEXT ENCODING DICT(32),
scriptPubKey TEXT ENCODING DICT(32),
With 600M rows. I’m trying to make it smaller by running CREATE TABLE tx_out_small AS (SELECT address, txid FROM tx_out); but I get the following output when I do

Thrift: Tue Oct 10 14:22:24 2017 TSocket::write_partial() send() <Host: localhost Port: 9091>Broken pipe
Thrift: Tue Oct 10 14:28:10 2017 TSocket::write_partial() send() <Host: localhost Port: 9091>Broken pipe

And any other queries I try to run just return Session not valid. So it looks like mapd_server is crashing, but I don’t see what’s happening in mapd_server.INFO

I1010 14:22:32.419075 13112 MapDHandler.cpp:561] sql_execute :VOiw3Ogzmh29nC7PP0V8KAzcYseA2FMo:query_str:CREATE TABLE tx_out_small AS (SELECT address, txid FROM tx_out);
I1010 14:22:32.419174 13112 MapDHandler.cpp:2908] passing query to legacy processor
I1010 14:22:32.426645 13112 Calcite.cpp:247] User mapd catalog mapd sql '(SELECT address, txid FROM tx_out);'
I1010 14:22:32.956732 13106 FileMgr.cpp:116] Read table metadata, Epoch is 1120 for table data at '/var/lib/mapd/data/mapd_data/table_1_21/'

This is with enable-watchdog=true and allow-cpu-fallback=true in mapd.conf. I’ve tried every other combination of the two options but it always has the same effect: CPU and RAM go through the roof, then I start getting the ‘broken pipe’ errors.

Oh and here’s nvidia-smi
| NVIDIA-SMI 384.81 Driver Version: 384.81 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce GTX 1070 Off | 00000000:01:00.0 On | N/A |
| N/A 42C P8 11W / N/A | 1087MiB / 8105MiB | 6% Default |

| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|    0     13211      G   ...-token=C98144F924CBD22A966EAB49D47FAC9B    65MiB |
|    0     13230      G   /usr/lib/xorg/Xorg                           230MiB |
|    0     14014      G   compiz                                        76MiB |
|    0     14502    C+G   /opt/mapd/bin/mapd_server                    702MiB |

I’ve seen several other posts with this issue and they seem to be largely hardware specific, so that’s why I’m providing the wall of text with all my hardware info.

GPU utilization at 0 - 5% during large operation


Could you include the full mapd_server.INFO log?

I suspect we are running out of memory on the 600M row projection you are doing for the create table. This is an area we need to do more work on as we currently need to create a complete intermediate buffer before we create the new table and in case like your here, i suspect we are unable to get enough room for it.



Hey sorry for late reply, I recently reformatted the system and I can’t find the server logs I sent to myself. I’ll update with the full log if I’m still having issues with MapD. Thanks!