Skip to content

Instantly share code, notes, and snippets.

@tkelman
Created December 16, 2014 05:48
Show Gist options
  • Select an option

  • Save tkelman/dcbcac708c188ae308e3 to your computer and use it in GitHub Desktop.

Select an option

Save tkelman/dcbcac708c188ae308e3 to your computer and use it in GitHub Desktop.
$ JULIA_CPU_CORES=1 gdb --args usr/bin/julia-debug test/runtests.jl numbers parallel
GNU gdb (GDB) 7.8
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from usr/bin/julia-debug...done.
(gdb) break _exception_handler
Function "_exception_handler" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_exception_handler) pending.
(gdb) break jl_rethrow
Function "jl_rethrow" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (jl_rethrow) pending.
(gdb) r
Starting program: /home/Tony/julia/usr/bin/julia-debug test/runtests.jl numbers parallel
[New Thread 6196.0x2ee8]
[New Thread 6196.0x2448]
[New Thread 6196.0x2ef0]
[New Thread 6196.0x21b4]
[New Thread 6196.0x51fc]
[New Thread 6196.0x2e6c]
[New Thread 6196.0x30d0]
[New Thread 6196.0x3620]
[New Thread 6196.0x930]
[New Thread 6196.0x10b8]
[New Thread 6196.0x465c]
* numbers
[New Thread 6196.0x2e74]
[New Thread 6196.0x4120]
[Thread 6196.0x10b8 exited with code 0]
[Thread 6196.0x2e74 exited with code 0]
[Thread 6196.0x465c exited with code 0]
[Thread 6196.0x4120 exited with code 0]
Program received signal SIGFPE, Arithmetic exception.
0x0000000063041550 in __gmp_exception () from /home/Tony/julia/usr/bin/libgmp.DLL
(gdb) bt
#0 0x0000000063041550 in __gmp_exception () from /home/Tony/julia/usr/bin/libgmp.DLL
#1 0x000000006304158e in __gmp_divide_by_zero () from /home/Tony/julia/usr/bin/libgmp.DLL
#2 0x0000000063052d30 in __gmpz_powm () from /home/Tony/julia/usr/bin/libgmp.DLL
#3 0x000000000ef13009 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) print jl_current_task->eh
$1 = (jl_handler_t *) 0xd5db00
(gdb) print jl_stackbase
$2 = (void *) 0xd5fcf0
(gdb) info reg
rax 0xa 10
rbx 0x210d6ba0 554527648
rcx 0x2 2
rdx 0x0 0
rsi 0x0 0
rdi 0x210d6be0 554527712
rbp 0xd5d5a0 0xd5d5a0
rsp 0xd5d4c0 0xd5d4c0
r8 0x210d6ba0 554527648
r9 0x210d6bb8 554527672
r10 0x2d07d30 47217968
r11 0xd5ce38 14011960
r12 0x210d6b88 554527624
r13 0x210d6bb0 554527664
r14 0xd5d660 14014048
r15 0x210d6b88 554527624
rip 0x63041550 0x63041550 <__gmp_exception+16>
eflags 0x10202 [ IF RF ]
cs 0x33 51
ss 0x2b 43
ds 0x0 0
es 0x0 0
fs 0x0 0
gs 0x0 0
(gdb) c
Continuing.
Breakpoint 1, _exception_handler (ExceptionInfo=0xd5c670, in_ctx=1) at init.c:298
298 {
(gdb) s
299 if (ExceptionInfo->ExceptionRecord->ExceptionFlags == 0) {
(gdb) s
300 switch (ExceptionInfo->ExceptionRecord->ExceptionCode) {
(gdb) s
302 fpreset();
(gdb) s
_fpreset () at /usr/src/debug/mingw64-x86_64-runtime-3.2.0-1/crt/CRT_fp10.c:12
12 /usr/src/debug/mingw64-x86_64-runtime-3.2.0-1/crt/CRT_fp10.c: No such file or directory.
(gdb) s
_exception_handler (ExceptionInfo=0xd5c670, in_ctx=1) at init.c:303
303 jl_throw_in_ctx(jl_diverror_exception, ExceptionInfo->ContextRecord,in_ctx);
(gdb) print bt=0
No symbol "bt" in current context.
(gdb) set bt=0
No symbol "bt" in current context.
(gdb) info locals
recursion = 0
(gdb) s
jl_throw_in_ctx (excpt=0x39ef218, ctxThread=0xd5cdc0, bt=1) at init.c:233
233 {
(gdb) print bt=0
$3 = 0
(gdb) s
234 assert(excpt != NULL);
(gdb) s
235 bt_size = bt ? rec_backtrace_ctx(bt_data, MAX_BT_SIZE, ctxThread) : 0;
(gdb) s
236 jl_exception_in_transit = excpt;
(gdb) s
238 ctxThread->Rip = (DWORD64)&jl_rethrow;
(gdb) s
239 ctxThread->Rsp &= (DWORD64)-16;
(gdb) s
240 ctxThread->Rsp -= 8; //fix up the stack pointer -- this seems to be correct by observation
(gdb) s
248 }
(gdb) s
_exception_handler (ExceptionInfo=0xd5c670, in_ctx=1) at init.c:304
304 return EXCEPTION_CONTINUE_EXECUTION;
(gdb) s
366 }
(gdb) s
_seh_exception_handler (ExceptionRecord=0xd5d2b0, EstablisherFrame=0xd5d6b0,
ContextRecord=0xd5cdc0, DispatcherContext=0xd5c770) at init.c:383
383 rval = ExceptionContinueExecution; break;
(gdb) s
392 return rval;
(gdb) s
393 }
(gdb) s
0x0000000077889d2d in ntdll!RtlDecodePointer () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) s
Single stepping until exit from function ntdll!RtlDecodePointer,
which has no line number information.
0x00000000778791cf in ntdll!RtlUnwindEx () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) s
Single stepping until exit from function ntdll!RtlUnwindEx,
which has no line number information.
0x000000007786ddb6 in ntdll!RtlDeleteTimer () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) s
Single stepping until exit from function ntdll!RtlDeleteTimer,
which has no line number information.
0x00000000778b1248 in ntdll!KiUserExceptionDispatcher ()
from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
(gdb) c
Continuing.
Breakpoint 2, jl_rethrow () at task.c:778
778 {
(gdb) print bt
No symbol "bt" in current context.
(gdb) bt
#0 jl_rethrow () at task.c:778
#1 0x0000000003cc01fe in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb) c
Continuing.
[New Thread 6196.0x3090]
* parallel[New Thread 6196.0x3754]
[New Thread 6196.0x2db8]
SUCCESS
[Thread 6196.0x51fc exited with code 0]
[Thread 6196.0x930 exited with code 0]
[Thread 6196.0x2ef0 exited with code 0]
[Thread 6196.0x3754 exited with code 0]
[Thread 6196.0x21b4 exited with code 0]
[Thread 6196.0x3620 exited with code 0]
[Thread 6196.0x3090 exited with code 0]
[Thread 6196.0x30d0 exited with code 0]
[Thread 6196.0x2448 exited with code 0]
[Thread 6196.0x2e6c exited with code 0]
[Thread 6196.0x2db8 exited with code 0]
[Inferior 1 (process 6196) exited normally]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment