bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Random Segmentation fault when run with -j n


From: Shahzad Muzaffar
Subject: RE: Random Segmentation fault when run with -j n
Date: Sat, 20 Oct 2007 15:14:29 +0200

Hello,
  The OS I am runing is
> uname -a
Linux pclinux23 2.6.9-55.0.2.EL.cernsmp #1 SMP Wed Jun 27 13:01:53 CEST 2007 
i686 i686 i386 GNU/Linux
> cat /etc/redhat-release
Scientific Linux CERN SLC release 4.5 (Beryllium)

As I have said that the crash is random. It crashes approx. once out of runs. I 
get the same results with gmake 3.81. Here is gdb output for make 3.81 (which 
was built without -O2 option)

 
(gdb) where
#0  0x0805b2d7 in eval_buffer (buffer=0x94b4388 " \n  
\ncached_var_P3_0_ORDER:=99993") at read.c:430
#1  0x080518aa in func_eval (o=0x94b42b8 "", argv=0xbff5a340, 
funcname=0x8069118 "eval") at function.c:1369
#2  0x08052096 in expand_builtin_function (o=0x94b42b8 "", argc=1, 
argv=0xbff5a340, entry_p=0x806de98) at function.c:2115
#3  0x080522c0 in handle_function (op=0xbff5a404, stringp=0xbff5a400) at 
function.c:2213
#4  0x0804cfac in variable_expand_string (line=0x94b42b8 "", string=0x94b4279 
"$(eval $(call set_cached_var_,$(1)))$(cached_var_$(1))", length=-1)
    at expand.c:253
#5  0x0804d47e in variable_expand (line=0x94b4279 "$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1))") at expand.c:418
#6  0x0804d54b in variable_expand_for_file (line=0x94b4279 "$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1))", file=0x0) at expand.c:455
#7  0x0804d79a in allocated_variable_expand_for_file (line=0x94b4279 "$(eval 
$(call set_cached_var_,$(1)))$(cached_var_$(1))", file=0x0) at expand.c:548
#8  0x0804d4c4 in expand_argument (str=0x94b4279 "$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1))", end=0x0) at expand.c:436
#9  0x08051676 in func_if (o=0x94b5310 "", argv=0xbff5a528, funcname=0x8069108 
"if") at function.c:1223
#10 0x08052096 in expand_builtin_function (o=0x94b5310 "", argc=3, 
argv=0xbff5a520, entry_p=0x806de68) at function.c:2115
#11 0x080522c0 in handle_function (op=0xbff5a5f4, stringp=0xbff5a5f0) at 
function.c:2213
#12 0x0804cfac in variable_expand_string (line=0x94b5310 "",
    string=0x949f948 "$(if $(subst undefined,,$(origin 
cached_var_$(1))),$(cached_var_$(1)),$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1)))",
    length=-1) at expand.c:253
#13 0x0804d47e in variable_expand (
    line=0x949f948 "$(if $(subst undefined,,$(origin 
cached_var_$(1))),$(cached_var_$(1)),$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1)))")
    at expand.c:418
#14 0x0804d54b in variable_expand_for_file (
    line=0x949f948 "$(if $(subst undefined,,$(origin 
cached_var_$(1))),$(cached_var_$(1)),$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1)))",
    file=0x0) at expand.c:455
#15 0x0804d79a in allocated_variable_expand_for_file (
    line=0x949f948 "$(if $(subst undefined,,$(origin 
cached_var_$(1))),$(cached_var_$(1)),$(eval $(call 
set_cached_var_,$(1)))$(cached_var_$(1)))",
    file=0x0) at expand.c:548
