Re: How to debug "received fatal signal"

Wouter Beek <[email protected]> Sat, 19 Apr 2014 14:07:16 +0200
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <CAE1un7Mnt60GV8zH0Tt6omahSC44Juhsroh1WxdOH_aNyic1LA@mail.gmail.com>
The third time I run my program the message is again different. Included on
an external site because of its length:
htttp://www.wouterblog.com/error3.log

On Sat, Apr 19, 2014 at 1:25 PM, Beek, W.G.J. <[email protected]> wrote:

> For completeness' sake I here include another crash of the same program:
>
> ~~~
> *** glibc detected *** swipl: munmap_chunk(): invalid pointer:
> 0x00007ffee9b59080 ***
> ======= Backtrace: =========
> /lib64/libc.so.6[0x3266876166]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc402b)[0x7ffff7d9902b]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc421c)[0x7ffff7d9921c]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc471c)[0x7ffff7d9971c]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc577e)[0x7ffff7d9a77e]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc0fc0)[0x7ffff7d95fc0]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(PL_next_solution+0x5940)[0x7ffff7d0a7a0]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0x6f898)[0x7ffff7d44898]
>
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xa3ed9)[0x7ffff7d78ed9]
> /lib64/libpthread.so.0[0x32674079d1]
> /lib64/libc.so.6(clone+0x6d)[0x32668e8b6d]
> ======= Memory map: ========
> 00400000-00401000 r-xp 00000000 08:11 4214178
>   /home/wbk440/lib/swipl-7.1.11/bin/x86_64-linux/swipl
> 00600000-00601000 rw-p 00000000 08:11 4214178
>   /home/wbk440/lib/swipl-7.1.11/bin/x86_64-linux/swipl
> 00601000-04bbe000 rw-p 00000000 00:00 0
>  [heap]
> 3266400000-3266420000 r-xp 00000000 08:07 28303425
>   /lib64/ld-2.12.so
> 326661f000-3266620000 r--p 0001f000 08:07 28303425
>   /lib64/ld-2.12.so
> 3266620000-3266621000 rw-p 00020000 08:07 28303425
>   /lib64/ld-2.12.so
> 3266621000-3266622000 rw-p 00000000 00:00 0
> 3266800000-326698b000 r-xp 00000000 08:07 28303426
>   /lib64/libc-2.12.so
> 326698b000-3266b8a000 ---p 0018b000 08:07 28303426
>   /lib64/libc-2.12.so
> 3266b8a000-3266b8e000 r--p 0018a000 08:07 28303426
>   /lib64/libc-2.12.so
> 3266b8e000-3266b8f000 rw-p 0018e000 08:07 28303426
>   /lib64/libc-2.12.so
> 3266b8f000-3266b94000 rw-p 00000000 00:00 0
> 3266c00000-3266c83000 r-xp 00000000 08:07 28303562
>   /lib64/libm-2.12.so
> 3266c83000-3266e82000 ---p 00083000 08:07 28303562
>   /lib64/libm-2.12.so
> 3266e82000-3266e83000 r--p 00082000 08:07 28303562
>   /lib64/libm-2.12.so
> 3266e83000-3266e84000 rw-p 00083000 08:07 28303562
>   /lib64/libm-2.12.so
> 3267000000-3267002000 r-xp 00000000 08:07 28303565
>   /lib64/libdl-2.12.so
> 3267002000-3267202000 ---p 00002000 08:07 28303565
>   /lib64/libdl-2.12.so
> 3267202000-3267203000 r--p 00002000 08:07 28303565
>   /lib64/libdl-2.12.so
> 3267203000-3267204000 rw-p 00003000 08:07 28303565
>   /lib64/libdl-2.12.so
> 3267400000-3267417000 r-xp 00000000 08:07 28303559
>   /lib64/libpthread-2.12.so
> 3267417000-3267617000 ---p 00017000 08:07 28303559
>   /lib64/libpthread-2.12.so
> 3267617000-3267618000 r--p 00017000 08:07 28303559
>   /lib64/libpthread-2.12.so
> 3267618000-3267619000 rw-p 00018000 08:07 28303559
>   /lib64/libpthread-2.12.so
> 3267619000-326761d000 rw-p 00000000 00:00 0
> 3267800000-3267815000 r-xp 00000000 08:07 28303564
>   /lib64/libz.so.1.2.3
> 3267815000-3267a14000 ---p 00015000 08:07 28303564
>   /lib64/libz.so.1.2.3
> 3267a14000-3267a15000 r--p 00014000 08:07 28303564
>   /lib64/libz.so.1.2.3
> 3267a15000-3267a16000 rw-p 00015000 08:07 28303564
>   /lib64/libz.so.1.2.3
> 3267c00000-3267c56000 r-xp 00000000 08:07 16852724
>   /usr/lib64/libgmp.so.3.5.0
> 3267c56000-3267e56000 ---p 00056000 08:07 16852724
>   /usr/lib64/libgmp.so.3.5.0
> 3267e56000-3267e5b000 rw-p 00056000 08:07 16852724
>   /usr/lib64/libgmp.so.3.5.0
> 3268000000-326801d000 r-xp 00000000 08:07 28303571
>   /lib64/libselinux.so.1
> 326801d000-326821c000 ---p 0001d000 08:07 28303571
>   /lib64/libselinux.so.1
> 326821c000-326821d000 r--p 0001c000 08:07 28303571
>   /lib64/libselinux.so.1
> 326821d000-326821e000 rw-p 0001d000 08:07 28303571
>   /lib64/libselinux.so.1
> 326821e000-326821f000 rw-p 00000000 00:00 0
> 3268400000-326843a000 r-xp 00000000 08:07 10559772
>   /lib64/libreadline.so.6.0
> 326843a000-326863a000 ---p 0003a000 08:07 10559772
>   /lib64/libreadline.so.6.0
> 326863a000-3268642000 rw-p 0003a000 08:07 10559772
>   /lib64/libreadline.so.6.0
> 3268642000-3268643000 rw-p 00000000 00:00 0
> 3268800000-3268816000 r-xp 00000000 08:07 28303570
>   /lib64/libresolv-2.12.so
> 3268816000-3268a16000 ---p 00016000 08:07 28303570
>   /lib64/libresolv-2.12.so
> 3268a16000-3268a17000 r--p 00016000 08:07 28303570
>   /lib64/libresolv-2.12.so
> 3268a17000-3268a18000 rw-p 00017000 08:07 28303570
>   /lib64/libresolv-2.12.so
> 3268a18000-3268a1a000 rw-p 00000000 00:00 0
> 3269000000-326901d000 r-xp 00000000 08:07 16851877
>   /usr/lib64/libxcb.so.1.1.0
> 326901d000-326921d000 ---p 0001d000 08:07 16851877
>   /usr/lib64/libxcb.so.1.1.0
> 326921d000-326921e000 rw-p 0001d000 08:07 16851877
>   /usr/lib64/libxcb.so.1.1.0
> 3269800000-3269937000 r-xp 00000000 08:07 16851890
>   /usr/lib64/libX11.so.6.3.0
> 3269937000-3269b37000 ---p 00137000 08:07 16851890
>   /usr/lib64/libX11.so.6.3.0
> 3269b37000-3269b3d000 rw-p 00137000 08:07 16851890
>   /usr/lib64/libX11.so.6.3.0
> 3269c00000-3269c02000 r-xp 00000000 08:07 16851853
>   /usr/lib64/libXau.so.6.0.0
> 3269c02000-3269e02000 ---p 00002000 08:07 16851853
>   /usr/lib64/libXau.so.6.0.0
> 3269e02000-3269e03000 rw-p 00002000 08:07 16851853
>   /usr/lib64/libXau.so.6.0.0
> 326a000000-326a026000 r-xp 00000000 08:07 28303563
>   /lib64/libexpat.so.1.5.2
> 326a026000-326a225000 ---p 00026000 08:07 28303563
>   /lib64/libexpat.so.1.5.2
> 326a225000-326a228000 rw-p 00025000 08:07 28303563
>   /lib64/libexpat.so.1.5.2
> 326a400000-326a498000 r-xp 00000000 08:07 16851760
>   /usr/lib64/libfreetype.so.6.3.22
> 326a498000-326a697000 ---p 00098000 08:07 16851760
>   /usr/lib64/libfreetype.so.6.3.22
> 326a697000-326a69d000 rw-p 00097000 08:07 16851760
>   /usr/lib64/libfreetype.so.6.3.22
> 326a800000-326a834000 r-xp 00000000 08:07 16851762
>   /usr/lib64/libfontconfig.so.1.4.4
> 326a834000-326aa34000 ---p 00034000 08:07 16851762
>   /usr/lib64/libfontconfig.so.1.4.4
> 326aa34000-326aa36000 rw-p 00034000 08:07 16851762
>   /usr/lib64/libfontconfig.so.1.4.4
> 326b400000-326b409000 r-xp 00000000 08:07 16852324
>   /usr/lib64/libXrender.so.1.3.0
> 326b409000-326b609000 ---p 00009000 08:07 16852324
>   /usr/lib64/libXrender.so.1.3.0
> 326b609000-326b60a000 rw-p 00009000 08:07 16852324
>   /usr/lib64/libXrender.so.1.3.0
> 326b800000-326b812000 r-xp 00000000 08:07 16852474
>   /usr/lib64/libXext.so.6.4.0
> 326b812000-326ba12000 ---p 00012000 08:07 16852474
>   /usr/lib64/libXext.so.6.4.0
> 326ba12000-326ba13000 rw-p 00012000 08:07 16852474
>   /usr/lib64/libXext.so.6.4.0
> 326d400000-326d402000 r-xp 00000000 08:07 16853943
>   /usr/lib64/libXinerama.so.1.0.0
> 326d402000-326d601000 ---p 00002000 08:07 16853943
>   /usr/lib64/libXinerama.so.1.0.0
> 326d601000-326d602000 rw-p 00001000 08:07 16853943
>   /usr/lib64/libXinerama.so.1.0.0
> 3270000000-3270007000 r-xp 00000000 08:07 28303567
>   /lib64/libcrypt-2.12.so
> 3270007000-3270207000 ---p 00007000 08:07 28303567
>   /lib64/libcrypt-2.12.so
> 3270207000-3270208000 r--p 00007000 08:07 28303567
>   /lib64/libcrypt-2.12.so
> 3270208000-3270209000 rw-p 00008000 08:07 28303567
>   /lib64/libcrypt-2.12.so
> 3270209000-3270237000 rw-p 00000000 00:00 0
> 3270400000-3270471000 r-xp 00000000 08:07 28303566
>   /lib64/libfreebl3.so
> 3270471000-3270670000 ---p 00071000 08:07 28303566
>   /lib64/libfreebl3.so
> 3270670000-3270672000 r--p 00070000 08:07 28303566
>   /lib64/libfreebl3.so
> 3270672000-3270673000 rw-p 00072000 08:07 28303566
>   /lib64/libfreebl3.so
> 3270673000-3270677000 rw-p 00000000 00:00 0
> 3270800000-3270814000 r-xp 00000000 08:07 16854027
>   /usr/lib64/libXft.so.2.3.1
> 3270814000-3270a14000 ---p 00014000 08:07 16854027
>   /usr/lib64/libXft.so.2.3.1
> 3270a14000-3270a15000 rw-p 00014000 08:07 16854027
>   /usr/lib64/libXft.so.2.3.1
> 3271000000-327102e000 r-xp 00000000 08:07 10559657
>   /lib64/libncursesw.so.5.7
> 327102e000-327122e000 ---p 0002e000 08:07 10559657
>   /lib64/libncursesw.so.5.7
> 327122e000-327122f000 rw-p 0002e000 08:07 10559657
>   /lib64/libncursesw.so.5.7
> 3271400000-3271402000 r-xp 00000000 08:07 28303569
>   /lib64/libkeyutils.so.1.3
> 3271402000-3271601000 ---p 00002000 08:07 28303569
>   /lib64/libkeyutils.so.1.3
> 3271601000-3271602000 r--p 00001000 08:07 28303569
>   /lib64/libkeyutils.so.1.3
> 3271602000-3271603000 rw-p 00002000 08:07 28303569
>   /lib64/libkeyutils.so.1.3
> 3271c00000-3271db5000 r-xp 00000000 08:07 16852462
>   /usr/lib64/libcrypto.so.1.0.1e
> 3271db5000-3271fb5000 ---p 001b5000 08:07 16852462
>   /usr/lib64/libcrypto.so.1.0.1e
> 3271fb5000-3271fd0000 r--p 001b5000 08:07 16852462
>   /usr/lib64/libcrypto.so.1.0.1e
> 3271fd0000-3271fdc000 rw-p 001d0000 08:07 16852462
>   /usr/lib64/libcrypto.so.1.0.1e
> 3271fdc000-3271fe0000 rw-p 00000000 00:00 0
> 3272400000-327240a000 r-xp 00000000 08:07 28303572
>   /lib64/libkrb5support.so.0.1
> 327240a000-3272609000 ---p 0000a000 08:07 28303572
>   /lib64/libkrb5support.so.0.1
> 3272609000-327260a000 r--p 00009000 08:07 28303572
>   /lib64/libkrb5support.so.0.1./run: line 33:  2208 Aborted
>      (core dumped) $SWIPL -q -f "$run" -- $*
> ~~~
>
> ---
> Cheers!,
> Wouter Beek.
>
> E-mail: [email protected]
> WWW: www.wouterbeek.com
> Tel.: 0647674624
>
>
> On Sat, Apr 19, 2014 at 12:52 PM, Wouter Beek <[email protected]> wrote:
> > Hi Prologgers,
> >
> > I am running a Prolog program on a remote server to download all
> > Linked Open Data that is described in the CKAN repository datahub.io.
> > These are overall very big datasets and running the complete script
> > takes quite a while. For some reason that I would like to figure out,
> > the Prolog program stops with the below included output.
> >
> > My question is: what would be the/a best practice to debug this in a
> > smart/focused way (i.e., except for populating most of my code with
> > debug statements)? Am I able to catch this error in C and then get a
> > little more info on what is in the Prolog stack at the moment the
> > exception is thrown?
> >
> > ~~~
> > SWI-Prolog [thread 62]: received fatal signal 11 (segv)
> > C-stack trace labeled "crash":
> >   [0]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xd6dd7)
> > [0x7ffff7dabdd7]
> >   [1]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xd6e7e)
> > [0x7ffff7dabe7e]
> >   [2]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0x89065)
> > [0x7ffff7d5e065]
> >   [3] /lib64/libpthread.so.0() [0x326740f710]
> >   [4] /lib64/libc.so.6() [0x326687873b]
> >   [5]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc402b)
> > [0x7ffff7d9902b]
> >   [6]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc421c)
> > [0x7ffff7d9921c]
> >   [7]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc471c)
> > [0x7ffff7d9971c]
> >   [8]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc577e)
> > [0x7ffff7d9a77e]
> >   [9]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xc0fc0)
> > [0x7ffff7d95fc0]
> >   [10]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(PL_next_solution+0x5940)
> > [0x7ffff7d0a7a0]
> >   [11]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0x6f898)
> > [0x7ffff7d44898]
> >   [12]
> /home/wbk440/lib/swipl-7.1.11/lib/x86_64-linux/libswipl.so.7.1.11(+0xa3ed9)
> > [0x7ffff7d78ed9]
> >   [13] /lib64/libpthread.so.0() [0x32674079d1]
> >   [14] /lib64/libc.so.6(clone+0x6d) [0x32668e8b6d]
> > ./run: line 33:  4525 Aborted                 (core dumped) $SWIPL -q
> > -f "$run" -- $*
> > ~~~
> >
> > ---
> > Cheers,
> > Wouter Beek.
> >
> > E-mail: [email protected]
> > WWW: www.wouterbeek.com
> > Tel.: 0647674624
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
>
-------------- next part --------------
HTML attachment scrubbed and removed