Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
Greetings! In the failing environment, there is apparently some wrapper to open() which is interfering with a read of /proc/meminfo: 17104 brk(0x800d12000) = 0x800d12000 17104 brk(0x800d16000) = 0x800d16000 17104 brk(0x800d18000) = 0x800d18000 17104 brk(0xd1b000) = 0xd1b000 17104 open("/proc/meminfo", O_RDONLY) = 3 17104 read(3, "MemTotal:8074492 kB\nMemF"..., 4096) = 1011 17104 close(3) = 0 17104 brk(0xcd9e3000) = 0xcd9e3000 17104 stat("/proc/17104/exe", {st_mode=S_IFREG|0755, st_size=4446024, ...}) = 0 vs 16803 brk(0x800d0a000) = 0x800d0a000 16803 brk(0x800d12000) = 0x800d12000 16803 brk(0x800d16000) = 0x800d16000 16803 brk(0x800d18000) = 0x800d18000 16803 brk(0xd1b000) = 0xd1b000 16803 stat("/proc/meminfo", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 16803 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1f} --- 16803 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 4), ...}) = 0 16803 write(1, "\nUnrecoverable error: ", 22) = 22 16803 write(1, "S", 1) = 1 16803 write(1, "egmentation violation.", 22) = 22 This method of determining the runtime available memory has been replaced in 2.6.13pre with (hopefully) more robust alternatives. But hopefully this should point out what is going on. Please let me know what you find out and we might make an FAQ or something. Take care, -- Camm Maguirec...@maguirefamily.org == "The earth is but one country, and mankind its citizens." -- Baha'u'llah ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
On Mon, 17 Oct 2016, Camm Maguire wrote: Greetings! Make can run subjobs in constrained environments. Can you post 'strace -f ' of both? I've edited unixport/makefile to run raw_gcl under strace -f. The trace when raw_gcl is invoked by make and fails is short, it's gcl_fail.strace.bz2. The trace when I invoke raw_gcl from the command line is much longer: gcl_succ.strace.bz2. Thank you for your patience, Andrey gcl_fail.strace.bz2 Description: BZip2 compressed data gcl_succ.strace.bz2 Description: BZip2 compressed data ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
Greetings! Make can run subjobs in constrained environments. Can you post 'strace -f ' of both? Take care, "Andrey G. Grozin" writes: > Something really strange is happening (absolutely reproducibly). I > cannot understand. > > After this failure in the build process, make removes raw_gcl. This is > inconvenient for debugging. Therefore I removed it from .INTERMEDIATE > in the makefile in unixport. I run make in the toplevel directpry, and > get > > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo > > Unrecoverable error: Segmentation violation.. > > (the first 3 lines here are, of course, 1 line split by the email > client). But now raw_gcl is still here. So, I run by hand > > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo > > (the same 1 line). And it succeeds and produces saved_gcl! > > Why does this line fail when started by make, but succeeds when > started from the command line?? > > Andrey > > > -- Camm Maguirec...@maguirefamily.org == "The earth is but one country, and mankind its citizens." -- Baha'u'llah ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
Something really strange is happening (absolutely reproducibly). I cannot understand. After this failure in the build process, make removes raw_gcl. This is inconvenient for debugging. Therefore I removed it from .INTERMEDIATE in the makefile in unixport. I run make in the toplevel directpry, and get /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo Unrecoverable error: Segmentation violation.. (the first 3 lines here are, of course, 1 line split by the email client). But now raw_gcl is still here. So, I run by hand /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo (the same 1 line). And it succeeds and produces saved_gcl! Why does this line fail when started by make, but succeeds when started from the command line?? Andrey ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
How about strace -f ./raw_gcl ./ writes: > On Mon, 10 Oct 2016, Camm Maguire wrote: >> cd unixport >> make raw_gcl >> gdb raw_gcl >> (gdb) r ./ When I do this, it seems there is no segfault: > > (gdb) r ./ Starting program: > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl ./ [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib64/libthread_db.so.1". > GCL (GNU Common Lisp) April 1994 8391960 pages > Building symbol table for > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl .. > loading ./../lsp/gcl_export.lsp > Initializing gcl_defmacro.o > Initializing gcl_evalmacros.o > Initializing gcl_top.o > Initializing gcl_module.o > loading ./../lsp/gcl_autoload.lsp > >> > #<"COMPILER" package> > >> > T > >> > #<"SLOOP" package> > >> > #<"ANSI-LOOP" package> > >> > #<"DEFPACKAGE" package> > >> > #<"TK" package> > >> > #<"FPE" package> > >> > #<"SYSTEM" package> > > SYSTEM> > T > > SYSTEM> > *COMMAND-ARGS* > > SYSTEM>Initializing gcl_arraylib.o > Initializing gcl_predlib.o > Initializing gcl_setf.o > Initializing gcl_assert.o > Initializing gcl_defstruct.o > Initializing gcl_restart.o > Initializing gcl_describe.o > Initializing gcl_iolib.o > Initializing gcl_listlib.o > Initializing gcl_mislib.o > Initializing gcl_numlib.o > Initializing gcl_packlib.o > Initializing gcl_seq.o > Initializing gcl_seqlib.o > Initializing gcl_trace.o > Initializing gcl_sloop.o > Initializing gcl_serror.o > Initializing gcl_destructuring_bind.o > Initializing gcl_loop.o > Initializing gcl_defpackage.o > Initializing gcl_make_defpackage.o > Initializing gcl_sharp.o > Initializing gcl_fpe.o > Initializing gcl_cmpinline.o > Initializing gcl_cmputil.o > Initializing gcl_debug.o > Initializing gcl_info.o > Initializing gcl_cmptype.o > Initializing gcl_cmpbind.o > Initializing gcl_cmpblock.o > Initializing gcl_cmpcall.o > Initializing gcl_cmpcatch.o > Initializing gcl_cmpenv.o > Initializing gcl_cmpeval.o > Initializing gcl_cmpflet.o > Initializing gcl_cmpfun.o > Initializing gcl_cmpif.o > Initializing gcl_cmplabel.o > Initializing gcl_cmplam.o > Initializing gcl_cmplet.o > Initializing gcl_cmploc.o > Initializing gcl_cmpmap.o > Initializing gcl_cmpmulti.o > Initializing gcl_cmpspecial.o > Initializing gcl_cmptag.o > Initializing gcl_cmptop.o > Initializing gcl_cmpvar.o > Initializing gcl_cmpvs.o > Initializing gcl_cmpwt.o > Initializing gcl_cmpmain.o > loading ./../xgcl-2/sysdef.lisp > Initializing gcl_Xlib.o > Initializing gcl_Xutil.o > Initializing gcl_X.o > Initializing gcl_XAtom.o > Initializing gcl_defentry_events.o > Initializing gcl_Xstruct.o > Initializing gcl_XStruct_l_3.o > Initializing gcl_general.o > Initializing gcl_keysymdef.o > Initializing gcl_X10.o > Initializing gcl_Xinit.o > Initializing gcl_dwtrans.o > Initializing gcl_tohtml.o > Initializing gcl_index.o > > Loading ./../lsp/sys-proclaim.lisp > Finished loading ./../lsp/sys-proclaim.lisp > Loading ./../cmpnew/sys-proclaim.lisp > Finished loading ./../cmpnew/sys-proclaim.lisp > Loading ./../gcl-tk/tk-package.lsp > Finished loading ./../gcl-tk/tk-package.lsp > Loading ./../cmpnew/gcl_lfun_list.lsp > Finished loading ./../cmpnew/gcl_lfun_list.lsp > Loading ./../cmpnew/gcl_cmpopt.lsp > Finished loading ./../cmpnew/gcl_cmpopt.lsp > Loading ./../lsp/gcl_auto_new.lsp > Finished loading ./../lsp/gcl_auto_new.lsp > > T > >> > #<"USER" package> > >>[Inferior 1 (process 3719) exited normally] > (gdb) > > This is gcl-2.6.12.tar.gz from ftpmirror.gnu.org/gcl/ > > Andrey > > > > -- Camm Maguirec...@maguirefamily.org == "The earth is but one country, and mankind its citizens." -- Baha'u'llah ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
On Mon, 10 Oct 2016, Camm Maguire wrote: cd unixport make raw_gcl gdb raw_gcl (gdb) r ./ When I do this, it seems there is no segfault: (gdb) r ./ Starting program: /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl ./ [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". GCL (GNU Common Lisp) April 1994 8391960 pages Building symbol table for /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl .. loading ./../lsp/gcl_export.lsp Initializing gcl_defmacro.o Initializing gcl_evalmacros.o Initializing gcl_top.o Initializing gcl_module.o loading ./../lsp/gcl_autoload.lsp #<"COMPILER" package> T #<"SLOOP" package> #<"ANSI-LOOP" package> #<"DEFPACKAGE" package> #<"TK" package> #<"FPE" package> #<"SYSTEM" package> SYSTEM> T SYSTEM> *COMMAND-ARGS* SYSTEM>Initializing gcl_arraylib.o Initializing gcl_predlib.o Initializing gcl_setf.o Initializing gcl_assert.o Initializing gcl_defstruct.o Initializing gcl_restart.o Initializing gcl_describe.o Initializing gcl_iolib.o Initializing gcl_listlib.o Initializing gcl_mislib.o Initializing gcl_numlib.o Initializing gcl_packlib.o Initializing gcl_seq.o Initializing gcl_seqlib.o Initializing gcl_trace.o Initializing gcl_sloop.o Initializing gcl_serror.o Initializing gcl_destructuring_bind.o Initializing gcl_loop.o Initializing gcl_defpackage.o Initializing gcl_make_defpackage.o Initializing gcl_sharp.o Initializing gcl_fpe.o Initializing gcl_cmpinline.o Initializing gcl_cmputil.o Initializing gcl_debug.o Initializing gcl_info.o Initializing gcl_cmptype.o Initializing gcl_cmpbind.o Initializing gcl_cmpblock.o Initializing gcl_cmpcall.o Initializing gcl_cmpcatch.o Initializing gcl_cmpenv.o Initializing gcl_cmpeval.o Initializing gcl_cmpflet.o Initializing gcl_cmpfun.o Initializing gcl_cmpif.o Initializing gcl_cmplabel.o Initializing gcl_cmplam.o Initializing gcl_cmplet.o Initializing gcl_cmploc.o Initializing gcl_cmpmap.o Initializing gcl_cmpmulti.o Initializing gcl_cmpspecial.o Initializing gcl_cmptag.o Initializing gcl_cmptop.o Initializing gcl_cmpvar.o Initializing gcl_cmpvs.o Initializing gcl_cmpwt.o Initializing gcl_cmpmain.o loading ./../xgcl-2/sysdef.lisp Initializing gcl_Xlib.o Initializing gcl_Xutil.o Initializing gcl_X.o Initializing gcl_XAtom.o Initializing gcl_defentry_events.o Initializing gcl_Xstruct.o Initializing gcl_XStruct_l_3.o Initializing gcl_general.o Initializing gcl_keysymdef.o Initializing gcl_X10.o Initializing gcl_Xinit.o Initializing gcl_dwtrans.o Initializing gcl_tohtml.o Initializing gcl_index.o Loading ./../lsp/sys-proclaim.lisp Finished loading ./../lsp/sys-proclaim.lisp Loading ./../cmpnew/sys-proclaim.lisp Finished loading ./../cmpnew/sys-proclaim.lisp Loading ./../gcl-tk/tk-package.lsp Finished loading ./../gcl-tk/tk-package.lsp Loading ./../cmpnew/gcl_lfun_list.lsp Finished loading ./../cmpnew/gcl_lfun_list.lsp Loading ./../cmpnew/gcl_cmpopt.lsp Finished loading ./../cmpnew/gcl_cmpopt.lsp Loading ./../lsp/gcl_auto_new.lsp Finished loading ./../lsp/gcl_auto_new.lsp T #<"USER" package> [Inferior 1 (process 3719) exited normally] (gdb) This is gcl-2.6.12.tar.gz from ftpmirror.gnu.org/gcl/ Andrey ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel
Re: [Gcl-devel] building gcl-2.6.12: raw_gcl segfaults
Greetings, and thanks for your report! Presuming you compiled with debugging flags: cd unixport make raw_gcl gdb raw_gcl (gdb) r ./ writes: > Gentoo Linux (amd64), gcc-5.4.0: > > cp init_gcl.lsp foo > echo " (in-package \"USER\")(system:save-system \"saved_gcl\")" >>foo > ar x libgcl.a $(ar t libgcl.a |grep ^gcl_) > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo > > Unrecoverable error: Segmentation violation.. > /bin/sh: line 1: 7838 Aborted > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/raw_gcl > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/unixport/ -libdir > /var/tmp/portage/dev-lisp/gcl-2.6.12/work/gcl/ < foo > make[1]: *** [makefile:130: saved_gcl] Error 134 > > In February this year the build was successful. I don't know which > upgrade broke it, there are too many of them between February and > now. Maybe, back then I used some older gcc. > > How can I debug this situation? > > Andrey > > ___ > Gcl-devel mailing list > Gcl-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/gcl-devel > > > > -- Camm Maguirec...@maguirefamily.org == "The earth is but one country, and mankind its citizens." -- Baha'u'llah ___ Gcl-devel mailing list Gcl-devel@gnu.org https://lists.gnu.org/mailman/listinfo/gcl-devel