#16 0x0804ce2a in recursively_expand_for_file (v=0x949fe58, file=0x0) at 
expand.c:143
#17 0x0804d408 in reference_variable (o=0x94b0818 "", name=0xbff5a782 
"get_cached_var_)", length=15) at expand.c:177
#18 0x0804d2dd in variable_expand_string (line=0x94b0818 "", string=0xbff5a780 
"$(get_cached_var_)", length=18) at expand.c:376
#19 0x080525ce in func_call (o=0x94b0818 "", argv=0xbff5a848, 
funcname=0x80690f0 "call") at function.c:2322
#20 0x08052096 in expand_builtin_function (o=0x94b0818 "", argc=2, 
argv=0xbff5a840, entry_p=0x806de38) at function.c:2115
#21 0x080522c0 in handle_function (op=0xbff5a904, stringp=0xbff5a900) at 
function.c:2213
#22 0x0804cfac in variable_expand_string (line=0x94b0818 "", string=0x94a2928 
"$(call get_cached_var_,P3_0_ORDER)", length=-1) at expand.c:253
#23 0x0804d47e in variable_expand (line=0x94a2928 "$(call 
get_cached_var_,P3_0_ORDER)") at expand.c:418
#24 0x0804d54b in variable_expand_for_file (line=0x94a2928 "$(call 
get_cached_var_,P3_0_ORDER)", file=0x0) at expand.c:455
#25 0x0804d79a in allocated_variable_expand_for_file (line=0x94a2928 "$(call 
get_cached_var_,P3_0_ORDER)", file=0x0) at expand.c:548
#26 0x0804ce2a in recursively_expand_for_file (v=0x94a27d8, file=0x0) at 
expand.c:143
#27 0x0804d408 in reference_variable (o=0x94a6f4d "GJ\t?HJ\t 
JJ\t\220KJ\t\210MJ\t?RJ\tXTJ\tPVJ\t?bJ\t0gJ\t?gJ\t?hJ\tpiJ\t0jJ\t",
    name=0x94a7008 "P3_0_ORDER", length=10) at expand.c:177
#28 0x0804d2dd in variable_expand_string (
    line=0x94a6f38 "address@hidden \"P3_0_ORDER = GJ\t?HJ\t 
JJ\t\220KJ\t\210MJ\t?RJ\tXTJ\tPVJ\t?bJ\t0gJ\t?gJ\t?hJ\tpiJ\t0jJ\t",
    string=0x94a6c40 "address@hidden \"$@ = $($@)\"", length=-1) at expand.c:376
#29 0x0804d47e in variable_expand (line=0x94a6c40 "address@hidden \"$@ = 
$($@)\"") at expand.c:418
#30 0x0804d59c in variable_expand_for_file (line=0x94a6c40 "address@hidden \"$@ 
= $($@)\"", file=0x94a3ed0) at expand.c:463
#31 0x0804d79a in allocated_variable_expand_for_file (line=0x94a6c40 
"address@hidden \"$@ = $($@)\"", file=0x94a3ed0) at expand.c:548
#32 0x08055562 in new_job (file=0x94a3ed0) at job.c:1600
#33 0x0804b57a in execute_file_commands (file=0x94a3ed0) at commands.c:394
#34 0x08061d20 in remake_file (file=0x94a3ed0) at remake.c:1123
#35 0x08061063 in update_file_1 (file=0x94a3ed0, depth=2) at remake.c:761
#36 0x0805fd3f in update_file (file=0x94a3ed0, depth=2) at remake.c:307
#37 0x080615dd in check_dep (file=0x94a3ed0, depth=2, this_mtime=1, 
must_make_ptr=0xbff5ad68) at remake.c:947
#38 0x08060596 in update_file_1 (file=0x94a0620, depth=1) at remake.c:508
#39 0x0805fd3f in update_file (file=0x94a0620, depth=0) at remake.c:307
#40 0x0805f929 in update_goal_chain (goals=0x94a6af8) at remake.c:154
#41 0x08058801 in main (argc=3, argv=0xbff5c7d4, envp=0xbff5c7e4) at main.c:2198

Cheers,
--Shahzad

-----Original Message-----
From: Philip Guenther [mailto:address@hidden
Sent: Sat 10/20/2007 14:43
To: Shahzad Muzaffar
Cc: address@hidden
Subject: Re: Random Segmentation fault when run with -j n
 
On 10/20/07, Shahzad Muzaffar <address@hidden> wrote:
> I have this Makefile (attached) and when I run it with -j 8 then I get
> random segmentation fault(not always on same point). Running it without
> -j option works fine and I do not get segmentation fault all the time
> (it is just random).

This makefile causes no problems for me under OpenBSD, running either
version 3.80 or 3.81.  Yes, I ran it many times.  You should have
included the actual operating system that you're using in your bug
report.

You should also check whether you can reproduce this with GNU make
version 3.81, which has been out for over 18 months.


> My guess is that as I calculate values for some
> variable only on fly so may be when run with -j option, two threads try
> to calculate/access the same variable and that causes a crash.

GNU make does not use threads, so this explanation cannot be correct.


Philip Guenther





reply via email to

[Prev in Thread] Current Thread [Next in Thread]