# MATLAB to Kdb Segmentation Fault

**URL:** <https://forum.kx.com/t/matlab-to-kdb-segmentation-fault/9524>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [February 25, 2015, 4:56pm UTC](https://forum.kx.com/t/matlab-to-kdb-segmentation-fault/9524 "2015-02-25T16:56:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_L\_V](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@A\_L\_V](https://forum.kx.com/u/A_L_V)\
**Post date:** [February 25, 2015, 4:56pm UTC](https://forum.kx.com/t/matlab-to-kdb-segmentation-fault/9524/1 "2015-02-25T16:56:00Z")

</div>

The error appears sporadically, whilst loading \*.mat files into the database; could have loaded 500 GB of data, could have just 100 MB:

Error using kx/exec (line 69)  
Java exception occurred:  
java.net.SocketException: Connection reset  
&nbsp;&nbsp;&nbsp; at java.net.SocketOutputStream.socketWrite(Unknown Source)  
&nbsp;&nbsp;&nbsp; at java.net.SocketOutputStream.write(Unknown Source)  
&nbsp;&nbsp;&nbsp; at c.w(c.java:547)  
&nbsp;&nbsp;&nbsp; at c.ks(c.java:551)

On the Kdb end I get:

Sorry, this application or an associated library has encountered a fatal error and will exit.  
If known, please email the steps to reproduce this error to [tech@kx.com](mailto:tech@kx.com)  
with a copy of the kdb+ startup banner.  
Thank you.  
Segmentation fault

How do I get rid of this error?  
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

KDB+ 3.2 2015.01.20 Copyright (C) 1993-2015 Kx Systems  
l32/ 48()core 386759MB

&nbsp;\< M A T L A B (R) \>  
Copyright 1984-2014 The MathWorks, Inc.  
R2014a (8.3.0.532) 64-bit (glnxa64)  
February 11, 2014

---

<div class="post-metadata">

**Author:** ![charlie1](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@charlie1](https://forum.kx.com/u/charlie1)\
**Post date:** [February 25, 2015, 8:52pm UTC](https://forum.kx.com/t/matlab-to-kdb-segmentation-fault/9524/2 "2015-02-25T20:52:00Z")

</div>

was there any further info printed? e.g. stack trace?  
was a core dump produced? If so, can you load it into gdb and get the backtrace?

do you have multiple kdb+ processes writing/reading the same hdb area?

best case is for you to find the steps to reproduce it and let us know them.
