KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Using IPC and peach

  • Using IPC and peach

    Posted by simon_watson_sj on December 15, 2021 at 12:00 am

    Hey All,

    I have tried to set up my KDB HDB to use a set of 4 separate processes as 1 secondary process and 3 peach processes.

    However, after assigning the 3 processes to peach, I get an error in the Developer window which says:

    “could not lint the specified item(s). 10 is not an IPC handle”

    thing is, it was an IPC handle but passing it to peach seems to have released it.

    Before using .z.pd


    gives 2

    What am I doing wrong?

    I am on Pop_OS. I use this function in my .bashrc to start up the q sessions:

    KDB(){ echo "start developer with 4 slave processes."; 
    q -p 20001 & q -p 20002 & q -p 20003 & q -p 20004 & source /home/simon/developer/config/config.profile;
    q /home/simon/developer/launcher.q_ -s -4 & }

    First thing from the command line I execute that function and can see from the usual q startup notifications it works. I can also see the processes have started. After that, I open KDB Developer.

    In Developer I then capture the processes as follows:

    // capture the other processes. 
    {(`$".procs.h.",(string x[0])) set hopen x[1]} each flip (`tom`deric`jane`nessie;("J"$("20001";"20002";"20003";"20004")));
    // assign process names to each of the processes as `self. 
    {(neg `.procs[`h][x[0]])x[1];(neg `.procs[`h][x[0]])[];} each flip (`tom`deric`jane`nessie; raze each "`self set `",/:string `tom`deric`jane`nessie); 
    // assign 3 processes to peach. 
    .z.pd: `u#`.procs.h[`tom`deric`jane]

    Sometimes it seems like this works until I change developer window, alter a file and save. I don’t know if that just coincidence though.

    Keen to hear if anyone can see any obvious schoolboy errors.


    simon_watson_sj replied 4 months ago 2 Members · 1 Reply
  • 1 Reply
  • leahs

    December 17, 2021 at 12:00 am

    Hello Simon,

    I’m reverting with feedback shared by our internal pros. Kudos to Benjamin Jeffery here!

    There appears to be two identifiable issues:

    1. Analyst was not designed to work with .z.pd. As these secondary processes don’t have internal Analyst functions or other state defined, behaviour when using .z.pd is undefined. This limitation will be added to the documentation for the next Analyst release.

    2. The handle to the secondary process is closing whenever peach is called with a locked function. An internal ticket has been raised acknowledging this.

    Hope this helps. Thanks again for sharing with the community

    Kind regards,


Log in to reply.