bugmake - Bugs: bug #54529, [Makefile:5: foobar] Segmentation...

 
 

bug #54529: [Makefile:5: foobar] Segmentation fault

Submitter:  Mark Galeck <mark_galeck0>
Submitted:  Fri 17 Aug 2018 02:46:42 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Not A Bug Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Component Version:  4.2.1 Operating System:  None
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 20 Aug 2018 06:33:37 PM UTC, comment #4: 

This message:


$ make-4.2.1/make
touch foobar
make: *** [Makefile:5: foobar] Segmentation fault (core dumped)


doesn't mean that make dumped core.  If it had you'd not see the prefix containing the make target name, etc.

This means that the program make invoked dumped core.  Make is printing out the results of invoking the program (specifically, the results of the waitpid() call waiting for the child to complete).  In this case, since this is a simple command so make can invoke it directly without using the shell, it means that the "touch" program dumped core.

I suspect that your attempt to modify the LD_LIBRARY_PATH has caused an incompatible version of the C runtime library (libc) or similar to be loaded when the "touch" program is running.

I can't explain your "delete any elements and it doesn't happen" result, except of course that if you modify the pathname you are using with "echo", then the value of the ROOT make variable will change and the LD_LIBRARY_PATH value will be different and thus it may not find the wrong library.

I can't see any way this can be related to make so I'm closing this as "not a bug" but if you have more information feel free to add it as a comment and I can re-open.

Paul D. Smith <psmith>
Group administrator
Sat 18 Aug 2018 02:43:01 AM UTC, comment #3: 

OK, the only system for which this bugs actually shows up, is work build server, and unfortunately, the IT guy does not know where the cores are, and gdb is not working.  Let me talk to him about fixing gdb and I will get back to you what I find from it. 

Mark Galeck <mark_galeck0>
Fri 17 Aug 2018 05:07:28 PM UTC, comment #2: 

"Segmentation fault (core dumped)" means that you got a core file to analyze. A first simple step might be to see what generated that core file, it could be done with something like "file core". Next you might want to open the core file in a debugger to see a stack trace.

regards Henrik

Henrik Carlqvist <henca>
Fri 17 Aug 2018 04:33:18 PM UTC, comment #1: 

Easily put back but I think the bug reporting thing has eaten a tab.  Using a semicolon rather than newline and tab would avoid that.  I can't reproduce the crash.  I'm using the latest from git.  If I were you, I'd run it under valgrind, then you'd probably get a stack trace, although perhaps it would heisenbug away.

Martin Dorey <mdorey>
Fri 17 Aug 2018 02:46:42 PM UTC, original submission:  

For this Makefile:

ROOT := ${shell echo /home/mgaleck/ws/mgaleck_build/mgaleck_build_refactor2/target | sed s/t/t/}
export LD_LIBRARY_PATH := ${ROOT}/usr/lib64:${LD_LIBRARY_PATH}

foobar:
        touch $@


and file foobar missing, then on some Linux distributions, I get this:

$ make-4.2.1/make
touch foobar
make: * [Makefile:5: foobar] Segmentation fault (core dumped)


The above Makefile is SSCCE for me - if I delete any elements from the above, even just one letter from the echo string, does not happen. 

This happens on CentOS 7.3, but on latest Ubuntu, does not happen.  I am hoping that this is merely a matter of different timing and the bug is really present on all OS and a person sufficiently familiar with the code can see it from the above description. 

Mark

Mark Galeck <mark_galeck0>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by henca (Posted a comment)
  • -email is unavailable- added by mdorey (Posted a comment)
  • -email is unavailable- added by mark_galeck0 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-08-20 psmith StatusNone Not A Bug
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code