hawq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lei Chang <chang.lei...@gmail.com>
Subject Re: how to set breakpoint for hawq
Date Mon, 09 Nov 2015 07:50:20 GMT
To setup breakpoints in child process for example query executors (QEs),
typically, we first run the query once and the QEs are started and cached.
Then we set breakpoints on the QEs, and then run the SQL again.

And the second method is to insert a sleep statement in the function that
you want to see.

Hope that it is helpful!

Cheers
Lei



On Fri, Nov 6, 2015 at 1:06 PM, hawqstudy <hawqstudy@163.com> wrote:

> Hi guys,
>
>
> I'm trying to set breakpoint in gdb but found it's difficult to follow the
> codepath into child processes.
>
>
> For example, if I want to see the calling path for
> get_datanode_rest_servers ( which calls getNodesInfo to request hdfs node
> information ), I do:
> (gdb) break get_datanode_rest_servers
> Breakpoint 4 at 0x5143b0
> (gdb) c
> Continuing.
> [New Thread 0x7f4fd0d2c700 (LWP 20508)]
> [Thread 0x7f4fd0d2c700 (LWP 20508) exited]
> [New Thread 0x7f4fd0d2c700 (LWP 20511)]
> [Thread 0x7f4fd0d2c700 (LWP 20511) exited]
> Detaching after fork from child process 20515.
>
>
> It doesn't seems work because I guess the function is called within child
> process.
> However if I set follow-fork-mode child, gdb will quit after following the
> first forked process:
> (gdb) set follow-fork-mode child
> (gdb) c
> Continuing.
> [New Thread 0x7f4fd0d2c700 (LWP 20521)]
> [Thread 0x7f4fd0d2c700 (LWP 20521) exited]
> [New Thread 0x7f4fd0d2c700 (LWP 20524)]
> [Thread 0x7f4fd0d2c700 (LWP 20524) exited]
> [New process 20528]
> [Thread debugging using libthread_db enabled]
> process 20528 is executing new program: /bin/bash
> Error in re-setting breakpoint 4: Function "get_datanode_rest_servers" not
> defined.
> process 20528 is executing new program: /usr/bin/addr2line
> Missing separate debuginfos, use: debuginfo-install
> bash-4.1.2-9.el6_2.x86_64
>
>
> Program exited normally.
> Missing separate debuginfos, use: debuginfo-install
> binutils-2.20.51.0.2-5.34.el6.x86_64
>
>
> It calls addr2line when trying to get stack trace for writting logs, and
> gdb just quit program when addr2line finish.
> I think there must be some easier way to track into child processes when
> debugging hawq, please give some advice.
> Cheers

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message